Hello,
We are developing firmware on an LPC54605 MCU. Our product is a USB Host HID (full speed) and must use MCU deep sleep for power saving. The device sleeps for a while, then wakes up to read data from the HID device, and then goes back to sleep. We are having a problem that sometimes the USB will not enumerate after we come out of deep sleep.
We are using the code from the SDK example "host_hid_generic_freertos", and we see many enumeration failures. We try to stop and restart the host when this happens, and some time it helps, but often does not, even after very many attempts. Some devices have success the first time, and then fail every time after that. A warm reset of the device (not power cycle) will cause another success.
Questions:
1. Is there a procedure that will allow us to reset the USB stack to the same state it has after MCU reset, but without doing a full MCU reset?
2. Is there some other procedure for reinitializing the USB host to recover from enumeration failure?
3. Is there an App Note and/or example project for using USB host and Deep Sleep? That would be very useful.
NOTE: we have found that cycling VD5 and reinitializing USB hardware prior to applying VBUS causes the same issue, i.e. fails to enumerate. We have evidence that suggests the on-chip USB peripheral is in a bad state...expected interrupts do not fire... we see port change, port change/attach events followed by nothing but SOF events. We can provide more details if needed.
Thanks!
Hi @GarthR
I would like to apologize for the delay. We are experiencing a high volume on LPC requests these days. I really appreciate your patience.
Regarding your questions, there are a couple of threads on our community that might be very helpful. Please take a look here: https://community.nxp.com/t5/Kinetis-Design-Studio/How-to-recover-from-USB-errors-or-how-to-reinitia...
And here too, regarding USB Host and Deep Sleep:
Hope this can help you and solve your questions, please let me know if you have more questions. I will stay tuned to your reply.
Sincerely,
Pablo Avalos.