2019-05-08 08:40 AM
I want write only some bytes but before that I have to erase a full sector.
If I don´t want to loss data from that sector I will need save them.
If sector size is 128Kb, how can I save all data?
Thank you !
Solved! Go to Solution.
2019-05-26 10:58 PM
Thank you.
I will used a sector of 128Kb to save user code o bootloader and smaller sector to save user data with other to backup.
2019-05-27 10:48 PM
Sectors 0-3 are 16 kB. Leave sector 0 for boot code and use sectors 1 and 2 for storing data.
Note that you need to fix the linker script too, if you leave "data holes" in the middle of code.
You can define 4 flash-regions: boot, data1, data2 and code and allocate the code in boot and code.
Then you need to decide what goes into boot and what goes into code. Maybe initializations into boot and application itself into code.