This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 + External SPI NAND FLASH + FATFS

Dear all,

so far, for my external SPI NAND Flash memory chip development (Micron 256MB SLC NAND), I have been writing and reading data with my own, very basic level, flash memory library.

But, due to the fact that I have not implemented a solid bad block management sub system as a part of that library and my project requirements are growing,

I decided to move to something much more robust like FatFS that is well tested  and I have a few questions in case you have exprerience with FatFs

1. Does FatFS  have a bad block management and wear leveling system? After I searched it i found out that it doesn't and I just wanted to ask this here to be sure.

2. Is it possible to use FatFS with SPI FLASH NAND ICs of range between 128MB and 1GB storage capacity or it is used only in projects that implemend SD card?

Thank you for your time

Parents
  • Hi

    1. No, as you have found there is no bad block management or wear leveling built into the fatFS driver. 

    2. The flash drivers in the nRF5 SDK have not been tested for use with any NAND flash devices. 
    Do you have any documentation for the device you are thinking of using?

    Best regards
    Torbjørn

  • Hi Torbjørn,

    The device I use is the MT29F2G01 (256MB) flash and in the near future I will move to MT29F8G01(1GB) flash.

    For now I use my own custom drivers for accessing the memory which works rather well BUT my main issue is the bad block management and wear leveling. I have created a basic mechanism for bad block management but I would like to find something much more tested. The thing is that I am on a hurry for my next project and time for low level debugging is a luxury at this point unfortunately.  

    Micron gives a package with drivers but it seems to me so messed up and with very insufficient commenting that is why I decided to make my own driver in the first place where things are much more straightforward.

  • Hi

    As you may or may not know we are slowly moving to a different software architecture called NCS (nRF Connect SDK), based on the Zephyr RTOS. 

    In Zephyr there is a file system called littlefs that includes wear levelling, and is suited for using external flash devices:
    https://docs.zephyrproject.org/latest/samples/subsys/fs/littlefs/README.html

    Unfortunately migrating to NCS is probably not the best idea if you're short on time, as there is no easy way to port a project from the nRF5 SDK to NCS. 

    Best regards
    Torbjørn

Reply Children
Related