Hi , I am working on STM32f103zf , trying to get UART2 and UART3 to work with no success, UART1 is working ok. When I try to init UART2 I see that the the CR1 register is not being written although driver is trying to write to it and enable the UART.
The CR1 register stays 0 (as well as CR2, it looks like all UART2 registers are 0). My first thought was that the Bus is not enabled - as UART1 is on APB2 and UART 2 and 3 are on APB1 , but I enable UART2 bus - this is the enable code :
/* Enable GPIO */
RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOD , ENABLE );
/* Enable USART2 and 3*/
RCC_APB2PeriphClockCmd( RCC_APB1Periph_USART2 | RCC_APB1Periph_USART3 | RCC_APB2Periph_AFIO, ENABLE );
What could be the reason for the CR1 register to not respond ?
Thanks
Anat