Need assistance with modifying option bytes on STM32H7 using c# bootloader
I'm encountering difficulties modifying option bytes on an STM32H723VEH6 microcontroller using a custom C# bootloader. Although the bootloader successfully loads firmware onto the microcontroller, it fails to modify option bytes BOOT_CM7_ADD0 and BOOT_CM7_ADD1 despite following the correct sequence outlined in the reference manual.
If anyone has a code example demonstrating the correct implementation of modifying option bytes using a custom C# bootloader?
public void ModifyOptionBytes(uint bootCm7Add0, uint bootCm7Add1)
{
UnlockFlashCR();
UnlockFlashOPTCR();
// Write the desired new option byte values in the corresponding option registers
WriteOptionBytes(bootCm7Add0, bootCm7Add1);
// Set the option byte start change OPTSTART bit to 1 in the FLASH_OPTCR register
SetOptionByteStartChange();
}
