Question
RCC_APB1PeriphClockCmd on USART1
Posted on April 21, 2012 at 15:14
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