Content originally posted in LPCWare by kalfalfa on Tue Apr 24 14:07:53 MST 2012
Hi,
I'm using LPC1343.
In my firmware, I'm using the ROM USB HID driver. I would like to be able to disconnect this USB device (SoftConnect), and then call ReinvokeISP and have the device come back up as a Mass Storage device for firmware programming.
ReinvokeISP works fine if called before I initialize and connect the ROM USB HID driver - but if called after the device is already initialized/enumerated/etc. with the ROM USB HID, it fails.
What I do is:
1. Disconnect USB using '(*rom_sec0)->pUSBD->connect(FALSE);' Which is working - device detach is detected.
2. Call IAP_ReinvokeISP(); - the device enters the ISP firmware and USB connects, but windows show 'Unknown USB device'.
My USB analyzer shows that Windows is trying to read the USB device descriptor, but the device just NAKs forever.
I suspect that something in the USB SIE is in a bad state. What are the required steps to bring the USB system into a known good 'reset' state manually, so that a subsequent connect and enumeration as a completely different device will work?
Thanks,
-Patrick