cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4R5 UART not working

rsawa
Associate II

Hi All,

We are using STM32L4R5Zi-p nucleo - 144 board for our development activities. We tried to create a UART code using cube mx. But it seems like data is not sending through TX pin. We checked the TDR register of UART and we can see the data going in the register. We tried UART2 with PD5 and PD6 and we used HAL_UART_Transmit function to send data.

Please let us know where we are going wrong, also it will be really helpful if anyone can share a working UART code of STM32L4R5 for reference.

Thanks

Rohit

7 REPLIES 7

Read out and check the relevant GPIO and UART registers' content.

Also, try to set the Tx pin to GPIO Out and toggle and observe with oscilloscope/logic analyzer (to exclude hardware problem/bad solder joint).

JW

rsawa
Associate II

Hello,

We tried with different pins like UART3 to PD8 and PD9, but still it is not working. We are not able to see anything in CRO also. Since its a new nuclueo board and even with other UARTs it is not working it doesn't seems to be a solder issue. 

Please let us know where we are going wrong. Is there any UART sample example for STM32L4R5ZI?

Thanks

Rohit

rsawa
Associate II
 
rsawa
Associate II
 
rsawa
Associate II

Please check above files for the UART and GPIO configurations

rsawa
Associate II

Hello,

Got the solution. There was some issue with the prescaler settings and the system clock configuration .

Thank you

Rohit.

Please mark as resoved (select "best")