Erase or write flash page at BANK2 on the STM32G0B1 with STM32_Programmer_CLI does not work!
Hello,
I have spent several days trying to figure out how to use STM32_Programmer_CLI.exe to delete and describe certain pages on BANK2 but so far without success.
If DUAL_BANK is 0 (0: 256Kbytes/512Kbytes single-bank flash memory, contiguous addresses in bank 1) and then adjust the page number accordingly in the CLS commands, then everything works without problems.
The CLI command (to erase and write on Page 126 at BANK2) is: -c port=COM4 br=115200 p=EVEN db=8 sb=1 -vb 1 -ob displ -log " + exePathDirectory + "\\tracePar.log -e 126 --skiperase -d " + pathBinFile + " 0x0803F000 --start 0x08000000"
if DUAL_BANK is 1 (default setting), then the CLI command is like this: "-c port=COM4 br=115200 p=EVEN db=8 sb=1 -vb 1 -ob displ -log " + exePathDirectory + "\\tracePar.log -e 65342 -d " + pathBinFile + " 0x0803F000 --start 0x08000000";
I have to say that before these commands are executed, some functions in the firmware are executed and then the bootloader is started. For example this function:
Since the setting (DUAL_BANK) is set to 1 by default, I want to be able to delete and write to certain pages in BANK2.
Can someone help me how to solve this problem?
Set BKER to 1 did not help either: SET_BIT(FLASH->CR, FLASH_CR_BKER);
This bit selects the target of erase operation (Bank 1 or Bank 2).
0: Bank 1
1: Bank 2
The bit has no effect on the single-bank devices.)
