Skip to main content
Visitor II
February 13, 2025
Solved

FileX format

  • February 13, 2025
  • 1 reply
  • 573 views

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

    This topic has been closed for replies.
    Best answer by Haithem Rahmani

    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

    1 reply

    ST Employee
    February 13, 2025

    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