Skip to main content
pietrow
Associate
October 26, 2020
Question

Write time-out on STLink UART

  • October 26, 2020
  • 3 replies
  • 1407 views

Hello,

I am using an STM32F072 Nucleo board. I use the STLink USB-to-UART bridge to communicate with the MCU.

From time to time, the STLink UART on the PC gives a write timeout. I cannot reproduce this readily, it does not happen often.

The COM-port still appears in the Windows Device Manager, and I can afterwards still open the port. However, sending bytes is impossible until the STLink is reset.

The UART is not configured with any hardware flow control. Both RX & TX lines are high, as excepted, without activity.

Debugging also remains possible. Through the debugger, I can observe that my program on the STM32F072 has not reset or is not behaving strangely. It is simply waiting for the next characters.

Could anyone suggest a way to debug this further? Thanks in advance.

This topic has been closed for replies.

3 replies

TDK
October 26, 2020

It sounds like an issue with the ST-Link or with the terminal program you're using.

> From time to time, the STLink UART on the PC gives a write timeout.

What exactly happens here? Screenshot would be helpful.

"If you feel a post has answered your question, please click ""Accept as Solution""."
pietrow
pietrowAuthor
Associate
October 26, 2020

Hello TDK,

I have a long-running Python script that regularly writes to the STLink UART. Occasionally it crashes with a "Write time-out" error.

When I try to restart the script, re-opening the port works fine, but writing gives the same error. The same behaviour is seen in an interactive Python shell or in PuTTY, so I tend to think the PC software is not the problem.

I don't have screenshots, sorry, but I think it is independent of the PC-side software.

TDK
October 26, 2020

You might be right, although I'm not convinced this isn't a PC software issue. I have made extensive usage of the VCP port (usually using Python "serial" module) and have never seen this issue.

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