AnsweredAssumed Answered

NUCLEO-F401RE ST-LINK/V2-1 not reliably sending data to USB host

Question asked by Dan K. on May 25, 2014
Latest reply on May 27, 2014 by S C
On the NUCLEO-F401RE, using the STM32F4xx HAL UART driver function HAL_UART_Transmit() to send a sign-on message to the ST-LINK/V2-1 virtual COM port to the host PC, I have noticed the sometimes the full sign-on message of my application is not sent to the PC, just part of it is sent. The rest of the message will be sent the next time the any data (even just one character) is sent by the STM32F410RE.

I have written a simple application for the NUCLEO to periodically (every few seconds) send a fixed string of characters to the PC via the ST-LINK/V2-1 virtual COM port to better characterize the problem. The problem occurs fairly frequently but data is never lost, just delayed in the ST-LINK/V2-1. I have confirmed, using a logic analyzer on the MCU Tx pin, (CN3 Rx pin) that the data is correctly leaving the NUCLEO MCU and entering the ST-LINK MCU. However, it does not always all arrive on the PC's serial communications program. I have tried two different PC's: Windows XP SP2 and 64-bit Windows 7 with similar results with several terminal programs - Hyperterminal, ClearTerminal, PuTTY, Realterm, and Tera Term. I have also tried two different versions of the ST-LINK/V2-1 firmware: V2.J19.M3 and V2.J20.M4 with similar results. Also, the problem appears to happen more frequently at faster baud rates. I've seem the problem occur at 115200, 57600, and 38400 baud rates, but does not seem to occur at 19200 baud.

When data is waiting in the ST-LINK/V2-1 (I assume that's whats happening as I do not have a way to monitor the USB bus to see for sure), sending data from the PC to the ST/LINK is correctly received, but does not cause the blocked transmit data to be sent (unless the received data is echoed, in which case any of the blocked data will be sent).

Again, no data is getting lost, only sometimes delayed. This is unacceptable as I have applications that need the data to be sent reliably to the USB host when an event occurs at the NUCLEO board.