Solved
STM32F446: Flash memory
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 !
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 !
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.