Skip to main content
RTerr.1
Visitor II
May 2, 2022
Solved

Bug report, USB Host hangs on STM32F417, issue in HAL library used by MX

  • May 2, 2022
  • 3 replies
  • 1826 views

Bug report in HAL.

Under heavy load, the USB Host stack can hang due to the EPDIR flag on an IN Channel being incorrectly cleared by the HAL.

stm32f4xx_ll_usb.c, function USB_HC_Halt, clears EPDIR in the case that the request queue is full. This routine is called by IN & OUT interrupt handlers and can there leave EPDIR wrongly reset for an IN channel.

In the case of using DMA, tech ref says (in section 'Halting a Channel') that code does not need to check for request queue full - so I think the code should probably take DMA into account as well.

I am using DMA, I have commented out the process queue check.

This topic has been closed for replies.
Best answer by Walid ZRELLI

Hello @RTerr.1​ ,

Could you please indicate which HAL version is used? Because EP dir clear has already been fixed in HAL during HAlt.

It looks like you are using a quite old FW.

Thanks in advance.

BeST Regards,

Walid

3 replies

Walid ZRELLI
Visitor II
May 4, 2022

Hello @RTerr.1​ ,

Thank you for your contribution.

This issue has been reported internally. I will keep you updated as soon as possible.

BeST Regards,

Walid

Walid ZRELLI
Visitor II
May 4, 2022

Internal ticket number: 127522(PS: This is an internal tracking number and is not accessible or usable by customers)

Walid ZRELLI
Walid ZRELLIBest answer
Visitor II
May 10, 2022

Hello @RTerr.1​ ,

Could you please indicate which HAL version is used? Because EP dir clear has already been fixed in HAL during HAlt.

It looks like you are using a quite old FW.

Thanks in advance.

BeST Regards,

Walid