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-18 11:36 AM
The first sector at 0x08000000 must be used by code (or bootloader) because the execution starts there.
All other sectors are up to you. A common approach is to allocate two sectors for data: one current and another backup.
Copy the data from one sector to another before erasing. Copying does not take much RAM, it can be done by 2 or 4 bytes.
-- pa
2019-05-08 09:29 AM
Have you looked at the EEPROM emulation packages that STM provides for most series?
2019-05-08 09:39 AM
It's a problem. 446 has sectors of different size, and there's too little RAM to back up 128K. Try to find a smaller sector: 16 or 32K.
-- pa
2019-05-08 11:00 PM
The sector sizes of F446 are: 16K, 64K and 128K... I have also tried to save 16K data but I couldn't, just until 10K...
Couldn't I back up data from this flash memory?
2019-05-09 06:55 AM
You'll need to use smaller sectors for configuration data, by leaving holes in the code space. Or use a sector, or two, that you can commit to the data storage task, and ping-pong between them.
2019-05-09 11:52 PM
I am trying to run the example but sometimes it works and others not...
2019-05-09 11:59 PM
But that MCU has these size sectors...so I will need manage data of these sizes...(16K,64K,128K...)...
2019-05-15 02:01 AM
How can I do it?
2019-05-15 02:01 AM
How can I do it?
2019-05-18 11:36 AM
The first sector at 0x08000000 must be used by code (or bootloader) because the execution starts there.
All other sectors are up to you. A common approach is to allocate two sectors for data: one current and another backup.
Copy the data from one sector to another before erasing. Copying does not take much RAM, it can be done by 2 or 4 bytes.
-- pa