2024-02-05 09:36 AM
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?
Solved! Go to Solution.
2024-02-07 12:36 PM - edited 2024-04-08 06:11 PM
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.
2024-02-05 09:50 AM
FX_ENABLE_EXFAT define?
2024-02-07 12:36 PM - edited 2024-04-08 06:11 PM
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.
2024-02-07 12:50 PM
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).