Skip to main content
Explorer II
August 25, 2023
Solved

I'm not receiving an data on my usb port, using UART-USART on my NUCLEO-STM32

  • August 25, 2023
  • 7 replies
  • 5169 views

I'm sending a simple string to with HAL_UART_Transmit()  "Hello", and when I look at the Input on my COM-Port there is nothing showing up, just a blank plain text site. Yes I am transmitting at the right baud rate 115200 and I don't have an extra parity bit or anything of that nature. I'm using default settings on everything here. My Board is a NUCLEO-H563ZI with an STM32H563ZIT6. I am using UART 7 to communicate. I will also link my files here. I have basically tried every UARTx and USARTx. When I check the State with HAL_UART_GetState() I get HAL_UART_STATE_READY and as return on the HAL_UART_Transmit() I get HAL_OK.

 

    This topic has been closed for replies.
    Best answer by TDK

    > When I check the State with HAL_UART_GetState() I get HAL_UART_STATE_READY and as return on the HAL_UART_Transmit() I get HAL_OK.

    So it's probably not a code issue.

    What pin are you using? Check in the schematic that it's connected and doesn't require solder bridges to be modified.

    Put a logic analyzer on the pin to verify activity. Initialize the pin as GPIO output instead and toggle it to establish you're monitoring the right pin.

    7 replies

    Explorer II
    August 25, 2023

    I'm sorry I couldn't attach my .ioc file, when I try to attach It the website tells me " the xxx.ioc file does not match its extension file so it was removed". And just so you know I'm using a MacBook Air. (I'm am a beginner in all this so I really don't know if that makes a difference or not. Probably not tho.) Thanks in Advance for the answers, I've been having this problem for days now.

    Explorer II
    August 25, 2023

    I haven't checked the pins though with an oscilloscope if they're really transmitting with the baud rate I want them to. 

    Explorer II
    August 25, 2023
    TDKAnswer
    Super User
    August 25, 2023

    > When I check the State with HAL_UART_GetState() I get HAL_UART_STATE_READY and as return on the HAL_UART_Transmit() I get HAL_OK.

    So it's probably not a code issue.

    What pin are you using? Check in the schematic that it's connected and doesn't require solder bridges to be modified.

    Put a logic analyzer on the pin to verify activity. Initialize the pin as GPIO output instead and toggle it to establish you're monitoring the right pin.

    Explorer II
    August 28, 2023

    Thank u so much I finally got it working :) !!!!!

    ST Employee
    August 25, 2023

    Hello @ichbinGroot , 

    Try to compress the .ioc file to file_name.zip 

    Foued

    Graduate II
    August 25, 2023

    Hi,

    How do you check the data reception? If you're using a COM Terminal, please check you are using the correct configuration.

     

    Ayoub

    Explorer II
    August 26, 2023

    I am using 2 COM Terminals to check if the other one isn't faulty. First one I'm using is Serialtools and the second one is Coolterm. I do have the config right I think because I have the right baud rate,total bits, parity bits, and stop bits configured 115200/8-N-1. The only thing that could be configured wrong is, I have selected RTS and CTS as flow control option and I don't remember having actual wires designated just for that, so that would be something to look into. Maybe software flow control is the way to go here.

     

    Explorer II
    August 28, 2023

    Apparently, this wasn't the solution but maybe it was in the right direction,  because as I said I have no idea how my board and my computer do the flow control...

    Graduate II
    August 25, 2023

    You haven't mentioned the device you're connecting the UART7 pins to the COM port?  USB<>Serial adapter (TTL or RS232)? 

    Explorer II
    August 28, 2023

    I am using an usb-c to usb c cable so the answer would be neither one?Or does Usb c use the same method as a TTL serial adapter?