Can I implement STM32F7 bank switch via option bytes and Level2, chip protection?
Hi,
we are using dual bank mode for stable firmware update. We simply set bootaddr0 in option bytes to the opposite bank and reboot the new firmware. Everything works fine.
Now we want to enable Level2 chip protection for security reasons. Now I read that one cannot change option bytes in Level2 protection mode.
The question is if this still works in Level2 protection mode? And if not how do you implement bank switch in Level2 protection mode.
Here the current code:
// Check current setup and toggle boot address
if( flash_getBankInfo() != 1 ){
obInit.BootAddr0 = BANK1_ADDR;
}
else {
obInit.BootAddr0 = BANK2_ADDR;
}
// Program new boot address
obInit.OptionType = OPTIONBYTE_BOOTADDR_0;
rc = HAL_FLASHEx_OBProgram(&obInit);
