-
Notifications
You must be signed in to change notification settings - Fork 2k
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
drivers/usbdev_synopsys_dwc2: fix and re-enable DMA mode #19397
drivers/usbdev_synopsys_dwc2: fix and re-enable DMA mode #19397
Conversation
Use the largest instead of the smallest number of available EPs for this definition. This became necessary to be able to use all EPs of a USB OTG HS peripheral if enabled.
Since the stm32f429i-disco uses the USB OTG HS instead of USB OTG FS peripheral, the number of available EPs is sufficient for this application. With the change of defining the largest number of available EPs for USBUS instead of the smallest number, the board can use all EPs of the USB OTG HS peripheral.
f8d79d9
to
1cd128b
Compare
I can have a look at it next week. |
* valid for all devices, the smallest number of EPs must be used for | ||
* multiple USB devices. | ||
* @note USBUS allows only one definition of the number of available EPs, which | ||
* is then used for all devices. To be able to use all EPs for devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a device in this context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
device
means in this context one USB device instance of type usbdev_t
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, I also tested on same54-xpro
for good measure, even though it's not affected by the change.
The new doc comment is a bit confusing to me though. Since this fixes a regression, I think it should be in the release.
Fixes are always welcome! |
bors merge |
Build succeeded: |
Does this need a backport? |
Hm, indeed. Good catch. I suspect that backporting PR #19472 makes no sense, or at least has no effect without backporting that PR, if it doesn't actually impact the function. So yes, we should also backport this one. |
I think this is actually in already in I think... my bad. |
Contribution description
This PR fixes the DMA mode for all STM32 USB OTG HS cores (including that for STM32F4xx CID 1.xxx) and reenables it. It fixes remaining problems in issue #19359.
This PR includes also includes some changes that are needed to use the DMA mode:
periph_usbdev_hs
feature is added in Kconfigperiph_usbdev_hs
feature is added in board definition ofstm32f429i-disc1
stm32f429i-disco
is removed from blacklist intests/usbus_cdc_ecm
since it uses the HS peripheralTesting procedure
The following tests should work
Test results
Test results
Test results
Issues/PRs references
Fixes #19359