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-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.
2022-11-22 07:53 AM
Hello @avulas76,
Which revision board are you using? V revision!
Please see the AN5312 Application note Migration from RevY to RevV for STM32H743/753 and STM32H750 Value line microcontrollers, page 6: "It is not possible to swap banks on the fly".
Clearing the instruction cash is required when the codes try to swap the banks on the fly.
Have a look at the RM0433, in the "Figure 12. Flash bank swapping sequence" and check your swap banks flow.
When your question is answered, please close this topic by choosing Select as Best.
Imen
2022-11-22 09:01 AM
How do I confirm the revision of the board, The package I got says:
CPN: STM32H743I-EVAL2 and FG: VAH743I$AT1
How do I test the bank swap functionality using the ST-provided bank swap example code?
2022-11-22 09:56 AM
It's the version of the MCU
2022-11-22 11:27 AM
Hello @avulas76,
I would like to add something, not detailed in readme file, but present in the sequence as mentioned @Imen DAHMEN, in RM0433, which is, you have to Force a system reset (reset button), after each press user button (each swap) to mark the intended LED behavior.
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-11-23 07:42 AM
Thank you for your quick response. This morning I tried again and again, and not seeing the intended LED behavior with the example program. Attached is the binary read back from both banks using the Cube programmer. Any leads on this well appreciated and it takes us to finalize the use case of the uC in the schematic design.
2022-11-23 09:59 AM
The uC version we have "V"
2022-11-24 06:09 AM
Hello @avulas76 ,
Could you please verify the configuration in your project flash bank 1? and make sure in the other flash Bank 2 there is no FLASH_BANK1
Also verify, the vector table in Flash Bank 2 project should map to 0x0810 0000
and check the linker file is correctly set
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-11-28 07:32 AM
Thank you for the information, @F.Belaid.
I do see the same settings and re-tested the code several times by changing the swapping.
#ifdef FLASH_BANK2 to #ifdef FLASH_BANK1 in main.c file and confirmed the LED functionality working. But the swap functionality NOT works.
Attached are both the BANK1 and BANK2 source codes for your review.
2022-11-29 06:38 AM
Hello, we are stuck in finalizing the part. If we need to use a different example program for this evaluation board, please let us know.