AnsweredAssumed Answered

RCC_APB1PeriphClockCmd on USART1

Question asked by abraham.nick on Apr 21, 2012
Latest reply on Apr 26, 2012 by abraham.nick
Hi,
According to the example code provide with the STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\USART\Interrupt, the clock provided to both the USARTs  i.e.USARTy = USART1 and USARTz = USART2 is through RCC_APB1PeriphClockCmd using the command as in the code below..
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
RCC_APB2PeriphClockCmd(USARTy_GPIO_CLK | USARTz_GPIO_CLK | RCC_APB2Periph_AFIO, ENABLE);

  /* Enable USARTy Clock */
  RCC_NVIC_IRQChannelSubPriority(USARTy_CLK, ENABLE);

  /* Enable USARTz Clock */
  RCC_APB1PeriphClockCmd(USARTz_CLK, ENABLE); 
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Why is APB2PeriphClock not provided to USART1 e.g. RCC_APB2PeriphClockCmd(USARTy_CLK, ENABLE);?

I am running this example on my STM3210E-EVAL at 72MHz.

bye,
Nick

Outcomes