2023-12-11 08:46 AM
Hi,
I used this code to change the boot address in the STM32U575 project:
FLASH_OBProgramInitTypeDef OB_Data;
/* Unlock Flash Control register and Option Bytes */
HAL_FLASH_Unlock();
HAL_FLASH_OB_Unlock();
OB_Data.OptionType = OPTIONBYTE_USER | OPTIONBYTE_BOOTADDR;
OB_Data.USERType = OB_USER_TZEN | OB_USER_NBOOT0 | OB_USER_NSWBOOT0;
OB_Data.USERConfig = OB_TZEN_DISABLE | OB_NBOOT0_RESET | OB_BOOT0_FROM_OB;
OB_Data.BootAddrConfig = OB_BOOTADDR_NS1;
OB_Data.BootAddr = addr;
/* Program Option Bytes */
HAL_FLASHEx_OBProgram(&OB_Data);
/* Launch Option Bytes Loading */
HAL_FLASH_OB_Launch();
How to do the same in the STM32G0xx project?
Solved! Go to Solution.
2023-12-12 12:34 AM
Wow, sadly, Thank you.
2023-12-11 05:46 PM
The boot address can't be changed on the G0.
2023-12-12 12:34 AM
Wow, sadly, Thank you.