USB Power Event Panic #12796
Labels
area: USB
Universal Serial Bus
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
A panic appears to occur on a USB power event.
To Reproduce
As best as I can tell, I've had a tough time reproducing this consistently, but using mcuboot master with zephyr and an app with a variety of stuff enabled via prj.conf seems to cause the problem sometimes.
My prj.conf for the app that causes the fault.
Expected behavior
No panics!
Impact
This prevents my application from working with mcuboot, which prevents OTA updates.
Screenshots or console output
GDB output as I was debugging this problem
Environment (please complete the following information):
Additional context
It appears that sometimes a usb power event occurs before the usbd_ctx has been initialized from usb_dc_attach. I think that is the cause of the problem, because then the usb_work struct is likely to be uninitialized.
I'd guess this happens because the clock device is initialized before the usb device where the callback is initially setup in an IRQ, this IRQ must be occuring before the subsequent usb_enable is called.
Why that happens beyond my current understanding of zephyr and the usb device driver.
The text was updated successfully, but these errors were encountered: