Content originally posted in LPCWare by wsyuen on Fri Jun 17 04:26:15 MST 2011
Dear All,
I'm using the USBHID example code to work as a USB keyboard.
The code will initial USB when power on (plug the USB cable to computer) so it will be recognised as a USB keyboard.
In my program, I have an update process. I will self-reset (by WatchDog) the system after I have done an update process.
However, in the status of USB already initialised and connected, if I self-reset the system again, it will run again the USB initialisation code:
USBIOClkConfig();
USB_Init();
USB_Connect(TRUE);
In this case, the USB will be damaged.
How can I keep the USB works in this case?
May be I can first disconnect the USB by software before the self-reset, but how to do that?
In the hardware, I don't have a SOFT_CONNECT pin which connect to the D+ of the USB pin. The D+ of USB pin is always pull-high with a resistor.
Please advise.
Thank you.
wsyuen.