Skip to main content
User.72
Associate II
October 6, 2019
Solved

I have a question about using flash memory.

  • October 6, 2019
  • 1 reply
  • 860 views

HI Sir.

I will try to work on a project using STM32.

I have a question regarding flash memory usage.

I want to  save input data to flash memory but STM flash memory is divided sector.

The capacity of each sector is determined.

ex) STM32F205VE

 Sector 0 : 16KB

 Sector1 : 16KB

 ect..

I have a question here.

For example, when capacity of data to input is 200KB, I will save this data in sector2.

But  capacity of sector2 is only 16KB, Is the remaining data automatically saved to the next

sector?

Thank you sir.

This topic has been closed for replies.
Best answer by Tesla DeLorean

>>But  capacity of sector2 is only 16KB, Is the remaining data automatically saved to the next

The memory blocks are contiguous, You can technically keep writing provided the memory is suitably erased.

If you have a lot of "user" data put it at the end of the array, in the 128KB sectors, away from your code. The erase time for the 128KB sectors is long and may interfere with real-time interfaces.

For small amounts of configuration data (serial number, calibration, etc) make a hole in your firmware(s) so you can use some of the 16KB sectors. The system will need to boot from the first one, although you could fit a loader within 16KB

1 reply

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
October 6, 2019

>>But  capacity of sector2 is only 16KB, Is the remaining data automatically saved to the next

The memory blocks are contiguous, You can technically keep writing provided the memory is suitably erased.

If you have a lot of "user" data put it at the end of the array, in the 128KB sectors, away from your code. The erase time for the 128KB sectors is long and may interfere with real-time interfaces.

For small amounts of configuration data (serial number, calibration, etc) make a hole in your firmware(s) so you can use some of the 16KB sectors. The system will need to boot from the first one, although you could fit a loader within 16KB

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
User.72
User.72Author
Associate II
October 6, 2019

​Thank you sir

your advice is so helpful to me