Error when setting multiple Option Bytes and BOOT_LOCK is part of them
- 0 replies
- 10 views
Hi,
I’m facing an issue when I’m trying to modify multiple Option Bytes on the STM32G473 with one call to STM32_Programmer_CLI.
The issue seems to occur whenever the BOOT_LOCK-parameter is part of the call.
The call looks like this:
STM32_Programmer_CLI --connect port=SWD --optionbytes BOR_LEV=0x3 nRST_STOP=0x0 nRST_STDBY=0x0 nRST_SHDW=0x0 IWDG_SW=0x1 IWDG_STOP=0x1 IWDG_STDBY=0x1 WWDG_SW=0x1 BFB2=0x0 DBANK=0x1 nBOOT1=0x1 SRAM_PE=0x1 CCMSRAM_RST=0x1 nSWBOOT0=0x0 nBOOT0=0x1 NRST_MODE=0x3 IRHEN=0x1 PCROP1_STRT=0x7FFF PCROP1_END=0x0 PCROP_RDP=0x0 WRP1A_STRT=0x7F WRP1A_END=0x0 WRP1B_STRT=0x7F WRP1B_END=0x0 PCROP2_STRT=0x7FFF PCROP2_END=0x0 WRP2A_STRT=0x7F WRP2A_END=0x0 WRP2B_STRT=0x7F WRP2B_END=0x0 SEC_SIZE1=0x0 SEC_SIZE2=0x0 BOOT_LOCK=0x1
When BOOT_LOCK is part of it, the execution stops with the error “Unable to get core ID” .
When it’s not, everything works fine.
The issue is also reproducible when it’s just one other parameter besides BOOT_LOCK, eg. STM32_Programmer_CLI --connect port=SWD --optionbytes BOR_LEV=0x3 BOOT_LOCK=0x1 .
After the call, only BOOT_LOCK is modified while BOR_LEV still has the default value of 0x0.
When I run it again with the same parameters (BOR_LEV=0x3 BOOT_LOCK=0x1), BOR_LEV is now also set correctly.
So, it seems like the issue only occurs when both parameters are actually modified by the call.
Because, when it is executed again afterwards, now with BOR_LEV=0x0 BOOT_LOCK=0x0, it errors out again.
I’ve attached the output when I run it with --verbosity 3.
Is this behavior expected or is this a bug in the tool?
Any help would be greatly appreciated!
