I'm trying to use FATFS library with my SPI-Flash. How can I format it in a right way. I'm using 16Mb flash. W25q16. It has 64 Blocks, each Block has 8 sectors. Total 512 sectors, each sector has 16 pages, each page has 256 Byte.
I traced the code flow and I found that the SPI flash should be formatted.
I used an SD-Card and traced the code while it is mounted and knew that it searches in sector 0 for the record signature and the pointer to the partition sector. Then it reads the partition sector to get all information about the physical memory. My problem is that the SD-card has 512 Bytes per sector and 236 sectors per cluster while SPI-Flash sector size is 4096 Bytes and the block is 32 Kilo Bytes . When I edit the sector data to adequate my SPI-Flash the code calculates the total memory wrong. I want to know how can I edit these data to make the code controls the SPI-Flash successfully.
Also I want to know how to calculate the Root Directory Entry Size.
Thank you!!
