Skip to main content
Visitor II
September 14, 2021
Question

Fatfs f_mount and f_getfree

  • September 14, 2021
  • 2 replies
  • 1301 views

I am using NUCLEO H743ZI2 with Fatfs and FreeRTOS V2. The program is working now, but I have one issue on free size of SD card. After I use f_mount to mount my SD Card, In structure FATFS variables, last cluster and free cluster are not correct. If I use f_getfree, I am able to get correct free cluster, but after FATFS variable passing through f_getfree is updated inside function f_getfree, I can't use f_open function. However, after I use function f_open, then I use f_getfree to get free cluster, everything is working fine.

Does anybody know what is happen? how can I get correct free size when I use f_mount to update correct free cluster?

    This topic has been closed for replies.

    2 replies

    Graduate II
    September 14, 2021

    Are you using a current version of FatFs?

    yang hongAuthor
    Visitor II
    September 14, 2021

    FATFS VERSION IS R0.12C