Skip to main content
Visitor II
January 13, 2025
Solved

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

  • January 13, 2025
  • 5 replies
  • 4314 views

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

    This topic has been closed for replies.
    Best answer by Andrew Neil

    @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

    5 replies

    Super User
    January 13, 2025

    @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

    Visitor II
    January 13, 2025

    How can I determine that?

    Super User
    January 13, 2025

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

     

    Visitor II
    January 13, 2025

    hdferguson3_0-1736793021922.png

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

    Super User
    January 13, 2025

    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)

    Visitor II
    January 13, 2025

    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!

    Super User
    January 13, 2025

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

     

    Visitor II
    January 13, 2025

    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. 

    Super User
    January 14, 2025

    @hdferguson3 wrote:

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


    You could leave a comment on the tutorial in question.

    Nothing wrong with YouTube per se - ST themselves have loads of tutorials on YouTube

    https://www.youtube.com/@stmicroelectronics