DG-0506 avatar image
0 Votes"
DG-0506 asked RoyLi-MSFT edited

Fat32 FS Information Sector


I have been working on an embedded software application which uses an sd card , and reads the FS Information Sector to identify how much free space is left on the card.

Very occasionally , i have found the Free Clusters Value in the FS info sector to be incorrect , after modification with a windows machine.

As i understand it , there are 2 ways for a device to identify how many clusters are free on a fat32 volume , by looking up this sector , or by manually counting every cluster.

It appears as though windows uses both.

Once the fs_info is out of sync , sometimes when deleting a file from the card , it will simply decrement the fs_info by the number of clusters that have been removed by the operation , as if windows is only looking at the fs info.

Other times it will update the fs info to the correct value ,as if it had actually counted the clusters.

Some information as to when the PC trusts the fsinfo file , and when it will re-scan the drive would be appreciated.

It should be noted that the connection between the PC and the SD card is very slow (200-400kbps) , if that changes anything.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers