2020-11-27 05:00 AM
Hi,
I need to write some data in the flash memory of my STM32H743ZI MCU, for example serial number
Can I write this data in something smaller than a whole flash sector ?
Regards,
Gabriel
Solved! Go to Solution.
2020-11-27 05:39 AM
You can write individual bytes if you want, but the area you're writing needs to be erased before it is written, and you cannot erase less than a full page/sector of flash.
2020-11-27 05:39 AM
You can write individual bytes if you want, but the area you're writing needs to be erased before it is written, and you cannot erase less than a full page/sector of flash.
2020-11-27 11:13 AM
On STM32H7 the optimal write unit is so called "flash word" which is 32 bytes (256 bits).
The HAL library function HAL_FLASH_Program() does not accept other variants such as individual bytes.
So, ensure that you write in multiples of 32 bytes, at address aligned on 32 bytes.
-- pa