9 years, 4 months ago.

COMPORT lockup after board reset...

I have a LPCXpresso11u68 with both mini-usb ports connected to my PC. I run with a terminal emulator connected to both ports, and I see output from my program on both ports. (so far so good).

The problem I'm having is that when I reset the board, the COMPORT on the PC that uses the Mbed Virtual Serial Port driver locks up (this is the port that uses the "serial.inf" driver from mbed). If I close the terminal emulator and then attempt to reconnect to the port, it is not seen as an available comport (however it is still listed under "Ports" in Device Manager). I've found two ways to resolve this:

1. I have to disconnect the "other" usb port (running mbed Serial Port) and plug it back in.

2. I discovered that if I issue a 'Break' on the "other" port, that releases the comport.

In both of these cases I'm assuming the board is reset and this somehow releases the comport and my terminal program can access it again.

I've seen this problem with uCon and TeraTerm. I wrote uCon (http://www.umonfw.com/ucon), so I can update the code (if possible) to deal with this; however, so far I've found no way to do it (aside from the manual intervention mentioned above).

Note that this is not specific to the 11u68, it happens with other boards as well (i.e. Freescale KL25z).

UPDATE: I've found that if I Disable/Enable the affected USB port in Device Manager that cleans up the port and allows the terminal program to reconnect. I guess if I knew how to do that programmatically that would do the trick too.

Any thoughts on this?

Question relating to:

1 Answer

9 years, 4 months ago.

Hi Ed,

Have you assigned a permanent COMx number to your device on your PC? (The COMx id Number changes by default) If not try control panel-Device Manager select Ports COM and LPT (Whilst your Board is in a 'connected state') Select the port you wish to use, Right click and select Properties Select Port Settings 'leaf' Select 'Advanced' and then COM Port Number Select one of the listed (unused ports) you wish to use. Then on every Reset or indeed 'Pluging in' of your USB port THAT number should appear every time and your Term emulator (real Term Hyper etc.) should be able to reconnect.

Regards

Martin

Martin, first of all, thanks for the response... If I understand your suggestion correctly, you're assuming that after the reset, the comport comes back with a different number. That's not the case here. What happens is for some reason the comport just doesn't show up as an available port when trying to connect (TeraTerm or uCon, and I'm guessing others). The strange thing is that it IS still there (with the same COM#) when I look at it in the Device Manager. The only way to have it show up as an available port to connect to is to do one of the two things I mentioned in the initial post (send BREAK to the other port, or just unplug the board to cause a reset). Does that make sense? Note, I apologize if I'm not understanding your response. If that's the case please try again! I'd really like to resolve this problem without the need to manually reset the board! Thanks again, Ed

posted by Ed Sutter 19 Dec 2014

Hi Ed, No worries, I am using Realterm (and occasionally hyperterm) and both work ok after a reset to my board (a Nucleo 401re board after I had done the previous proceedure. Both utilities have a connect disconnect button too which I use to disconnect when 'dropping' a new binary image after compilation and then press connect and the board reconnects whithout having to unplug the Board from the Host PC. Sorry can't help you more than that. Regards Martin.

posted by Martin Simpson 19 Dec 2014

Thanks, I'll give that a try.

posted by Ed Sutter 19 Dec 2014

Strangely I have a different (more fundamental) problem with Realterm... It connects fine with the comport that is using the "mbed Serial Port" driver, but I see no output at all on the port that is using the "Mbed Virtual Serial Port" driver. Not sure what's up with that, but apparently you and I have slightly different driver configurations or something... Regardless, thanks for the comments... Ed

posted by Ed Sutter 19 Dec 2014