cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L562E-DK with FAT-FS or library to flash on the internal memory.

Neel
Associate III

Hello STM team, 

I am using STM32L562E-DK. I am using 512KB flash in dual boot mode where I am keeping lower 64KB of both the partition to store the user data. (Data size we think would be total of 64KB where at the interval of 30 minutes 16 bytes of data needs to be stored inside flash)

  1. Is there any readymade library available which can help us to store data ( with taking care of the flash erase pages) in user data partitions? 
  2. How we can integrate the FAT-FS on the internal flash memory of STM32L562E-DK so that I can use the read/write APIs on the user data partitions?

Thank you in advance.

2 REPLIES 2

There are probably FLASH examples with the CubeL5 code trees.

You will likely need to code solutions to your own problems.

You'd would integrate functionality into the DISKIO layer, taking care of the read, write, erase, and deblocking issues. Would suggest a sector size matching that of the underlying erase blocks.

Generally FATFS is a poor choice for this and the internal memory is relatively slow for erase/write cycles, and of finite life.

For 16-bytes / 30 minutes, you'd do better journalling the writes across sectors, where you avoid erasing, and you spread the wear.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

The STM32L562E-DK has a microsd card, consider using that for data logging, and with FATFS

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..