Ask questions and find answers on STM32 security frameworks and tools, including cryptographic libraries, TrustZone, and the Secure Manager.
Most recent activity
Hi all,can anyone pls suggest any leads to understand more on the anti tamper, i want to understand more on the internal tamper, external tamper , active and passive tamper in details, if any leads would be a great help,
Greetings, supportTeamEnjoy your day. I'm working on the STM32U585 Series' firmware upgrade procedure. I have a development kit (B-U585I-IOT02A) for POC purposes. I'm using TFM-boot, TFM-Loader, and TFM-Application for firmware upgrades. I activated swap mode and double-checked that everything was functioning properly. how to switch from TFM-Application to the our application that which we generated As per our requirement we require TFM-Boot,TFM-Loader and jump to our created application I altered.ld file address but I've been unsuccessful in integrating it, so could you please advise me on how to integrate TFM-APP with our own project? Or Please provide me the TFM-Application project of.ioc file so that we can use it and initialise all the drivers as needed. Thanks Hiren R. Thumar
We currently utilize the STM32H7B0xB microcontroller, which offers 1.4 MBytes of RAM and 128KBytes of flash memory. While exploring the SBSFU examples found examples for running from external flash directly, I could not locate one that specifically demonstrates running the application from the RAM region for SBSFU. Is it supported?
Greetings, supportTeamEnjoy your day. I'm working on the STM32U585 Series' firmware upgrade procedure. I have a development kit (B-U585I-IOT02A) for POC purposes. I'm using TFM-boot, TFM-Loader, and TFM-Application for firmware upgrades. I activated swap mode and double-checked that everything was functioning properly. how to switch from TFM-Application to the our application that which we generated which step is needed for replace TFM-Application to our created Application as per our requirement we require TFM-Boot,TFM-Loader and jump to our created application I altered.ld file address but I've been unsuccessful in integrating it, so could you please advise me on how to integrate TFM-APP with our own project? ThanksHiren R. Thumar
Hello,I need a quick confirmation. Assuming I have correctly provisioned OEM1KEY and OEM2KEY and I don't use OTP memory, I will always be able to revert my STM32U585 chip from RDP level 2 to blank state (RDP level 0, erased Flash, TrustZone disabled) and then be able to program again a brend new firmware.Is that right?
Hello,I am working on integrating SBSFU with the STM32F4 controller. The target controller is F429.I am trying to build an example project. It is a single image slot project which is developed for STM32F413H. I build the SE_Corebin project first and I am getting the following error. ################################################################Core/se_callgate.c:462:25: error: 'SE_FW_IMAGE_COMPLETE' undeclared (first use in this function); did you mean 'SE_FW_HEADER_TOT_LEN'? if ((se_FwType != SE_FW_IMAGE_COMPLETE) && (se_FwType != SE_FW_IMAGE_PARTIAL)) ^~~~~~~~~~~~~~~~~~~~ SE_FW_HEADER_TOT_LENCore/se_callgate.c:462:64: error: 'SE_FW_IMAGE_PARTIAL' undeclared################################################################I couldn't find these macros. Can anyone help me resolve this?
Hello supportTeam,Enjoy your day.I'm developing a firmware upgrade function(Bootloader). STM32U585ZIT6 series controller was chosen by us for our product development, and B-U585I-IOT02A development kit was used for POC.A firmware update solution is given to the ST Team below i explain which i understand1. TFM_BOOT(The bootloader)2. TFM_APPLI( it is execute with our running application and received bin file through y-modem protocol )3. TFM_LOADER (it runs independently and receives bin files using Ymodem technology).I successfully upgraded firmware using the above technique and also successfully built using the Enable swap mode functionality.While TFM_LOADER works independently, TFM_APPLI works with our active application project.however as I'll discuss below, I have some questions about TFM_APPLI and TFM_LOADER.1.can I integrate the TFM_APPLI feature (test protection, test TFM, validate secure and non-secure image, and re-install secure and non-secure image) into the TFM_LOAD
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 ST1. SBSFU_APPLI,SBSFU_BOOT,SBSFU_LOADER2. TFM_APPLI,TFM_BOOT,TFM_LOADERPlease 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 antirollbac
I thought this would be simple, open up the STMCubeProgrammer, connect to the programmed device, select RDP, select BB read protection (CC means the MCU can never be reprogrammed so no user-done code updates!!) and then Apply!But no, the board screen goes blank and it stops working!Anyone got this working...? (for sure I missed something obvious?!)
Hi, we have to use a secure bootloader for STM32U585.I have reading documentation about SFI and SBSFU and I am confusing.1) Is theresomewhere a porting of SBSFU on this device?We want to use a custom secureBootloader that only check update inside external memory and flash it if securitycheck is ok.I have written all the code to do it. But I don’t know where to store my RSA KEY. I want to use both RHUK and BHK.2) Where is the correct location to store BHK and RHUK key fir a correct security use?If I am correct from my SBSFU reading, KEYs are just stored inside Internal Secure Flash (0x0C000000) and RDP is used to limit access to Flash from DEBUG port (SWD/JTAG).3) If yes why this key are not accessible to application? Is it because Application should not be executed in secure world?Thanks to help me
Hello supportTeam,Have a good day.we are working on the STM32U585ZIT6Q controller. I turned on the trust zone option in this controller.I have a few questions about the priority of peripheral interrupts, which I explain below.1. What happens if an ISR for a secure area peripheral interrupt execution is running while a non-secure region peripheral interrupt is occur?2. What happens if an ISR for a non secure area peripheral interrupt execution is running while a secure region peripheral interrupt is occur?3. If both(secure and non-secure) region receive peripheral interrupts at the same time, which secure/non-secure region has a higher priority in terms of peripheral interruptions? 4. According to our project, secure area peripherals should have a higher priority. How can I make this secure region peripheral have a higher priority?It would be appreciated to share the possible solution so, we can do better development.ThanksHiren R. Thumar
Hello,Im using STM32F723 and using the Cryptographic Library (https://wiki.stmicroelectronics.cn/stm32mcu/wiki/Security:Getting_started_with_the_Cryptographic_Library).When testing basic cmox_aead_encrypt and cmox_aead_decrypt example it works fine.But with the target of using FreeRTOS on the MCU, I tried to switch to TIM1 for the Timebase Source, because when using FreeRTOS this has to be changed from Systick to TIMx.But only with changing SysTick to Tim1 and NOT enabling FreeRtos I get a HardFault calling the crypto function like (cmox_aead_decrypt).retval = cmox_aead_decrypt(CMOX_AES_GCM_DEC_ALGO, /* Use AES GCM algorithm */ message_rx.payload.ciphertext, sizeof(msg_tag), /* Ciphertext + tag to decrypt and verify */ sizeof(Expected_Tag), /* Authentication tag size */ Key, sizeof(Key), /* AES key to use */ IV, sizeof(IV), /* Initialization vector */ NULL, 0, /* Additional authenticated data */ decrypted_msg, &computed_size); /* Data buffer to receive generated plaintext */I
Hi;I am using STM32U585ZIT6Q controller in my current project. I am enabled Trust Zone option. I am using dual bank option too.I have created two partition in both bank as in attached image.When i try to update firmware using STM32 cube programmer, able to read and erase non-secure section as well as able to update firmware using system bootloader via USART1.But when i try to erase, read and update secure section ,not able to do that.I make RDP level 0(default).nBOOT0 pin level high for boot mode.Please guide me for same.
I have recently adapted the STM32H753ZI-Nucleo SBSFU project to run on the H745ZI-Q, but only on the CM7. I am trying to adapt the project to handle another active image slot dedicated to the CM4, but I am having a bit of a problem with the firmware headers.As stated in section 3.2.4 of the integration guide (AN5056): "As a constraint, all the headers must be grouped in a single area to be protected inside the isolated environment. Each header must be located in its own Flash memory sector."Following this guideline and the example shown, I mapped the header of the first active slot to 0x0802000 and the header of the second active slot to 0x084000. The firmware images start at 0x0806000 and 0x0812000 respectively.I changed the size of the header MPU region to 256K to cover both sectors of the header, but when the board is flashed, the SBSFU fails to run. Turning on the verbose debug mode produces this output:Seeing this, I changed the mapping and tried to see if I could group the header
Having difficulty gaining access a peripheral region in the bootloader and could use some suggestions.In the bootloader we need to MAP the address space described below, this address space works correctly in the application but not in the bootloader. /* Setup Memory Mapped LCD in Write-through (framebuffer) */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x64000000; MPU_InitStruct.Size = MPU_REGION_SIZE_32MB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER2; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0x00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; HAL_MP
I have a large block of data to encrypt (about 200 Kbytes). I don't care about preserving the input data and I'd like to save memory.Can t I set the output buffer pointer to the same value as the input buffer pointer using the HAL AES encrypt function?I couldn't find any information on this. Am I the only one to have ever asked this?
The board connects but when I build and run the project, the light does not blink as it says it should. Also, I'm using mac, how do I import cryptolib into an existing project? I followed this instructions and this wiki but it's not working.
Hello everyone,I'm trying to adapt the STM32CubeU5/Projects/B-U585I-IOT02A/Applications/SBSFU at main · STMicroelectronics/STM32CubeU5 · GitHub for another U5 chip. I'm trying to print the non secure app with uart but I am stuck at "Jumping to the first image slot ". I am working on IAR and in my secure app code, when going in NonSecure_ResetHandler(); I enter SecureFault_Handler of stm32u5xx_it.c and stay stuck in the while(1). I have #define VTOR_TABLE_NS_START_ADDR NS_CODE_START and the adress of the non secure code seems good. Any idea ?Thanks in advance
Hello everyone,I'm working on https://www.st.com/resource/en/user_manual/um2851-getting-started-with-stm32cubeu5-tfm-application-stmicroelectronics.pdf and try to adapt it to a STM32U5Axx.The NS app launch successfully but the Test protection already included in the NS App is not working as wanted.The two firsts tests that it is doing are DENIED, which seems normal, and which normally should provoke a reset as written in page 59. This behaviour is well executed for the next tests but not for the two first one that leads to a TEST Protection : Failed. Any idea why ? Thanks in advance,Thomas
I need to know how to build binaries (RSS, User Flash App with OTA, Wireless stack) for STM32WB series.Can you share any document regarding building these binaries?
Hello! ST community. Good day to you all! Hope you guys are doing well.Currently. I am trying to understand the Trusted Zone feature of STM32H573VIT6.I have activated this feature and trying to test downloading the Secured version of fw inside flash. I am doing following test to understand if the system behaves correctly (after the fw download). Test 1: Using IAR ide's ----> "Download and debug" feature (where make and rebuild the project and finally download and debug)Test 2: Using STM32CubeProgrammer's ---> "Download" feature (where insert the directory path of Secured version of hex file which is generated on IAR ide and then use the "Start programming" option)By the way, we have activated a debug pin to visualize the signal in Oscilloscope [to obtain feedback when fw download finishes and run on the system. It is --> "HAL_GPIO_WritePin(GPIO_BKLight_GPIO_Port, GPIO_BKLight_Pin, GPIO_PIN_SET). Check the screenshot in attachment section]If I do the fw
I have an STM32L073CZ that I'm having an occasional error with. I'm using the HAL libraries to program EEPROM and a number of our MCUs are seeing errors where they fail to write the first word. After that it'll start working correctly and everything is fine, but the first time always fails.Stepping through the code I can see that I'm successfully unlocking flash and that there are no pending operations. It's in the flag check that's I'm getting errors: if( __HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_PGAERR) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_SIZERR) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_OPTVERR) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_RDERR) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_FWWERR) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_NOTZEROERR) ) {From FLASH_WaitForLastOperation that is called before the write operation in HAL_FLASHEx_DATAEEPROM_Program.Examining the SFR's I can see that:WRPERR == 1PGAERR == 0SIZE_ERR == 0OPTV_ERR == 0RDERR == 0FWWERR == 0NO_ZERO_E
Hi all, I am exploring the security features available on STM32 platform and I read the document (KMS-MW Brief Data). I need some more details on that. Can you share some documents regarding it?
Hello, I know this has been discussed before, but following your procedure i am still unable to generate with srec_cat the same CRC of one generated by STM32 CRC hw peripheral.did you make some other tricks in order to have match between the two CRC calculation over the whole STM32F746G 1MB of flash?I post my chesum.bat file launched in post compliation..\srec_cat.exe %1 -Intel -fill 0xFF 0x08000000 0x080FFFFC -STM32 0x080FFFFC -o 06_F746-DISCO-CRC_SRECORD.hex -Intel
The key which signs and encrypts the userApp is compiled along with the SBSFU and generates as a complete binary with keys by using STM32CubeIDE.Is there any way to change this key after the build process of SBSFU?
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.