2020-05-11 09:03 AM
Hi,
I'm trying to get the dual bank image swap feature of the STM32G4 to work, so far without success.
I tried first on my own board by following the (very sparse) information in the reference manual. However every time I set the BFB2 bit in software and reboot afterwards, the code in bank 2 doesn't seem to execute at all (and yes, address 0x08040000 is pointing to a valid RAM location for the stackpointer)
I finally decided to just try the example code from the firmware package (see https://github.com/STMicroelectronics/STM32CubeG4/tree/master/Projects/NUCLEO-G474RE/Examples/FLASH/FLASH_DualBoot) on my Nucleo G474RE eval board, just to verify the feature is actually working. However it seems to me that even this example program is not working!
Maybe I am doing something wrong here and someone can help me.
So here are my steps:
Could someone verify this behavior?
Attached you can find screenshots of the flash content and option bytes set.
2020-05-13 01:18 AM
Anyone? @Imen DAHMEN @Imen GH
(actually seems to be a duplicate of https://community.st.com/s/question/0D50X0000CEqc1SSQR/dual-boot-on-the-stm32g4-not-quite-working-boot-from-second-bank-fails but there's no answer in the this post as well)
2020-06-11 05:25 AM
Hello @MScho.1 ,
After analysis, this issue is due to bootloader and it has been fixed with bootloader version 13.4.
So, can you please confirm that you are using a board with bootloader v13.4? or share the binary of the applications that you load in Bank1 and Bank2 ?
In fact, the example is not working as you reported when using bootloader v13.3 and older.
To be ensure that the bootloader version used is v13.4, please folow these steps:
- connect the board to STM32Cubeprogrammer
- read the address 0x1FFF6FFE
- the first bytes must have value 0xD4:
D ==> 13
4 ==> .4
Otherwise, the FLASH Dual Boot example will not be working with older releases.
Note that the example is working using IAR toolchain and BL 13.4, but we have the same issue as you reported when using Bootloader v13.3 and 13.2 .
Best Regards,
Imen
2020-06-16 04:02 AM
Will continue the discussion in https://community.st.com/s/question/0D50X0000CEqc1SSQR/dual-boot-on-the-stm32g4-not-quite-working-boot-from-second-bank-fails. I think you can close this issue here, @Imen DAHMEN .