memory card "inside the LPC1768"

01 Mar 2013

hi I would like to implement a 64KB memory card inside the Flash region of the mbed LPC1768. then implement a wear-leveling algorithm there... any suggestions on how to start??

05 Mar 2013

Hi Mahmood,

depending on what you're trying to achieve, this might not be the best solution. My guess that you want to implement a random access file system?

File systems usually operate on 512 byte blocks, that can be individually erased and reprogrammed, and are optimised for this random read/write behaviour. The FLASH inside the LPC1768 is optimised to be written infrequently, i.e. when the MCU is programmed, and read from a lot, i.e. when the program us executed.

The bulk of the LPC1768 FLASH is in 32kB blocks. Erasing an whole 32kB block is time consuming, and has to be done every time you want to write to the FLASH. Additionally, the flash is accessed through "In Application Programming" which is discussed in the LPC1768 User Manual, a process that involves executing the IAP program from SRAM, and manipulating clocks.

If you're looking for 64kB of random access file system storage, you might want to consider using a serial FLASH part like the AT45DB010, which already has drivers on mbed.org, and i think there might also be file system implementation too.

Hope this helps,

Regards, Chris