Skip to main content
yang hong
Associate III
Sep 14, 2021 2:15 PM UTC
Question

Fatfs f_mount and f_getfree

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

Tesla DeLorean
Guru
Sep 14, 2021 2:27 PM UTC

Are you using a current version of FatFs?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
yang hong
yang hongAuthor
Associate III
Sep 14, 2021 2:38 PM UTC

FATFS VERSION IS R0.12C