Skip to main content
rsawa
Associate
September 11, 2018
Question

STM32L4R5 UART not working

  • September 11, 2018
  • 7 replies
  • 2410 views

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

    This topic has been closed for replies.

    7 replies

    waclawek.jan
    Super User
    September 11, 2018

    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
    rsawaAuthor
    Associate
    September 11, 2018

    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
    rsawaAuthor
    Associate
    September 11, 2018
    rsawa
    rsawaAuthor
    Associate
    September 11, 2018
    rsawa
    rsawaAuthor
    Associate
    September 11, 2018

    Please check above files for the UART and GPIO configurations

    rsawa
    rsawaAuthor
    Associate
    September 12, 2018

    Hello,

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

    Thank you

    Rohit.

    waclawek.jan
    Super User
    September 12, 2018

    Please mark as resoved (select "best")