Skip to main content
Visitor II
January 26, 2024
Question

UART transmit command not working

  • January 26, 2024
  • 2 replies
  • 1466 views

Hi,

I'm using Nucleo H7A3ZI-Q board and I'm trying to use HAL_UART_Transmit function to print hello world in serial monitor(on puTTy). Code is building without any issues but there's no characters showing in serial monitor, I tried the same  code on H7 development kit and still have the same issue. I know the code is correct as I tried it with Nucleo F401RE board previously. In code I created an array and assign hello world to it, then give the transmit command. What could be the issue here?

    This topic has been closed for replies.

    2 replies

    Super User
    January 26, 2024

    Hi,

    >What could be the issue here?

    - wrong port/pin

    - wrong uart

    - wrong speed setting

     

    On which uart ? + speed ? -> pin xx ? -> connected to ??   --- you try to send ?

    jsw2000Author
    Visitor II
    January 26, 2024

    I haven't connected UART pins to anything, previosly with Nucleo F401RE, I managed to use UART 2 and get the signals to serial monitor without connecting the UART 2 pin to any other hardware. Can I do that here as well?

    Super User
    January 26, 2024

    >Can I do that here as well?

    Look at the circuit of your board, to see, what is connected to st-link VCP .

     

    ed

    AScha3_0-1706254310993.png

    PD8 + 9 ---- USART3  --> connected to VCP

    so check: usart3 is on PD8+9  , and use usart3 .

    Super User
    January 26, 2024

    > I know the code is correct as I tried it with Nucleo F401RE board previously.

    Don't fall into the trap that some code works on STM32F4 therefore it's "correct" and therefore it'll work on whatever you want to run it on. Chips are different. There is likely more code at work than just the snippet you're transferring between projects.

    A lot easier to debug projects when you show the code.