2021-12-05 09:27 AM
Good day,
I need some advise with switching banks on the STM32L152.
Here's what I currently do:
Now I expect the device to boot from bank 2 but nothing happens. Any idea why this may be?
Please see image of a read of the MCU after loading firmware into Bank 2:
Thanks!
2021-12-05 11:18 AM
I have made some progress here. It seems the key is NOT to switch banks by flipping nBFB2? I just linked the bank 2 image to 0x08040000 and wrote the hex file in position. Now I need to understand how to switch back to bank 1? It seems the nBFB2 bit has absolutely no effect. The image in B1 is linked to 0x08000000 and the image in B2 is linked to 0x0804000. How do I switch between the two?
2021-12-08 03:29 AM
i am having problems with dual bank too, i was not able to get it to work...
nothing seems to work as expected, but i think the bit nBFB2 should have some affect, if not, how would you build a firmware that needs more then 256k of flash, because above that size some data will be writen on address 0x8040 0000... so the internal bootloader cant just use this address to validate the firmware in bank2.
i am wating some answers from st team, but to me, it just dont work and they dont know yet or dont want to confirm that...
by the way, there is some missleading information about wich one have or not the dual bank mode, in datasheet it says that MCU cat 4/5/6 have dual bank, but in the product selector only the STM32L151RE has it... i tested the with both 151 and 152, none of then worked.