cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L496 dual bank boot difficulty

Dave Causey
Associate

I can't figure out how to get the STM32L496 to boot at all with BFB2 set to 1.

Using nBoot0_SW_Cfg=0 and nBoot0=1,

  • With BFB2=0, I can boot successfully from bank 1
  • With BFB2=0, I can copy the contents of bank 1 to bank 2 and swap banks using the FB_MODE bit, no problem
  • With BFB2=1 and identical images in both banks, no boot
  • With BFB2=1 and bank 2 erased, no boot

Any idea what I might be overlooking here?

Thanks.

-Dave

1 REPLY 1
Paul3
Associate II

Hi Dave,

I know this question was asked over 6 months ago but I too have been having difficulty with this. To help any others in the same situation, I share what worked for me. Basically, I compared the working Nucleo-L496 CubeMX example (FLASH_DualBoot) with my non-working project and one thing I noticed was that the FLASH_DualBoot_Bank2 project had _estack set to 0x20040000 (in both STM32L496VGTX_FLASH.ld and STM32L496VGTX_RAM.ld). In my non-working project it was set to 0x20050000. When I changed _estack to 0x20040000 and rebuilt, the bank 2 image started working. OK I may now be missing some of my RAM capacity but that's not an issue for me, at least not yet!

Cheers,

Paul