2022-07-11 09:06 AM
I have a STM32G0B1VET on a test board and tried to use its USB host function to connect a flash drive. It just stuck at the function of "USBH_MSC_SCSI_Inquiry" in file "usbh_msc_scsi.c". It can't pass the state of below:
case BOT_CMD_WAIT:
error = USBH_MSC_BOT_Process(phost, lun);
where the error returns "USBH_BUSY".
Does anybody have an idea what's wrong? Any successful case? Thanks.
Solved! Go to Solution.
2022-07-27 02:27 AM
Hi, a solution that worked in my case has been found on a similar topic. It appears the issue occurs on the row 561 of usb_ctrlreq.c, which you can replace with the following :
ep_descriptor->wMaxPacketSize |= MIN((uint16_t)(LE16(buf + 4) & 0x7FFU), (uint16_t)USBH_MAX_DATA_BUFFER);
As a new member I cannot share links, so the original topic is : FatFs_USBDisk example with USB_FS does not work. When an USB Stick is connected the USBH_MSC_Process never gets further then MSC_READ_INQUIRY. Any hints? , created by MMenz.1 on the 6th of July 2022, 2:36 AM
2022-07-11 09:19 AM
I'm using the latest STM32cubeide, 1.10.1 with STM32Cube FW_G0 V1.6.0.
Further debugging shows the code stops at "USBH_MSC_BOT_Process" function in "usbh_msc_bot.c". It stops at the
case BOT_DATA_IN_WAIT:
URB_Status = USBH_LL_GetURBState(phost, MSC_Handle->InPipe);
It returns "USBH_URB_ERROR" for URB_status and won't go into
if (URB_Status == USBH_URB_DONE)
Please help.
2022-07-20 11:17 AM
Hi, we have the same problem with STM32F769BIT6 since we upgraded USB Host V3.4.0 to USB Host V3.4.1.
We are sure that the guilty is USB Host library.
STM32F7 HAL V1.17.0 or 1.16.2 and CUBE MX 6.6.1 (or 6.5.0) generated code are not the source of this problem. (they are OK with USB Host V3.4.0 and all fail with USB Host V3.4.1).
Seem's that the USB Host V3.4.1. was not correctly tested by ST...
2022-07-23 10:11 AM
@Amel NASRI Hi, seem's that same error rising on stm32g0 and stm32f7 since upgraded to USB Host library v3.4.1.that is delivered with latest respective HAL.
Please can somebody from ST can give a look please?
2022-07-27 02:27 AM
Hi, a solution that worked in my case has been found on a similar topic. It appears the issue occurs on the row 561 of usb_ctrlreq.c, which you can replace with the following :
ep_descriptor->wMaxPacketSize |= MIN((uint16_t)(LE16(buf + 4) & 0x7FFU), (uint16_t)USBH_MAX_DATA_BUFFER);
As a new member I cannot share links, so the original topic is : FatFs_USBDisk example with USB_FS does not work. When an USB Stick is connected the USBH_MSC_Process never gets further then MSC_READ_INQUIRY. Any hints? , created by MMenz.1 on the 6th of July 2022, 2:36 AM
2022-07-27 07:33 AM
You guys are awesome! This is a solution for me! Thanks a lot.
2022-08-12 03:44 AM
Hello,
Please note that the reported issue was already fixed in stm32_mw_usb_host v3.5.0.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-11-06 01:07 AM
Hello, i had a similar problem that was successfully fixed with stm32_mw_usb_host v3.5.0, but I cannot find the upgrade in STM32CubeMX -> manage embedded sw packages -> SMT32G0.
The last USBhost updated packages that I see is v1.6.1 (USB Host Lib to use V3.4.1); it would be nice to include it in the libraries, so that if I need future project generating codes, could be done.
Thanks!
2024-03-06 07:02 AM
Hello,
I have seen same issue when working with NUCLEO-H755ZI (unable to detect flash drive when using micro-usb OTG cable)
Even when I updated code as suggested (stm32_mw_usb_host v3.5.0) some how USB flash drive is not detected
Mainly, usbh_ctlreq.c file was the only one updated since the other are pretty much the same
Any hints?