2011-08-06 09:08 AM
Hi seems I am haveing problem no body ever had before!!!
PLEASE HELP !!!!!!!
Using board STM3210C_EVAL , Compiling VCP Demo project for STM3210C_EVAL board (no modifications made to originaly downloaded code)
Latest driver for Virtual comport is installed 1.3.1.0.
Problem looks same on 5 PC running XP and Vista
Problem looks like this!!!
a) Plugging USB cable to PC.
b) Virtual com port detected and all is fine in device manager and com port is open with no problem.
com port can be open and closed as many times as needed until microcontroler reset or usb cable disconnect and reconnect.
a) After disconnect of usb cable or and reconnect
b) port is detected and displayed in device manager
all apears to be normal but opening com port returns error
and it will be not possible to open port until next reset or usb cable plug unplug
2011-08-08 12:08 PM
I have been fighting this exact issue with a different USB stack. The problem, I have found, lies with the usbser.sys file that is used by the vcp driver. If the device is disconnected while the port is open, then the port must be closed before the device is connected again.
I was able to work around it by checking for the windows message WM_DEVICECHANGE and the DBT_DEVNODES_CHANGED event. Anytime this is received I close the port (if opened). This seems to work, but is very kludgy. I used this as an example: http://msdn.microsoft.com/en-us/library/aa363432%28v=VS.85%29.aspx2011-08-29 10:04 PM
Hi,
I am also working on the same EVAL-Board. The problem raised by you occurs when we Resets or connect /disconnect USB cable while Hyper terminal is still open (connection is not closed). The proper way to do this is that before resetting the USB we have to first disconnect the establised connection and then Reset the USB, now it will work fine while establishing new connection. Or we can close the Hyper terminal befor resetting the device and then start it again. But the first way seems to be easy as it avoids reopening hyperterminal program. Hope it will answer your query Regards