cancel
Showing results for 
Search instead for 
Did you mean: 

UART transmit command not working

jsw2000
Associate II

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?

4 REPLIES 4
AScha.3
Chief II

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 ?

If you feel a post has answered your question, please click "Accept as Solution".

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?

>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 .

If you feel a post has answered your question, please click "Accept as Solution".
TDK
Guru

> 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.

If you feel a post has answered your question, please click "Accept as Solution".