AN6007 · Application noteGetting started with STiRoT (ST immutable Root of Trust) for STM32H5 MCUs
Download .pdfOpen in the full document

STiRoT execution status

STiRoT execution status

STiRoT is executed as a black box, but there is a way to verify the steps that have been executed and in case of an issue where the STiRoT execution has stopped.

For each HDPL OBKeys, there are four bytes reserved for the status log. This information can be extracted using the debug Authentication discovery command (refer to AN6007_generalinformation.html#id_62441__p_x5v_rzn_4yb for more information).

Table 15. Execution status
Executed stepStatus codingDescription
STIROT_INIT_DONE0x00000001ULDevice initialization done. STiRoT bootpath selected. STiRoT executed.
STIROT_CONFIG_DONE0x00000002ULSTiRoT configuration according to STiRoT_Config.obk is verified to be correct in OBKeys HDPL1.
STIROT_SECURITY_DONE0x00000004ULSecurity activated. OBKeys STiRoT configuration verified to be correct.

STIROT_SLOT_PRIMARY_1
_VALID

0x00000010ULAuthenticity and integrity verified for the user application firmware image in the execution slot.

STIROT_SLOT_PRIMARY_2
_VALID

0x00000020ULAuthenticity and integrity verified for the data image in the HDPL2 OBKeys secure storage.
STIROT_SLOT_SECONDARY_1_VALID0x00000040ULAuthenticity and integrity verified for the user application firmware image in the download slot.
STIROT_SLOT_SECONDARY_2_VALID0x00000080ULAuthenticity and integrity verified for the data image in the download slot.
STIROT_PARSING_DONE0x00000100ULSlots parsing done.
STIROT_INSTALLATION_DONE0x00000200ULImage(s) in the download slot (one or two images depending on config) are installed.
STIROT_VALIDATION_DONE0x00000400ULExecution slots analysis completed to verify which image is valid (integrity and authenticity).
STIROT_JUMP_BL0x00001000ULAt least one image is not valid -> bootloader execution.
STIROT_JUMP_APPLI0x00002000ULAll images (one or two depending on config) are valid -> application execution.
STIROT_NOJUMP0x00004000ULAt least one image is not valid, but bootloader execution is not allowed (option defined in STiRoT_Config.xml).

Troubleshooting

Table 16. Troubleshooting
ProblemPossible solution
Provisioning errors in ob_flash_programming.bat script STM32CubeProgrammer is still connected to the device.
Provisioning errorsDevice is not in OPEN product state: regression.bat script must be executed.

Revision history

Table 17. Document revision history
DateRevisionChanges
21-Sep-20231Initial release.
19-Mar-20242

Terminology updated.

Appendix added: Appendix G: Troubleshooting

20-Mar-20243Topic updated: Section 1: General information
08-Jan-20254Section 2.4: STiRoT constraints added.
03-Mar-20255Appendix D: STiRoT Data.obk file format added.
13-Jun-20256

Updated:

  • Section 2.4: STiRoT constraints
  • Figure 6. STiRoT provisioning process
  • Section 4: OBKeys configuration file
  • Section 5: Images generation
  • Figure 7. Firmware image generation
  • Figure 8. Data image generation
17-Dec-20257Added:
  • Section 5.1: Initial firmware image generation
  • Section 5.3: Initial data image generation
  • Appendix E: Code init image XML file
  • Appendix G: Data init image XML file

Updated:

  • Section 2.1: Overview
  • Section 2.4: STiRoT constraints
  • Section 3: Provisioning process
  • Section 5.2: Update firmware image generation
  • Section 5.4: Update data image generation
  • Appendix F: Code image XML file
  • Appendix H: Data image XML file
  • Section 4: OBKeys configuration file
  • Appendix C: STiRoT Config.obk file format
11-Feb-20268Added STM32H5F5xx part number to the document
15-Jun-20269Added STM32H553xx part number to the document