We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I'm using a LPC2478 with RL-USB CDC mode and is reset when the processor is USB communication stops working, returning only if the USB cable is disconnected and reconnected. Already tried using the function usbd_reset_core but to no avail. Anyone know how to fix this?
On the device side, soft-detach using "usbd_connect(__FALSE);", and after a couple of seconds, soft-attach by "usbd_connect(__TRUE);" On the PC side, periodically poll the existence of target COM port. When your app detects disconnection, close the COM port. When the COM port appears again, open the COM port.
Anyway, you would better to find the cause of communication drop, and fix it. USB hardwares have error detection/recovery feature. It's enough in home/office environment. But if your board would make noise more than supposed, hardware recovery could be defeated. Noise source, such as a power relay, should be isolated from the USB MCU, so that it doesn't disturb the USB hardware.
Tsuneo
Hi, thanks for the reply!
In my application the user can reset the hardware when he wants. I also reset via firmware when I clear the memory settings. In such cases, the USB port stops responding.
I made the following:
usbd_init(); usbd_connect(0); os_dly_wait(5000); usbd_connect(1);
But the change is not detected in the drive and the serial port is not there. The only way to get back to work is to remove and reconnect the USB cable. Tried using usbd_reset_core, but had no success.
Any more ideas?