STM32CubeF4 icon indicating copy to clipboard operation
STM32CubeF4 copied to clipboard

USB Host implementation broken when sending transfers that are larger than max packet size

Open eranrund opened this issue 3 years ago • 4 comments

I ran into the following issues when trying to send a transaction that is split into multiple transfers.

  1. The code here does not take into account the FIFO size.

  2. For large transfers, the code here enables the ptxfempty interrupt, but the interrupt handles ignores it as seen in https://github.com/STMicroelectronics/STM32CubeF4/blob/9f5ea7421d22c724516d00218b350d1e09a54a2c/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_hcd.c#L521-L524

Am I missing something or this functionality just super broken?

eranrund avatar Sep 15 '20 20:09 eranrund

Hi @eranrund,

Your question will be forwarded to our development teams. I will get back to you as soon as they provide me with their answer.

With regards,

ALABSTM avatar Sep 16 '20 16:09 ALABSTM

Thank you @ALABSTM

eranrund avatar Sep 16 '20 17:09 eranrund

ST Internal Reference: 126900

ALABSTM avatar Apr 25 '22 08:04 ALABSTM

Hi @eranrund,

I hope you are doing well. Back to you about this point you raised. According to our development team:

  • Currently, transfers larger than the maximum packet size are handled at MW library level. This means the user has to use whether the ST USB lib or the Azure USBX lib.
  • The ST USB HAL driver does not handle this case for the moment.
  • Hence, in case another lib is used along with the ST USB HAL driver, such transfers are very likely not to be handled.

A request has been submitted to have this updated. The development teams will deeper analyze it before deciding whether to go for such change or not. I will keep you informed.

With regards,

ALABSTM avatar Apr 25 '22 08:04 ALABSTM