BFB2 with exception vector stack in CCM SRAM
Hello,
I'm trying to use the BFB2 feature on the STM32G474CET microcontroller. I'm able to flash binaries into each of the two banks, and so long as the stack pointer defined in the first word of the interrupt table points to an SRAM location (0x20000000-based) my Bank 2 code will execute if I set the BFB2 bit.
However, we want to locate our stack/variables/heap all in CCM SRAM (0x10000000-based). If I store a CCM location (specifically, 0x100008F0) in the first word of the Bank 2 interrupt table and then set BFB2, instead of executing my Bank 2 code the MCU spins forever in the bootloader. Note that in this case it doesn't even try to execute the valid Bank 1 code even though AN2606 kind of implies that it would move on to the other bank if the Bank 2 stack address isn't in SRAM. Finally, I also tried using the aliased CCM SRAM (0x20018000-based) and the bootloader code still failed to execute my code - it seems only SRAM1 (and maybe SRAM2 but I didn't try it) addresses work.
Are either of these limitations documented:
- Using BFB2 with the Bank 2 stack in CCM SRAM is not supported.
- Setting BFB2 with a Bank 2 CCM SRAM address will cause a bootloader hang and not failback to Bank 1 as described in AN2606.
?
Thanks,
TG
