2020-12-17 05:18 AM
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.
2021-04-16 08:05 AM
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