cancel
Showing results for 
Search instead for 
Did you mean: 

Write time-out on STLink UART

pietrow
Associate

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.

3 REPLIES 3
TDK
Guru

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

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.

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