Hi,
I'm using FatFs on an 8MB serial flash. How do I specify the disk size? I want to allocate 4MB to the file system and reserve the rest.
Thanks,
-Mike
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I'm using FatFs on an 8MB serial flash. How do I specify the disk size? I want to allocate 4MB to the file system and reserve the rest.
Thanks,
-Mike
Hi Mike,
Our examples are working with FatFS in the context of using it with an SD card. With an SD card setting disk size is through the low-level function to read the sector count of the SD card and reporting that back to the fatfs library.
For setting the size of a serial flash, you will need to look at the implementation of the disk io functions I think, and see how to either manually specify a different size/sector count, or otherwise modify the implementation of your disk init/mount function.
Mike,
These are actually USB examples, but use the FatFS file system.
https://dev.ti.com/tirex/explore/node?node=AOSkLr82Ju7wGGEgHozZvg__J4.hfJy__LATEST&search=fatfs