cancel
Showing results for 
Search instead for 
Did you mean: 

UART Serial Monitor using VS Code, Linux, and ST-Link

hdferguson3
Visitor

I have an older STM32 Nucleo-F746ZG and I want to try and send some serial over the ST-Link. I am in Ubuntu with VS Code. I have successfully built the project and it appears to be running in debug mode. However when I try to connect and read the serial output via Screen, Putty or even the Serial Monitor extension nothing is showing up on the serial port. I have found the ST-Link is at /dev/ttyACM0 and I have added my user to the dialout group, but nothing shows up.

 

I am using UART2 in Asynchronous mode, added interrupt and using VS Code in debug mode. I suspect that this is OS related, but wanted to know if anyone had any suggestions on where to look.

 

I have done other projects with STM32-Nucleo and VS Code so I believe this is a simple error on my part related to the ST-Link usb in Linux.

 

Doug

1 ACCEPTED SOLUTION

Accepted Solutions
11 REPLIES 11

@hdferguson3 wrote:

I am using UART2 


Is that USART the one connected to the ST-Link ?

 

eg, https://community.st.com/t5/stm32-mcus-products/uart-doesn-t-work/m-p/759888/highlight/true#M270155

hdferguson3
Visitor

How can I determine that?

From the board's User Manual and/or Schematics - as illustrated in the linked post/thread

 

hdferguson3
Visitor

hdferguson3_0-1736793021922.png

Oops, let me swap to USART3 and try this again!!! I'll report back.

see circuit :

https://www.st.com/resource/en/schematic_pack/nucleo_144pins_sch.zip

 

 

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

Boom! That was it. I knew I had overlooked something simple. I followed a tutorial and looking back that didn't overly make clear which USART they picked an why. So, make sure you know which USART to use and why. 

 

Thanks!

You said it's, "an older STM32 Nucleo-F746ZG" - does that mean it's previously been used by you and/or others?

If yes (especially if others have been using it), you'll need to check those solder bridges (SB4, SB5, SB6, SB7)


@hdferguson3 wrote:

So, make sure you know which USART to use and why. 


Indeed - it seems to be a common omission!

Which tutorial did you follow? Maybe feed back to the author ...

 

hdferguson3
Visitor

The board has always been mine, I just haven't used it in awhile.

 

The tutorial was a YouTube video I am embarrassed to say.