cancel
Showing results for 
Search instead for 
Did you mean: 

What is preferable solution for Firmware upgrade in STM32u585ZIT6

HirenThumar2702
Associate III

 

Hello supportTeam,

Enjoy your day.

I'm developing a firmware upgrade function. STM32U585ZIT6 series controller was chosen by us for our product development, and B-U585I-IOT02A development kit was used for POC.
I'm searching for Firmware Upgrade Features in STM32U585ZIT6 Series as a result.

So i am looking Firmware upgradation features in STM32U585ZIT6 series, I refer this document "AN5447"

I have found some example solution which is provided by ST
1. SBSFU_APPLI,SBSFU_BOOT,SBSFU_LOADER
2. TFM_APPLI,TFM_BOOT,TFM_LOADER

Please advise me as to what is best for our execution. I've included several points below that are necessary for firmware upgrades.
• Upgrade firmware via UART PORT
For security purposes in field upgrades, secure boot secure upgrade functionality is necessary.(Upgrading through signed image)
• According to the section on swap mode in the UM2851 paper, when a firmware update or uart connection fails, the system switches automatically to the older firmware. Is this antirollback capability available? and how do you enable?

Which is better SBSFU_Boot or TFM_SBSFU_boot?

Thanks

Hiren R. Thumar

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Bubbles
ST Employee

Hello @HirenThumar2702,

both solutions will fulfill the requirements. I understand it may be confusing to have two solutions for the same goal, but while the TF-M is a system coming from ARM and is kept close to the original form, the other SBSFU is TF-M modified to be more accommodating to users of our previous SBSFU.

Both are part of the STM32CubeU5 package, so please just download it and see the projects, you can build and evaluate for yourself.

I think you will end up with the TFM, but you know your needs best.

For the anti rollbacks, the versioning is in your hands fully. Then you will probably want to go with local loader option and change the image upgrade strategy, both are described well in the projects readme files.

BR,

J

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.

View solution in original post

2 REPLIES 2
Bubbles
ST Employee

Hello @HirenThumar2702,

both solutions will fulfill the requirements. I understand it may be confusing to have two solutions for the same goal, but while the TF-M is a system coming from ARM and is kept close to the original form, the other SBSFU is TF-M modified to be more accommodating to users of our previous SBSFU.

Both are part of the STM32CubeU5 package, so please just download it and see the projects, you can build and evaluate for yourself.

I think you will end up with the TFM, but you know your needs best.

For the anti rollbacks, the versioning is in your hands fully. Then you will probably want to go with local loader option and change the image upgrade strategy, both are described well in the projects readme files.

BR,

J

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.

HirenThumar2702
Associate III

Greetings, SupportTeam

I thank you providing this suggestion.

In accordance with your advice, I used TFM-SBSFU_Boot with TFM_Loader to upgrade the firmware on the device.

I have successfully accessed the local loader and the app loader, in accordance with the UM2851 whitepaper.

however, I am unable to succeed when I upgrade to the latest firmware at that moment.

I've attached the error report I received below while attempting to load the firmware using TFM_LOADER or TFM_APP.

Can you give suggestions on how to fix that issue?

[2023-06-21 11:21:18.382] Booting TFM v1.3.0
[2023-06-21 11:21:18.389]
[2023-06-21 11:21:18.389] ======================================================================
[2023-06-21 11:21:18.400] = (C) COPYRIGHT 2021 STMicroelectronics =
[2023-06-21 11:21:18.406] = =
[2023-06-21 11:21:18.413] = User App #A =
[2023-06-21 11:21:18.420] ======================================================================
[2023-06-21 11:21:18.426]
[2023-06-21 11:21:18.426]
[2023-06-21 11:21:18.426] =================== Main Menu ============================
[2023-06-21 11:21:18.429]
[2023-06-21 11:21:18.429] Test Protections -------------------------------------- 1
[2023-06-21 11:21:18.441]
[2023-06-21 11:21:18.441] Test TFM ---------------------------------------------- 2
[2023-06-21 11:21:18.441]
[2023-06-21 11:21:18.441] New Fw Image ------------------------------------------ 3
[2023-06-21 11:21:18.447]
[2023-06-21 11:21:18.447] Non-Secure Data --------------------------------------- 4
[2023-06-21 11:21:18.450]
[2023-06-21 11:21:18.450] Selection :
[2023-06-21 11:21:18.459]
[2023-06-21 11:21:31.556]
[2023-06-21 11:21:31.562] ================ New Fw Image TFM_APP============================
[2023-06-21 11:21:31.563]
[2023-06-21 11:21:31.563] Reset to trigger Installation ------------------------- 1
[2023-06-21 11:21:31.570]
[2023-06-21 11:21:31.570] Download Secure App Image ----------------------------- 2
[2023-06-21 11:21:31.577]
[2023-06-21 11:21:31.577] Download NonSecure App Image -------------------------- 3
[2023-06-21 11:21:31.584]
[2023-06-21 11:21:31.584] Download Secure Data Image ---------------------------- 4
[2023-06-21 11:21:31.586]
[2023-06-21 11:21:31.586] Download NonSecure Data Image ------------------------- 5
[2023-06-21 11:21:31.596]
[2023-06-21 11:21:31.596] Previous Menu ----------------------------------------- x
[2023-06-21 11:21:31.598]
[2023-06-21 11:21:44.845] Download NonSecure App Image
[2023-06-21 11:21:44.848] -- Erasing download area
[2023-06-21 11:21:44.853]
[2023-06-21 11:21:44.923] -- Send Firmware
[2023-06-21 11:21:44.926]
[2023-06-21 11:21:44.926] -- -- File> Transfer> YMODEM> Send
[2023-06-21 11:21:46.913] C.e_result = 0 , 3
[2023-06-21 11:22:24.171]
[2023-06-21 11:22:24.171]
[2023-06-21 11:22:24.171] -- -- Programming Completed Successfully!
[2023-06-21 11:22:24.171]
[2023-06-21 11:22:24.171] -- -- Bytes: 41932
[2023-06-21 11:22:24.171]
[2023-06-21 11:22:24.171] Write Magic Trailer at 1c9ff0
[2023-06-21 11:22:24.171]
[2023-06-21 11:22:24.171] -- NonSecure App Image correctly downloaded
[2023-06-21 11:22:24.179]
[2023-06-21 11:22:25.166]
[2023-06-21 11:22:25.166] ================ New Fw Image TFM_APP============================
[2023-06-21 11:22:25.173]
[2023-06-21 11:22:25.173] Reset to trigger Installation ------------------------- 1
[2023-06-21 11:22:25.180]
[2023-06-21 11:22:25.180] Download Secure App Image ----------------------------- 2
[2023-06-21 11:22:25.186]
[2023-06-21 11:22:25.186] Download NonSecure App Image -------------------------- 3
[2023-06-21 11:22:25.192]
[2023-06-21 11:22:25.192] Download Secure Data Image ---------------------------- 4
[2023-06-21 11:22:25.200]
[2023-06-21 11:22:25.200] Download NonSecure Data Image ------------------------- 5
[2023-06-21 11:22:25.200]
[2023-06-21 11:22:25.200] Previous Menu ----------------------------------------- x
[2023-06-21 11:22:25.208]
[2023-06-21 11:22:31.276] -- Install image : reboot
[2023-06-21 11:22:31.280]
[2023-06-21 11:22:31.290] [INF] TAMPER SEED [0x1d756fba,0x3c9151c,0xccc99288,0x58de6245]
[2023-06-21 11:22:31.296] [INF] TAMPER Activated
[2023-06-21 11:22:31.299] [INF] Flash operation: Op=0x0, Area=0x0, Address=0x0
[2023-06-21 11:22:31.310] [INF] Starting bootloader
[2023-06-21 11:22:31.310] [INF] Checking BL2 NV area
[2023-06-21 11:22:31.310] [INF] Checking BL2 NV area header
[2023-06-21 11:22:31.311] [INF] Checking BL2 NV Counter consistency
[2023-06-21 11:22:31.323] [INF] Consistent BL2 NV Counter 3 = 0x1000000
[2023-06-21 11:22:31.323] [INF] Consistent BL2 NV Counter 4 = 0x1000000
[2023-06-21 11:22:31.324] [INF] Consistent BL2 NV Counter 5 = 0x1000000
[2023-06-21 11:22:31.335] [INF] Consistent BL2 NV Counter 6 = 0x1000000
[2023-06-21 11:22:31.335] [INF] Swap type: none
[2023-06-21 11:22:31.335] [INF] Swap type: test
[2023-06-21 11:22:31.348] [INF] verify counter 1 1000000 1000000
[2023-06-21 11:22:31.348] [INF] counter 1 : ok
[2023-06-21 11:22:31.515] [ERR] Image in the secondary slot is not valid!
[2023-06-21 11:22:31.520] [INF] Swap type: none
[2023-06-21 11:22:31.520] [INF] Swap type: none
[2023-06-21 11:22:31.533] [INF] verify counter 0 1000000 1000000
[2023-06-21 11:22:31.535] [INF] counter 0 : ok
[2023-06-21 11:22:31.536] [INF] hash ref OK
[2023-06-21 11:22:31.546] [INF] verify counter 1 1000000 1000000
[2023-06-21 11:22:31.547] [INF] counter 1 : ok
[2023-06-21 11:22:31.547] [INF] hash ref OK
[2023-06-21 11:22:31.557] [INF] verify counter 2 1000000 1000000
[2023-06-21 11:22:31.559] [INF] counter 2 : ok
[2023-06-21 11:22:31.559] [INF] hash ref OK
[2023-06-21 11:22:31.559] [INF] verify counter 3 1000000 1000000
[2023-06-21 11:22:31.570] [INF] counter 3 : ok
[2023-06-21 11:22:31.571] [INF] hash ref OK
[2023-06-21 11:22:31.571] [INF] Bootloader chainload address offset: 0x28000
[2023-06-21 11:22:31.571] [INF] Jumping to the first image slot
[2023-06-21 11:22:31.581] [INF] BL2 HUK 5f5f5f5f5f4b5548..5f45554c5f5f5f5f set to BL2 SHARED DATA
[2023-06-21 11:22:31.584] [INF] BL2 SEED b1f260989ce6c761..26b43e44bca5c27a set to BL2 SHARED DATA
[2023-06-21 11:22:31.592] [INF] Code c006000 c018820
[2023-06-21 11:22:31.599] [INF] hash TFM_SBSFU_Boot 2e94117 .. 6f5c17a2
[2023-06-21 11:22:31.601] [Sec Thread] Secure image initializing!
[2023-06-21 11:22:31.610] TF-M isolation level is: 0x00000002
[2023-06-21 11:22:31.612] Booting TFM v1.3.0
[2023-06-21 11:22:31.618]
[2023-06-21 11:22:31.618] ======================================================================