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.

TM4C123GH6PM: SPI Flash file system

Part Number: TM4C123GH6PM

Hi,

I have a TM4C123GH6PM EVM.

fatfs is up on the SDCard on the EVM.

I have a custom board of TM4C123GH6PM with an external  SPI Flash of 32Mb(Megabit) size. 

Can somebody help me to bring up fatfs on the SPI Flash?

Low level SPI Flash driver is verified and tested on the board. But I am not able to format the SPI Flash using the third party library provided in the TivaWare_C_Series-2.1.4.178.

What is the minimum size of SPI Flash to format it for FAT32?

Regards

Flaby

  • Hi Flaby,
    Have you tried with larger than 32Mb or FAT16 with your 32Mb SPI flash? What size is the SPI flash you used on the EVM board? I'm not an expert. I read somewhere that says the minimum number of clusters for FAF32 is 65527 which gives a size of 33Mb.
  • Hello Charles,

    Thanks for your reply....

    It will be a great help for me if you follow up my doubts described below....

    My SPI Flash is 32Mb(4MB). I did not try with larger size of SPI Flash. (Also, My SPI Flash connected on my custom board not on EVM)

    My Flash device does not support a 512Bytes erase. It supports a minimum of 4KB at a time.

    So sector size will be 4096 in my case.

    As you said, if FAT32 needs a min of 65527 clusters, then the minimum size of the Flash device should be 256MB? Please correct me if I am wrong. . .

    Which FAT filesystem is suitable for 4MB Flash device?

    Is FAT16 possible on 4MB Flash?

    If possible, will the FAT16 formatted device be mounted on windows as a USB MSC device(as in the case of SDcard)?

    Regards

    Flaby

  • Hi Flaby,

      Please take a look at the below table. If your flash sector is 4kB then your volume size needs to be at least 257MB. Please also reference this link. 

  • Hi Charles,

    Thank you so much for clarifying my doubt...
    I have to go with exFAT since the Flash size available for me is 16MB Max.
    As you said, since FAT32 needs minimum 257MB, I cant go for that.
    Anyways, thanks a lot. I will get back to you if I am stuck with any another problem with exFAT.
    Regards
    Flaby