cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while trying to write into pendrive bigger then 16gb

DaSow
Associate

Hello my friends.

I am working with stm32f7 microcontroller.

I have an issue while using USB pendrives bigger than 16gb. When I try to write into one of them code seems to be stuck on this while loop.

 DaSow_0-1725344816011.png

and those statuses seems permanent: hbot.state = BOT_DATA_OUT_WAIT and URB_Status = USBH_URB_IDLE. Any idea how to fix this problem?

1 REPLY 1
nouirakh
ST Employee

Hello @DaSow 

When you're working with USB mass storage devices on STM32 microcontrollers, especially those with larger capacities like 16GB or more, there are a few things that could cause the code to get stuck in a loop:

  1. USB host library is properly configured to handle larger storage devices (Increasing the buffer size, Adjusting the timeout values)
  2. Check the implementation of the MSC class in the USB host library. Ensure that it supports the SCSI commands required for larger storage devices.
  3. The function USBH_MSC_RdWrProcess is likely responsible for handling read/write operations. Ensure that this function is correctly implemented and can handle the state transitions properly.

Finally, check that your STM32 firmware and USB host library are up to date.