Skip to main content
Visitor II
July 3, 2024
Question

STM32 NUCLEO-H743ZI2 UART Baud rate mismatch problem

  • July 3, 2024
  • 3 replies
  • 2051 views

Currently i am working with nucleo-h743zi2 board. I set the Baud rate in CubeMx to 115200. In the Hercules program, when I set the baud rate to 115200, the data does not flow correctly, but when I set the baud rate to 38400, it flows correctly. Why might this problem occur? My CubeMx settings can also be seen in the photo.

uart.PNG

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    July 3, 2024

    Hello,

    Could you please share a minimal project that reproducers the issue?

    Are you using USART3 and STLINK Virtual comport?

    ChaoticAuthor
    Visitor II
    July 4, 2024

    I solved the problem. I was using HSE as clock. When I looked at the UART documentation for this card, I saw that clocks such as HSI, LSE should be used instead of HSE. Indeed, when I changed the HSE, the problem disappeared and communication took place smoothly with the same baudrate on the transmitter and receiver sides. If anyone knows a way to use HSE here, please let me know.

    Technical Moderator
    July 4, 2024

    Hello,


    When I looked at the UART documentation for this card, I saw that clocks such as HSI, LSE should be used instead of HSE. 

    Where did you find this information? could you please share screenshot of that? because this doesn't make sense!

    ChaoticAuthor
    Visitor II
    July 5, 2024

    You can find it in the document in ST website which name is "STM32H7-Peripheral-USART interface (USART)". Write it google you will find this document. I attached the photo of the part where I solved my own problem.

     

    us.PNG

     

    ChaoticAuthor
    Visitor II
    July 5, 2024

    Before the problem is solved, i chose the HSE from the clock configuration in CubeMX. After i read the documentation, i chose the HSI clock and my problem is solved. Uart receiver and transmitter is working fine now. I dont change anything except this.

    Technical Moderator
    July 5, 2024

    Could you please share your ioc file where you selected HSE as clock source?