Dual-bank boot not working on STM32L471 device
Hello,
I am trying to use the dual-bank boot feature in order to safely upgrade the software application.
The hardware configuration is the following:
- The mcu used is the STM32L471.
- The system bootloader version is v9.2
- BOOT0 pin = 0 so boot mode is set to boot from Main Flash memory.
- Default value of my option bytes is 0xFF6FF8AA so DUAL_BANK=1, BFB2=0 and nBOOT1=1
I have a simple application that simply blinks a LED and does nothing else.
I have programmed both banks (@0x0800000 and 0x08080000) with this same application and checked the memory content to verify both banks are equal.
I can read in the bank's first address the stack pointer (0x20018000 in my case)
When BFB2=0, my application is running properly and I can see the LED blinking.
When BFB2=1, nothing happens, it seems I am stuck in the system bootloader....
I tried with BFB2=1 and the bank2 erased => same result, it doesn't work.
Thanks to the JTAG, I was able to make the following verifications:
- The program counter (PC) seems to switch between a bootloader address (0x1FFFxxxx) and a flask address (0x080xxxxx)
- SFTRSTF=1 in RCC_CSR register so it seems a "software reset" makes my application resets in loop...
Is there somthing wrong in my logic ?
Is there something else I can check ?
I am not using an evaluation board, is there a possibilty that the HW could causes this behaviour ?
Thanks for the help!
