cancel
Showing results for 
Search instead for 
Did you mean: 

Dual Boot Bank Swap Boot Loader is not working

Hritrik_45
Associate

I am experiencing an issue with the Dual Boot Bank Swap Boot Loader on my STM32G474RE microcontroller. I am able to run code for GPIO led Toggle in both flash memory banks by swapping the banks using SwitchBank function (executed once), but neither bank successfully blinks an LED as expected. Despite this, I can observe that some data is being written to the flash memory  when I compare the boot address 0x08000000 and 0x080400000 through the STM32CubeProgrammer which are same.

Possible reasons could be incorrect flash memory configuration, improper vector table offset, incorrect interrupt configuration, flawed bootloader logic, or improper peripheral initialization. Could you provide some guidance on any potential causes and troubleshooting steps for resolving this issue?  

I have tried to swap the boot loader, tried with the linker address change and Flash Erase and set the boot loader to the initial address for both the banks and run the Blinking led program, The blinking led program didn't work even after that. 

The main file consist of ClearAllBanksAndSetBootAddress function which i tried to erase the program flash and set the boot address as initial, SwitchBank() (commented) which i used to swap the banks to program, and the GPIO Led Toggle (Commented) which is the code i want to see in both the banks.

0 REPLIES 0