Why does BFB2 (Boot From Bank 2) behave differently on 3 different STM32's ???
Is there (or have there been) some big issues with the BFB2 option and the STM32 Bootloader ?
I have been trying to implement firmware updating from our host by using the BFB2 option bit on three different STM32's and all of them behave differently:
STM32F469VIT6 (2Mb Flash)
Works as expected:
Load “Program A�? into 0x08000000
Load “Program B�? into 0x08100000 (Compiled and linked with same script)
Power up and “Program A�? runs
Turn on BFB2 and “Program A�? continues running
Power cycle and “Program B�? runs
Turn off BFB2 and “Program B�? continues running
Power cycle and now “Program A�? runs
STM32L476RG (1Mb Flash)
Works almost as expected:
Load “Program A�? into 0x08000000
Load “Program B�? into 0x08080000 (Compiled and linked with same script)
Power up and “Program A�? runs
Turn on BFB2, however, “Program B�? starts immediately meaning I can’t now tell the host the f/w update worked.
Power cycle and “Program B�? runs again
Turn off BFB2 and “Program A�? starts immediately
Power cycle and “Program A�? runs again
STM32L496RGT6 (1Mb Flash)
Does not work at all and keeps loading the STM Bootloader into 0x00000000 and filling the flash with unknown codes.
Load “Program A�? into 0x08000000
Load “Program B�? into 0x08080000 (Compiled and linked with same script)
Power up and “Program A�? runs
Turn on BFB2, however, “Program B�? does not start but the STM32 Bootloader immediately runs and performs weird operations like turning on Protection of BankA and wiping 0x08000000 with seemingly random numbers. I think it's the STM Bootloader running as the Vector table values at 0x00000004 onward are all 0x1FFFxxxx type numbers.
Has anyone any advice please ?
Or do we just have to try stick to the micro that works for us ?
Thanks.
