2020-09-25 06:44 AM
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)
Thank you in advance.
2020-09-25 08:52 AM
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.
2020-09-25 08:54 AM
The STM32L562E-DK has a microsd card, consider using that for data logging, and with FATFS