Hi everyone,
I'm using MCUXpresso 10.2.1 and a custom board based on MK66F2M0
I'm using a 4 MB dataflash partioned in two disks using 512 bytes sector size:
DWORD plist[] = { 6894, 1008, 0, 0}; /* Divide drive into two partitions */
f_fdisk( 5, plist, FormatBuf ); //create partitions
I can access both disks, but it seems that the disk sizes are wrong: with the f_getfree() function I get 2768 kB and 456 kB respectively.
res = f_getfree( DiskName, &fre_clust, &fs );
if( res == FR_OK )
{
/* Get total sectors */
tot_sect = ( fs->n_fatent - 2 ) * fs->csize;
...
}
Why is there such a waste of space?
Many thanks
Biafra