cancel
Showing results for 
Search instead for 
Did you mean: 

I have a question about using flash memory.

User.72
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions

>>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 Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

>>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 Venmo
Up vote any posts that you find helpful, it shows what's working..

​Thank you sir

your advice is so helpful to me