cancel
Showing results for 
Search instead for 
Did you mean: 

FileX format

dsmail1
Associate II

I'm very new to FileX, but I have been able to format an eMMC drive (FAT32) on a STM32H745-DISCO eval board along with being able to write a file to it and read from it.

Question: since the eMMC drive needs to be formatted one time only (at lease I'm hoping only one time) at first power on, how does one detect whether or not the drive has been formatted successfully? I've reviewed and tried several FileX media API calls, but none seem to detect properly whether or not the eMMC has been formatted.

Any help would be appreciated!!

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Haithem Rahmani
ST Employee

Hi @dsmail1 

just call the fx_media_open(), it is unsuccessful, i.e different from FX_SUCCESS, then you call fx_media_format() since the fx_media_open() will fail if no file system is present or corrupted.

regards

View solution in original post

1 REPLY 1
Haithem Rahmani
ST Employee

Hi @dsmail1 

just call the fx_media_open(), it is unsuccessful, i.e different from FX_SUCCESS, then you call fx_media_format() since the fx_media_open() will fail if no file system is present or corrupted.

regards