2017-03-29 08:47 AM
Dear
I'm new with STM32 and ARM. I am using the nucleo STM32F103RB and using STM32CubeMX and HAL libraries.
I want to save 10 to 100 uint32 size register in the flash that will be loaded on startup to have the correct settings. In the run time some register can change and need to be saved in the flash.In this moment I can write and read registers to the Flash. Problem is that the HAL flash code always erase the whole page. (1028 bytes). I just need to erase 4 bytes and rewrite them.
But If I unstand okay there need to be a way to erase just one or 4 bytes so I can change only one register.I hope somebody can help me with explaining the steps I need to take.
I really appreciate any help you can provide.
Kind regard Stef2017-03-29 04:28 PM
No, the FLASH is always erased in large pieces. There's no bytewise-erasable memory in STM32s (this would be called EEPROM).
There are several possible workarounds:
JW
2017-03-30 02:16 AM
Thank you very much.
Also for the tips!Kind regards
Stef