0

I'm working on a project using STM32L486RG microcontroller . I have to interface a Toshiba NAND flash memory using SPI peripheral and integrate the FatFs file system. Now , through my low level driver I'm able to read and write buffers in the NAND flash but I have no idea of how to integrate the FatFs file system. I read in many forums and websites that I should develop APIs that manage and control Error Correction Code ( ECC ) and wear levelling. I searched in the Net but I didn't find any example or sample code.

I'm really stuck on this and don't know from where to start. Anybody has an idea about this issue ?

Thanks

VC.One
  • 14,790
  • 4
  • 25
  • 57
Y.G
  • 51
  • 2
  • 8
  • I'd recommend taking a look at the answer I gave some time ago to a similar question: https://stackoverflow.com/questions/44499101/flash-memory-as-mass-storage-device-using-stm32-usb-device-library/44508159#44508159. – J_S Aug 28 '17 at 21:42
  • Thanks @JacekŚlimok for your answer ! I think I should look for a sample example of how to implement wear levelling and garbage collection features but I still not find any code in the internet – Y.G Aug 30 '17 at 07:51
  • Searching yields a lot of results which may be too much for a regular project - mostly research papers about sophisticated wear leveling + ECC. Generally an approach of a simple circular buffer should be enough for a regular project and it's easy enough to do by hand. Source code - there are examples, but mostly are tightly coupled with the specific driver for given memory type or even worse - specific chip. Personally I'd go and write some simple wear leveling algorithm myself by taking a look at descriptions of few sample implementations to get an idea of how it could be implemented. – J_S Aug 30 '17 at 08:32
  • @JacekŚlimok thanks again ! However, when looking for wear leveling sample of code , I've just found documents talking about wear leveling benefits not really some code. If It's possible , could you please mention some links from where I can find some examples ? – Y.G Sep 08 '17 at 16:13

0 Answers0