cancel
Showing results for 
Search instead for 
Did you mean: 

SBSFU Rollback with stm32L476RG

Kurien_Raju
Associate

Hi All,

I am following the UM2262 document. I will add a screenshot. I enabled the ENABLE_IMAGE_STATE_HANDLING flag to enable rollback, but after updating UserApp.bin, the device continues to reset. I will add a debug log screenshot (it’s not jumping into the application). Please help me with any references for the rollback feature using the SBSFU package version 2.6.x.  

Document image 1:

Kurien_Raju_0-1735620184451.png

Debug image 2:

Kurien_Raju_1-1735620272027.png

 

 

Regards,

Raju

11 REPLIES 11
Prakash_Raj1994
Associate III

Hi @Jocelyn RICARD ,

I have tested SBSFU Example with NucleoL476RG board with not setting compiler flag ENABLE_IMAGE_STATE_HANDLING . 

1. I have flashed the Bootloader application and changing the firmware version from A,(version 1,1)B(version      1,2),C(version 1,3),D(version 1,4),E(version 1,5).  

  Working as Accepted.

2. When I have updated the ENABLE_IMAGE_STATE_HANDLING flag and commented  the SFU_MPU_USERAPP_ACTIVATION macro .

Updating the version A (version1.1) ,B(version 1.2) works fine .

when i am trying to update the C(version 1.3) Facing issue i will add the log below please help me out this

DEBUG LOG:-

======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= Secure Boot and Secure Firmware Update =
======================================================================


= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
INFO: A Reboot has been triggered by a Hardware reset!
= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD
= [SBOOT] STATE: CHECK USER FW STATUS
A FW is detected in the slot SLOT_ACTIVE_1
= [SBOOT] STATE: VERIFY USER FW SIGNATURE
= [SBOOT] STATE: EXECUTE USER FIRMWARE
======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= User App #A =
======================================================================


=================== Main Menu ============================

Download a new Fw Image ------------------------------- 1

Test Protections -------------------------------------- 2

Test SE User Code ------------------------------------- 3

Multiple download ------------------------------------- 4

Validate a FW Image------------------------------------ 5

Selection :


================ New Fw Download =========================

-- Send Firmware

-- -- Erasing download area ...

 

-- -- Programming Completed Successfully!

-- -- Bytes: 22736

-- Image correctly downloaded - reboot


= [SBOOT] System Security Check successfully passed. Starting...


======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= Secure Boot and Secure Firmware Update =
======================================================================


= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
INFO: A Reboot has been triggered by a Software reset!
= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD
= [SBOOT] STATE: CHECK USER FW STATUS
New Fw to be installed from slot SLOT_DWL_1
= [SBOOT] STATE: INSTALL NEW USER FIRMWARE
Image preparation done.
Swapping the firmware images.....................................................
========= End of Execution ==========

 

= [SBOOT] System Security Check successfully passed. Starting...


======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= Secure Boot and Secure Firmware Update =
======================================================================


= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
INFO: A Reboot has been triggered by a Software reset!
= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD
= [SBOOT] STATE: CHECK USER FW STATUS
A FW is detected in the slot SLOT_ACTIVE_1
= [SBOOT] STATE: VERIFY USER FW SIGNATURE
= [SBOOT] STATE: EXECUTE USER FIRMWARE
======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= User App #B =
======================================================================


=================== Main Menu ============================

Download a new Fw Image ------------------------------- 1

Test Protections -------------------------------------- 2

Test SE User Code ------------------------------------- 3

Multiple download ------------------------------------- 4

Validate a FW Image------------------------------------ 5

Selection :


================ New Fw Download =========================

-- Send Firmware

-- -- Erasing download area ...

-- -- File> Transfer> YMODEM> Send

-- -- Programming Completed Successfully!

-- -- Bytes: 22736

-- Image correctly downloaded - reboot


= [SBOOT] System Security Check successfully passed. Starting...

AFTER UPDATING C (1.3VERSION)
======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= Secure Boot and Secure Firmware Update =
======================================================================


= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
INFO: A Reboot has been triggered by a Software reset!
= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD
= [SBOOT] STATE: CHECK USER FW STATUS
Installation not validated: rollback procedure initiated (SLOT_ACTIVE_1 / SLOT_DWL_1)
= [SBOOT] STATE: ROLLBACK INSTALLATION TO PREVIOUS USER FIRMWARE
Backed-up fw not identified
========= End of Execution ==========

 

= [SBOOT] System Security Check successfully passed. Starting...


======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= Secure Boot and Secure Firmware Update =
======================================================================


= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
INFO: A Reboot has been triggered by a Software reset!
= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD
= [SBOOT] STATE: CHECK USER FW STATUS
New Fw to be installed from slot SLOT_DWL_1
= [SBOOT] STATE: INSTALL NEW USER FIRMWARE
Fw version rejected (anti-rollback)
= [SBOOT] STATE: HANDLE CRITICAL FAILURE
= [SBOOT] STATE: REBOOT STATE MACHINE
========= End of Execution ==========

 

= [SBOOT] System Security Check successfully passed. Starting...


======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= Secure Boot and Secure Firmware Update =
======================================================================


= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
INFO: A Reboot has been triggered by a Software reset!
= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD
= [SBOOT] STATE: CHECK USER FW STATUS
Slot SLOT_ACTIVE_1 not empty : erasing ...
No valid FW found in the active slots nor new FW to be installed
Waiting for the local download to start...
= [SBOOT] STATE: DOWNLOAD NEW USER FIRMWARE
File> Transfer> YMODEM> Send .........

 

 

Regards,

Prakash

Prakash_Raj1994
Associate III

still No response

Regards,

Prakash