Skip to content
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

H7B3: USB with DMA generates many interrupts #278

Open
PiPointX opened this issue Sep 19, 2023 · 1 comment
Open

H7B3: USB with DMA generates many interrupts #278

PiPointX opened this issue Sep 19, 2023 · 1 comment
Assignees
Labels
bug Something isn't working hal HAL-LL driver-related issue or pull-request. st community Also reported by users on the community.st.com usb USB-related (host or device) issue or pull-request

Comments

@PiPointX
Copy link

Describe the set-up
I'm using a H7B3 on a custom board. On this board I want to use USB with Azure USBx.
The USB configuration in CubeMX is:

  • USB host only
  • DMA enabled
  • internal PHY
  • Speed: FullSpeed

I'm using CubeIDE 1.10.1.
The USB device I want to use with the USB Host is a Prolific-Device.

Describe the bug
Regarding the Reference Guide, USB interrupts like NAK, NYET, ... should be handled automatically by the DMA. But when I use the confguration above the interrupts never get disabled in USB_HC_StartXfer. And the interrupts get fired very often and have a huge influence on the performance of the controller.

How To Reproduce

  1. Set a breakpoint into the function USB_HC_StartXfer.
  2. Connect a prolific device
  3. Step through function
USBx_HC((uint32_t)ch_num)->HCINTMSK &= ~(USB_OTG_HCINTMSK_NYET |
                                               USB_OTG_HCINTMSK_ACKM |
                                               USB_OTG_HCINTMSK_NAKM);
  1. The code block above gets neve reached because of this check here:

if (((USBx->CID & (0x1U << 8)) != 0U) && (hc->speed == USBH_HS_SPEED))

Additional context
It has to do with this issue here: https://community.st.com/t5/stm32-mcus-products/stm32f4-stm32f7-usb-host-core-interrupt-flood/td-p/436225

But the interrupts still get triggered even when DMA is enabled

Screenshots
If applicable, add screenshots to help explain your problem.

@RJMSTM
Copy link
Contributor

RJMSTM commented Sep 20, 2023

Hello @PiPointX,

Thank you for this report. We will get back to you as soon as we analyze it further. This may take some time. Thank you for your comprehension.

With Regards,

@ALABSTM ALABSTM added st community Also reported by users on the community.st.com usb USB-related (host or device) issue or pull-request hal HAL-LL driver-related issue or pull-request. bug Something isn't working labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hal HAL-LL driver-related issue or pull-request. st community Also reported by users on the community.st.com usb USB-related (host or device) issue or pull-request
Projects
Development

No branches or pull requests

3 participants