STM32CubeF4
STM32CubeF4 copied to clipboard
USB Host implementation broken when sending transfers that are larger than max packet size
I ran into the following issues when trying to send a transaction that is split into multiple transfers.
-
The code here does not take into account the FIFO size.
-
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?
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,
Thank you @ALABSTM
ST Internal Reference: 126900
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,