-
Notifications
You must be signed in to change notification settings - Fork 716
USB cherry picks for NCS 3.1.0 #3104
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e data Stop processing microphone data on error or when streaming ends. This avoids I2S read timeouts due to audio data not being available while streaming. Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit 943fc6f)
This commit resolves a bug where the USB Endpoint provided by the HID driver was incorrect when in High Speed mode. Signed-off-by: Victor Brzeski <[email protected]> (cherry picked from commit c0e1268) Signed-off-by: Tomasz Moń <[email protected]>
Change the macros to have only one plus operator per term. This is purely stylistic change, no functional changes. Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit 673f324)
…ndpoints Enable double buffering on data OUT endpoints to allow USB stack to enqueue next transfer as soon as possible. This is especially useful when operating at High-Speed where there is significantly less time between subsequent SOF packets. Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit 2f343bf)
…nqueue Release receive buffer on failed endpoint enqueue. Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit f9ac318)
…ndpoint Enable double buffering on isochronous feedback endpoint to avoid sending ZLP instead of feedback information. Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit 223d23a)
…ing incompisoout Rearm isochronous endpoints when handling incomplete iso out interrupt to make it possible to rearm the endpoint in time (before SOF), especially when operating at High-Speed. Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit 6eb2fa8)
Incomplete iso IN/OUT is just informative and its occurrence does not
prevent the endpoint from actually transmitting/receiving data. Such
"late" isochronous transfers, which are perfectly fine according to USB
specification, were observed on Windows host with nRF54H20 running
explicit feedback sample operating at High-Speed.
The incorrect handling manifested itself with "ISO RX buffer too small"
error message. The faulty scenario was:
* incompISOIN handler does not find any matching endpoint
* incompISOOUT handler disables endpoint, discards buffer and sets
rearm flag
* next DWC2 interrupt handler iteration after reading GINTSTS
* XferCompl interrupt on iso IN endpoint
* XferCompl interrupt on iso OUT endpoint
- transfer was actually happening to the buffer discarded in
incompISOOUT handler
- XferCompl handler modified the next buffer
* GOUTNakEff interrupt, iso OUT endpoint EPDIS bit is set
* EPDisbld interrupt, rearm flag set
- the buffer modified by XferCompl is used and fails because it is
not large enough
Modify the sequence so it accounts for host actions and the above faulty
scenario no longer causes any problems.
Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit 8d1f7b3)
9190dcd to
4dd3269
Compare
bjarki-andreasen
approved these changes
Jul 30, 2025
carlescufi
approved these changes
Jul 30, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.