How can I detect the active flash bank on stm32g4? BFB2 bit is not conclusive
Hi,
I am developing an application with stm32g4 using the dual bank feature for firmware upgrades. To check if an upgrade was successful, I need to check the currently active bank.
I can read the option bytes and get the BFB2 bit. But: if the firmware on bank X was not correct and was rejected by the system bootloader, the system bootloader does not boot bank X, instead it boots bank Y. But it does not toggle the BFB2 bit, leading to a state where BFB2 indicates bank X but actually bank Y runs.
Is there a way to query the actually active bank?
