I am looking for your sample code on how to use the dual bank mechanism on the STM3L082.
- My goal is to download the new firmware
- Write it into bank 2 (starting from 0x0801 8000) (use the HEX generated by platformIO
- Bank1 always remains as it is (with original firmware)
- BFB2 is set to 1
- MCU restarted
- System memory loader will kick in
- Boots from bank2 (unless there is no valid code on bank2. In that error case it will continue to boot from bank1)
- I assumed that to set the BFB2 bit was sufficient to boot from bank2. However it does not work. Do I miss something?
- Does anybody know where I can find sample code to use both flash banks?