cancel
Showing results for 
Search instead for 
Did you mean: 

USB MSC very slow to enumerate SD card formatted with FAT32

Gowri_M
Associate II

Hi,

We are using a custom board based on STM32U5G7VJTxQ and implementing USB Mass Storage Class (USBX) to expose an SD card formatted with a file system created using FileX.

The SD card when formatted with FAT32 (using FileX API), the USB mass storage device takes a very long time to become available on Windows.

Observed behavior:

  • As soon as the USB cable is plugged in, Windows shows a pop-up message:
    "Please insert a disk into USB drive"
  • After approximately 3-4 minutes, the drive finally appears automatically and becomes accessible.

Once the drive is mounted, it works normally.

We would like to understand:

  • What could cause this very slow enumeration/access time with FAT32?
  • Are there any known limitations or required configurations in USBX + FileX when using FAT32?
  • Could this be related to SD card access speed, cluster size, cache configuration, or USB MSC parameters?
  • Are we missing any required FileX, USBX, or HAL configurations specific to FAT32?

Any guidance or suggestions would be appreciated.

Thank you!

6 REPLIES 6
Andrew Neil
Super User

Is this on just one Windows Host, or have you tried more?

What Windows version(s)?

 


@Gowri_M wrote:

Any guidance or suggestions would be appreciated.


Have you tried instrumenting your code to see what's going on in your system ?

Have you tried any Windows USB diagnostic tools to see what's going on in the Host ?

Have you tried any other Hosts besides Windows?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Hi

We tried it on windows 10.

Just one single Win 10 system?

Also, what SD-Card - brand, size, etc ?

Does that card work OK in other places ?

Have you tried other SD Cards?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

 

Hi,

Let me clearly explain the situation we are facing.

Initially, USB was not enabled, and we were able to perform all file operations on the SD card using the FileX API. We verified this by accessing the card through a card reader.

As the next step, we wanted our device to be recognized as a Mass Storage Class (MSC) device. For this, we enabled USBX and followed this example.

The device is detected as a mass storage device in Device Manager. However, upon connection, we immediately get a “Please insert a disk” pop-up. After approximately 3–4 minutes, the drive finally appears in File Explorer.

 

Answering your questions:

We tested this on two other systems, and both showed the same behavior.

The SD card used is a SanDisk Ultra microSD (32 GB).

The card works correctly in other setups; we verified this using a card reader.

We have not yet tested with other SD cards.

 

Thank you.


@Gowri_M wrote:

We tested this on two other systems, and both showed the same behavior.


Were they also Win 10 systems?

Have you tried different cables, different ports, with/without hubs, etc?

Have you tried instrumenting your code to see what's going on in your system ?

Have you tried any Windows USB diagnostic tools to see what's going on in the Host ?

Have you tried any other Hosts besides Windows ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Yeah both were windows 10.

Yes we tried different cables, ports and other things still the same result.

Haven't tried the last three. Will let you know once it is done.

 

Thank you.