How can I know when the compactflash is full?. If i wait for an error in the status register (because sectors after last sector not exist) it appears a lot of sectors after last sector.
hi,
basically u should check the size of the CF card by reading the CID/CSD regs and ur driver should be able to detect a chang in the chang in the card , thus when u initilise u should always keep the data limit in ur buffer , thus by s/w u should determine the max size of it.
and Dont do what u are doing as when writing a file u should know earlier how much data space is free and only then copy the data into th CF card or else u'll end up erasing the same "HALF file" data u had written and later discovered, wont fit...
i hope u've got the point..
sam