2022-11-22 06:56 AM
For the upcoming project planning to use the STM32H family of uC and try to run code from flash bank1 and use the bank2 for staging the new firmware.
Once staged firmware CRC check would like to swap the code from bank2 to bank1 and reboot the device to start booting from bank1.
To start with, got the STM32H7743I-EVAL board, FLASH_SwapBank example code with the following order:
BSP_LED_Off(LED1);
BSP_LED_On(LED2);
BSP_LED_Off(LED3);
BSP_LED_On(LED1);
BSP_LED_Off(LED2);
BSP_LED_On(LED3);
After rebooting the Eval board, found that the code running from bank1 by looking at the LEDs behavior. When I pressed the “Tamper�? button the assumption is the LED behavior will change.
But it is not happening.
Appreciated help on this.
Solved! Go to Solution.
2022-11-29 07:03 AM
Hello again @avulas76,
I am investigating further the issue.
If you can work with IAR, I am sure the Led behavior works fine.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-12-06 09:53 AM
Hello, I am still struggling with this issue. I appreciate any help with this.
2022-12-08 12:17 AM
Hello @avulas76,
An internal ticket has been reported to fix the issue in CubeIDE.
Internal ticket number: 134256(This is an internal tracking number and is not accessible or usable by customers).
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-05-12 08:14 AM
Hello @avulas76,
1. Compile FLASH_SwapBank2 code with the same flash start address and vector table address than for bank 1 => same .ld file; but generate also a .bin binary file.
2. Load the Bank2 .bin (not .elf) in 0x08100000 using the STM32CubeProgramming - (Bank2 start address)
=> Depending on the value of the SWAP_BANK bit in option bytes, the address 0x08000000 points either to bank 1 or bank 2 and the address 0x08100000 points to the other bank.
- SWAP_BANK = 0: 0x08000000 > Bank 1 0x08100000 > Bank 2
- SWAP_BANK = 1: 0x08100000 > Bank 1 0x08000000 > Bank 2
For STM32H743, it is described in RM0433 Rev 8 Table 19.
Best regards