2014-02-22 08:03 AM
I have a problem with serial-over-USB port reconnection after stm32f4discovery board reset (for instance, re-programming) - with the native USB controller port, not the uart dongles.
I have originally reported this issue to ChibiOS since I can reproduce this with a ChibiOS standard demo application, but they believe the issue is within ST VCP driver. I wonder if anyone can maybe reproduce this issue without ChibiOS and, in case the issue is reproducible, how do we go from there? Here are the detailed steps to reproduce: 1) make ARMCM4-STM32F407-DISCOVERY-MEMS ChibiOS demo (I am using 2.6.3 now but the same issue was present in 2.6.1 and probably before) 2) program ch.hex, connect micro USB cable. My windows 7sp1 has driver version 1.3.1, that's the latest version 3) connect to the serial port with putty - shell is responding as expected 4) keep putty open, reset stm32f4discovery with the black button 5) windows make the 'device disconnected/device connect' sound as expected 6) press any key in putty, PuTTy fatal error: error writing to serial device reported, as expected 7) close putty Now the issue: 8) start putty again. Actual result: Unable to open connection to COM.... Unable to open serial port. That's while the port is available in the Device Manager. Expected result: I would expect putty to establish a new connection the only way to get putty connected again is to reset stm32f4discovery one more time, which is pretty confusing. This is not a putty issue because originally I've experienced this with my own application which was talking to my MCU using COM port.2014-02-26 01:50 AM
''Sung, I am sure it is the language barrier but I find your response a little bit offensive.''
Well, I am sorry but you are the 3rd person that I have come across in this forum to ask this stupid question! ''While I see your point I cannot agree with it. Nowhere in http://en.wikipedia.org/wiki/Serial_port I see that it HAS to be always on, where are you taking this from? '' No where in the Wikipedia page does is say EXPLICITLY that serial ports connect and disconnect. Remember this is a VIRTUAL serial port. It is emulating a RS232 UART. There is NO WAY for a UART on a PC ro be dynamically unplugged. There is therefore no reason for any terminal emulation program (such a PuTTY) to support any signal to disconnect a serial port. ''Times are changing and hardware is changing. Your average serial port these days is not a DE-9 connector, so what?'' Hardware is changing BUT this does not change the fact the VCP is trying to emulate OLD HARDWARE! Not true, some manufactures (my Dell under my desk) still has 9P DType for serial! If you want something that supports dynamic connection/disconnection - pick another USB device that supports it eg USB MSC.2014-02-26 02:06 PM
Wow, that's one big mouth!
I have no choice but to report your behavior, I hope they do moderate this forum.2014-03-25 09:09 AM
2016-09-01 12:50 AM
Sorry if I re-uploadan old post, but I've a similar problem, but much more annoying.
I'm a very dummy using STM32 Nucleo and I'm realizing my first test. In particular I've written a code to write something on RS232 Serial terminal.The first time I open putty I'm able to see the correct string of chars, but if I unplug the USB connection and I reconnect it putty say ''unable to open connection'' even if it is available in the Port Devices and wiht a correct driver (please not I've update the driver to the newest version present on ST site)The only way to be able to see the correct connectin is TO REBOOT THE PC !... and also now I see the connection only the first time when I unplg and plug again the USB cable I must REBOOT the PC.Pleas help me to find a faster way to re-establisch the Serial port connectionRegards2016-09-01 01:49 AM
Some Win USB drivers for Serial/USB devices seem to have the inconvenient ''feature'' to reassign different COM port numbers upon dis-/reconnect.
Should be easy to find out on PC side. A workaround would then be to simply change the port for Putty.