cancel
Showing results for 
Search instead for 
Did you mean: 

USBX Host MSC standalone

JulInnovel
Associate II

Hello all,

Split from this thread:

I'm using an STM32U5G9 and I need to read files from a USB stick.

I don't want to use ThreadX because I have to keep this application small.

How can I achieve this if UsbX and FileX are supposed to be used only with ThreadX and not in standalone mode?

 

Thanks for your help.

Best regards,

Julien

2 REPLIES 2
FBL
ST Employee

Hi @JulInnovel 

You cannot use USBX MSC in host mode concurrently on the same medium with another file system FileX or FatFS. The memory is either :

  • Exposed to a PC via USBX Device MSC, or 
  • Mounted locally with FileX or FatFS,

If two file systems Windows and FileX will concurrently update the same FAT and directory structures. There is no coordination; this leads to inevitable corruption.

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.




Best regards,
FBL
JulInnovel
Associate II

Hi,

 

My original question was: how can I use USBX and FileX to read files from a USB stick (host mode) in standalone mode (so without ThreadX)?

It does not seem to work properly. I tried using the old ST USB stack with FatFS (https://github.com/STMicroelectronics/stm32u5-classic-coremw-apps) instead, and now everything seems to work fine.

 

Best regards,

Julien