AnsweredAssumed Answered

FormatFATVolume bug in ADI-FSS?

Question asked by pfeifferc on Sep 2, 2014
Latest reply on Sep 26, 2014 by pfeifferc

I am using an adapted version of the ADI file system service with SDCards.

Underlaying SPI driver is replaced by an optimized function.

Now we use the FormatFATVolume function to enable formatting the Cards.

There seems to be a problem if we format 2GB-SDCards with FAT16.

DetermineFATSize function calc a VolumeSize of 0x400000

 

If we mount this volume after formatting then the function readBootSector is called.

And the FAT Type is determined by using the number of clusters (VolumeSize-resvdSecCnt and the other sectors/ClusterSize)

But this result in a cluster count of 65528 and this is greater than the limit for fat16 =65518 in ReadBootSector function

 

So as a result  of this, we get a wrong fat type and nothing works !

 

kind regards chris

Outcomes