-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Device crashes when starting with USB connected #15073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @pawelzadrozniak , is this something new? |
|
It is broken after bdde5fd, #14875. With current master, the device does not exit the while loop inside nrfx_usbd_enable()
|
Hi @carlescufi , sure. Will be back in a sec. |
Hi @carlescufi , I reverted |
Fixes bug introduced in zephyrproject-rtos#14875. USBDETECTED event is be generated on cable attachment and when cable is already attached during reset, but not when the peripheral is re-initialized. When USB-enabled bootloader is used, target application will not receive this event and it needs to be generated again. This commit implements a check against driver being enabled multiple times in case of application without bootlader starting with cable attached (both "fake" and "real" events are generated). Such dirty trick allows bootloader to leave the peripheral in any state before jumping to target application. Fixes zephyrproject-rtos#15073 Signed-off-by: Paweł Zadrożniak <[email protected]>
Fixes bug introduced in #14875. USBDETECTED event is be generated on cable attachment and when cable is already attached during reset, but not when the peripheral is re-initialized. When USB-enabled bootloader is used, target application will not receive this event and it needs to be generated again. This commit implements a check against driver being enabled multiple times in case of application without bootlader starting with cable attached (both "fake" and "real" events are generated). Such dirty trick allows bootloader to leave the peripheral in any state before jumping to target application. Fixes #15073 Signed-off-by: Paweł Zadrożniak <[email protected]>
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Connect USB cable, observe USB working fine. Reset device - observe device dying.
Expected behavior
Device should be able to work fine when starting with USB connected.
Impact
Showstopper
Screenshots or console output
Environment (please complete the following information):
zephyr ncs:
0bf5263b0522bb5cfac84eefdfdee86dc2c67e3e
(upstreamd3bb3cf
)Additional context
N/A
The text was updated successfully, but these errors were encountered: