HSM (hardware secure modules) is used as a license generation tool necessering during SFI programming procedure.
1. Preparing necessary files:
Preparation of the keys (AES128Key.bin and Nonce.bin) ,this files can by generated by STM32 Trusted Package Creator tool, they must be the same as when they were used during SFI binary file generation.
Correct personalization data file from STM32CubeProgrammer install folder
2. How pick correct personalization data file:
To choose the right one personalization data file need know first signs of chip certificate MCU family which one You want programming. You can read chip certificate via GangFlasher-ST
Open window “STM32 Trusted Programming setup”(Setup ->SSP/SFI)
Check “SFI Enable” box
Select the target from which you want to read the certificate
Click Read button and select folder where want to save certificate
Open file in notepad - first eight sings in file are same like name correct personalization data file.
Example certificate from STM32U5 mcu.
4820200B ¶‚ĹŽî"C,×Vš\ˆżĽĚ*ű2ÎłčÇÔC#PFWQŇłÁ–PףśH
3. HSM generation
To validate the HSM programming request, the user has to
set firmware identifier, used to identifies the correct HSM
indicate files prepared in first step
select personalization data this file can be found in STM32CubeProgrammer tool install folder.
Useful links
STMicroelectronics application notes and user manuals:
[1] UM2238 - STM32 Trusted Package Creator tool software description