cancel
Showing results for 
Search instead for 
Did you mean: 

CMSIS USART2 configuration problem

Manuel-Baez
Associate II

Hello everyone!

This is my first post in the community, sorry for the grammatical error, my English isn't very good.

At this moment I am working with a Nucleo STM32L476 board and I want to configure the usart2 using CMSIS HAL, I have already configured the CR1, CR2, CR3, and the BRR registers of USART2 module, also I have configured the AH2BENR, CCIPR registers of RCC module and the GPIO PA2 and PA3 as alternative function (RX, TX) into the MODER and AFR[0] registers of GPIOA module, I am using the HSI with the PLL for a PCLOK=80MHz, and a BRR = 208D for 9600 bauds, but the data receiving by the serial port console integrated into the STM32CubeIDE aren't the same that I write in the TDR register, I have included the code of my project in the post, if someone could me explain where the error is, I would gratefully the help.

Manue Baez
1 REPLY 1
Manuel-Baez
Associate II
 
Manue Baez