cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474 dual bank feature seems not working.

HYe_i.1
Associate

My application is running in Bank1 and I program new firmware binary file to bank2 via USB and toggle the bank(set BFB2), it does not start . When I check the binary file generated by cubeIDE and the binary file written to bank2(using cubeprogrammer) they look identical. I search the forums and noticed that the linker file provided by cubeMx is wrong( RAM size should be 96K) after I corrected the linker file. I successfully programmed bank2 but I programmed the same firmware of bank1. If I try to write the same binary file, program runs correctly in both banks. But If I add 2-3 lines of codes(toggle another LED) and generate the new .bin file, It does not work. What do I miss? is this a bug of stm32G4.

I modified a shared code on internet for my application. The project is attached.

1 REPLY 1
Igor Cesko
ST Employee

Hi HYe_i.1 (Community Member),

Please read application note AN4767 - there are useful information and example.

Another independent code is here: https://www.reddit.com/r/embedded/comments/hp7pq0/stm32g4_dual_bank_bootloaderfirmware_updater/

Regards

Igor