6 years, 8 months ago.

COM port closes after about 10 minutes connecting USB port (on Windows 32bit)

After connecting, NUCLEO-F303K8 can communicate with PC via serial COM port. However, after about 10 minutes, it cannot send/receive any commands. The COM port seems to be closed suddenly.

I found that it occurred on Windows 32bit but didn't occur on Ubuntu 64bit. And it occurred using NUCLEO-F303K8 but didn't occur using LPC1768.

I suspect the driver of NUCLEO-F303K8 for Windows 32bit has some problem.

Does anyone have any advice on solving this problem?

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F303K8T6 microcontroller.

1 Answer

6 years, 8 months ago.

Hello,

The COM port driver on the host is native to Windows so there is nothing specific to the Nucleo (ST-Link) at this level. Your description shows that a lockup condition seems to happen either from time to time (race condition for instance) or after an event that happens meanwhile. The fact that it works in other contexts is not enough to conclude where resides the root cause (unfortunately), the issue is probably a conjonction of several elements in the failing context. We tried to reproduce on our side with your application on W7 64 bits and on an old 32 bits machine (but with XP), but we found no issue so far.

Just few ideas in order to allow further investigations if you can:

1. May you have a look on power scheme settings of your PC ? If a sleep mode is enterred, powering off the ST-Link (even temporarily), the wake-up sequence would need a full restart of the application (and perhaps also a restart of the Nucleo by unplugging the USB cable)

2. Is it possible to probe the Rx/Tx signal on the Nucleo, just to see if after the failure, the issue resides in the downstream or upstream ?

3. After the issue may you please check in the PC device manager (control panel-Hardware and Sound-Devices and Printers), if all devices are working well, especially the "STMicroelectronics STLink Virtual COM Port" (right click - properties - device status)

I hope this will help

Best regards

Hello,

Thank you for your reply!

I checked as follows. 1. My PC did not entered to sleep mode. 2. After the issue happened, the Rx/Tx are high level. It seems Nucleo is working except COM port. 3. After the issue, I confirmed all devices are working well.

When I was debugging with the program which showed above comment, I found another issue, which probably related this issue.

After my PC sent two characters to my Nucleo via COM port, it could not send/write any more. It means that some problems happened when "PC.putc(PC.getc())" is executed if the buffer has two characters. Also I checked it using LPC1768, but there is no problem.

Is there any difference between LPC1768 and Nucleo in terms of "getc()" or "putc()"?

I would like to get any comments.

Best regards,

posted by H Watanabe 23 Aug 2017