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.

RTOS/TM4C1294NCPDT: FAT FS for AT45DB641E-SHN-T

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Hi All,

We have a requirement to use 8MB of serial flash in the current project. We have selected an"Adesto" part number "AT45DB641E-SHN-T" and the selected part has the page size as "256/264 bytes".  

And we have downloaded Adesto SPI flash Driver example code from the following TI link for AT45DB161E flash.

http://processors.wiki.ti.com/index.php/TI-RTOS_Examples_SerialFlash

The problem is that if we try to change the page/sector size from 512 bytes(which is used in the example driver file) to 256 bytes, the code is getting crashed. So we would like to know how we can change the driver file so that FAT FS can be mounted on AT45DB161E.

The same issue has been reported by my previous team member in the below thread and we were advised to use flash with page size 512 bytes. So we ended up with different part number "AT45DB321E" which is having  512 as the page size but the flash memory size as 4MB only.

https://e2e.ti.com/support/embedded/tirtos/f/355/t/488941#pi317008=1

So in order to use FAT FS for AT45DB641E-SHN-T(256 as the page size), what needs to be done? If anybody has example driver file also it would be very much helpful to us.

Also Is there an any file size limitation of a single large file to be stored on the flash? If so, what is the maximum size of the file which can be stored on AT45DB641E-SHN-T with FAT file system? 

Regards,

Nandhakumar

  • Moving it to the TI-RTOS forum.
  • [updated to include all valid sector sizes]

    First of all, FatFS only supports 512, 1024, 2048, or 4096 sector sizes. So you need to have your FatFS driver tell FatFS that it supports 512 sectors (e.g. for the case GET_SECTOR_SIZE case, set the size to 512). When you act on the real memory, each 512 sector is really two 256 sectors. Your driver needs to manage that. So for example if the AT45DB was 256 sectors, AT45DBFatFs_diskWrite() with FatFS sector 0 (512 bytes) is really acting on both sectors 0 and 1 (each 256). Sector 1 is really sectors 2 and 3, etc.

    Todd