Skip to content

Conversation

@jfischer-no
Copy link
Contributor

…r requests

USBD_MAX_UDC_MSG configures the number of events coming from the UDC driver that the stack can keep. This can be filled very quickly if there would be multiple bus events for some reason, or function handlers of those events are blocked for long time. As a consequence, subsequent events could be dropped, and completed transfers not handled. To avoid it, we can store completed transfer requests in a slist and check it on every event.

(cherry picked from commit 5137439)

…r requests

USBD_MAX_UDC_MSG configures the number of events coming from the UDC
driver that the stack can keep. This can be filled very quickly if there
would be multiple bus events for some reason, or function handlers of
those events are blocked for long time. As a consequence, subsequent
events could be dropped, and completed transfers not handled. To avoid
it, we can store completed transfer requests in a slist and check it on
every event.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 5137439)
@jfischer-no jfischer-no force-pushed the pr-downstream-msgq-fix branch from 09220ea to 2e998ab Compare November 25, 2025 11:41
…troller

The VBUS bounces when the USB connector is plugged in. This can lead to
events VBUS removed and Suspended occurring in that order. With
hibernation support enabled, hibernation request, as result of the
suspend interrupt, will be delegated to the driver thread. Once the
driver thread is scheduled to process hibernation request, the
controller may be already disabled and controller/phy clocks be off. On
nRF54LM20 this leads to CPU crash and a hang.

To avoid this happening, cancel the possible hibernation request after
interrupts are disabled. Although the thread could be still waked up
because of USBSUSP interrupt raised and event posted, this is considered
to be harmless, as there would be a second check in the thread whether
the event is still valid or is cleared in between.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 0d515e7)
NordicBuilder added a commit to NordicBuilder/sdk-nrf that referenced this pull request Nov 27, 2025
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#3529

Signed-off-by: Nordic Builder <[email protected]>
@rlubos rlubos merged commit ddef93b into nrfconnect:main Nov 28, 2025
14 checks passed
NordicBuilder added a commit to NordicBuilder/sdk-nrf that referenced this pull request Nov 28, 2025
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#3529

Signed-off-by: Nordic Builder <[email protected]>
@jfischer-no jfischer-no deleted the pr-downstream-msgq-fix branch November 28, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants