cancel
Showing results for 
Search instead for 
Did you mean: 

exFAT support for FileX on STM32U5

afok-esmart
Associate III

I'm testing out using an SD card on the STM32U575I-EV. The example project I'm using is from the STM32CubeU5 MCU package (Projects\STM32U575I-EV\Applications\FileX\Fx_uSD_File_Edit).

I'm able to insert an SDHC (32GB; FAT32 format) card, see the green LED blink (indicating successful read/write), disconnect the card, reconnect to my Windows 10 device, and see the "STM32.TXT" file.

But when I want to try changing the format of the card to exFAT, it doesn't work anymore. I tried that same SDHC and also an SDXC that I had in the office, and both had the same issue. I ran the debugger on the project for both cards, and both return FX_BOOT_ERROR after calling fx_media_open().

Is exFAT supported by FileX? I did some light research but haven't found anything saying it isn't possible. If it is supported, could I get some help with figuring out why it's not working for my setup?

1 ACCEPTED SOLUTION

Accepted Solutions

I modified fx_user.h (Projects\STM32U575I-EV\Applications\FileX\Fx_uSD_File_Edit\FileX\App) so that "#define FX_ENABLE_EXFAT" is defined. Re-ran the code and it now works (thanks @Tesla DeLorean).

EDIT1 - To make this change persist anytime the CubeMX/IOC file is edited, go to the IOC file (Pinout & Configuration), search for 'FILEX' and enable 'FX_ENABLE_EXFAT' in the FileX configuration.

View solution in original post

3 REPLIES 3

FX_ENABLE_EXFAT define?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I modified fx_user.h (Projects\STM32U575I-EV\Applications\FileX\Fx_uSD_File_Edit\FileX\App) so that "#define FX_ENABLE_EXFAT" is defined. Re-ran the code and it now works (thanks @Tesla DeLorean).

EDIT1 - To make this change persist anytime the CubeMX/IOC file is edited, go to the IOC file (Pinout & Configuration), search for 'FILEX' and enable 'FX_ENABLE_EXFAT' in the FileX configuration.

I wanted to try the same thing but for an SDXC card (64GB; exFAT format) but there's somewhat strange behavior with it. If I run the code in debugger mode and wait 2-3 seconds before continuing from HAL_Init(), it works and I can see it write STM32.TXT. But if I run it normally (no debugger mode; I simply power it up via USB), it doesn't work (no blinking green LED and no file gets written).