I am trying to retrieve the remaining capacity using the f_getfree function in the FatFs module, but I cannot get the correct value immediately after calling f_mount. After using the system for a while, it eventually becomes possible to retrieve the correct value at some point.
Here are my questions:
(1) Since I assume the FAT should be in a clean state immediately after mounting, why can't I get the correct value right away?
(2) What should I do to ensure the correct value is retrieved?