Get ready for the STM32 Summit 2026 | Online, November 3
Ask questions and find answers on STM32 security frameworks and tools, including cryptographic libraries, TrustZone, and the Secure Manager.
Most recent activity
Hello everyone,My team and I are working with a custom board based on the STM32WB55RG. Due to limited pin availability, we need to use USB as a virtual COM port for serial communication. We successfully configured the USB Virtual COM and were able to print messages on the console without any issues.However, we encountered a problem after integrating SBSFU.The USB Virtual COM works fine within the SBSFU application, but once the SBSFU process completes and our custom application starts, the USB stops functioning. We can no longer see messages in the terminal, even though our application is running as expected by debugging it with the USART / LPUART.We have already checked the USB and clock configurations in both the SBSFU app and our custom application, and everything seems to be set up correctly. Furthermore, we also attempted the following:Forcing a USB re-enumeration by pulling the D+ pin low for a few milliseconds.Playing around with initializing and de-initializing the USB in both
Hi,we are experiencing an issue with the STM32G0B0 when RDP level 1 is enabled, following the steps below:Flash the device using J-LinkStart the device and let the application set RDP = 1Enter the STM32 ROM bootloader (via UART)Disable RDP protection (perform mass erase)Program new firmware with bootloaderReboot the device and set RDP = 1 againAfter this sequence, the device remains locked.Even if we apply multiple resets using the NRST pin, the device does not recover.The only way to unlock the device is to completely power-cycle it (turn the power off and on again).Is it possible to re-enable RDP protection and start the new firmware without removing power from the device?Thank you for your support.
I have the NUCLEO-H753ZI example running on my board. All works fine without the security features. When I enable both the SFU_MPU_PROTECT_ENABLE and SFU_IWDG_PROTECT_ENABLE. I keep having a watchdog when it tries to execute the firmware. I commented the #define SFU_IWDG_PROTECT_ENABLE and enable the SFU_VERBOSE_DEBUG_MODE. It gets stuck at verifying the user FW as shown below.= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL= [SBOOT] STATE: CHECK STATUS ON RESETINFO: A Reboot has been triggered by a Hardware reset!= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD= [SBOOT] STATE: CHECK USER FW STATUSA FW is detected in the slot SLOT_ACTIVE_1= [SBOOT] STATE: VERIFY USER FW SIGNATUREWhen I breakpoint I can see that it is stuck at this as USB stops running after the first SFU_LL_SECU_SetProtectionMPU call which is the SFU_INITIAL_CONFIGURATION.TRACE(" @%d:%x size:%x sub:%x perm:%x exec:%x\r\n",MPU_InitStruct.Number, MPU_InitStruct.BaseAddress, MPU_InitStr
Can you help with new research on secure boot? I am a cyber security researcher at the University of Bristol in the UK. I would like to your views on Secure boot. My area of interest is developer-centred security, specifically in the issues that developers face when trying to build secure IoT devices. If you have ever looked at implementing secure boot, or used it in your current development, or maybe think it to complicated, then I would really like to hear from you. Please take just 8 to 10 minutes to do this short survey on secure boot. https://universityofbristol.eu.qualtrics.com/jfe/form/SV_06xKUNve9ioJ5T8 If you have any questions, you can contact the researchers directly at fe23957@bristol.ac.uk
Hello. I am experimenting with securing a STM32H503 using password authentication, which will ultimately be an automated process.I created a simple password for testing and created the password hash in board_password.bin and da_password.bin(just for comparison, I also used Segger's advice and tried certutil and the resulting board_password.bin file is identical, so I'm pretty sure the password hash worked).I set the chip to PRODUCT_STATE provisioning and programmed the chip with the password using the following:STM32_Programmer_CLI.exe -c port=SWD speed=fast ap=1 mode=Hotplug -ob PRODUCT_STATE=0x17STM32_Programmer_CLI.exe -c port=SWD speed=fast ap=1 mode=Hotplug -w board_password.bin 0x8FFF000Both of these commands succeeded with no errorsAs recommended, I locked the OTP so I wouldn't accidentally damage it by overwriting by:STM32_Programmer_CLI.exe -c port=SWD speed=fast ap=1 mode=Hotplug -ob LOCKBL=0x1Again, no errorsFinally I set PRODUCT_STATE to PROVISIONED and aga
I have legacy SBSFU based system running on an stm32f429 for a few years now, based on the STM32F413ZHT6 demo code that was present in the package. I am now interesting to using the KMS feature of SBSFU but after reading um2622 /seeing https://www.youtube.com/watch?v=YjiNaTHQp2s I am a bit at a dead end on how to start as none of the kms files seem to be compiled in my bootloader. I am now getting the impression there is no KMS support at all on an stm32F4, this based on the fact that for example Figure 14 with the project folder structure in um26222 shows images with _KMS but this does not exist for the stm32f4 version I started from. So is KMS a no-go on STM32F4 because it uses features not available on STM32F4 ?Looking at Figure 4 SBSFU security IPs vs. STM32 series of um2262 this seems to be the case if I understand that correctly (it seems to be needing this Firewall thing) ?If it is not supported, I would suggest adding this information at the very
I am trying to integrate a very simple TouchGFX Application into the SBSFU (I only really need SB right now) application, on STM32U5A9J-DKI've switched out the Nonsecure application for mine, I've modified flash_layout to do primary only, no external loader, 1 image. I modified the template loader script to have a Framebuffer section that spans SRAM3 (minus the secure section) and SRAM5. I'm using the startup_stm32...c that the original nonsecure application uses.Right now. It builds and boots, and shows "Jumping to first Image Slot" and just sits. I think it's getting into the Appli_Secure, because the Users LEDs on my board are lighting up.I found some verbiage elsewhere that indicates that I likely need to unsecure the IOs and SRAMs that the new NonSecure application uses, but when I start doing that, things go haywire.For example, I've got my project setup so that I can switch back to using the original demo Appli_NonSecure with my modifed flash_layout.h and linker script, and so I
I've been watching the MOOC - Security series and had some questions. There is a link in the info block to a forum for any questions, but the link no longer works. https://www.youtube.com/watch?v=g7ykhnmh7sAIs this the right place?I got to the end of "Security Part4 - STM32 security in practice - 15 Secure firmware update" and had some questions since there isn't any lab video for this module like there are for the modules that came before it.
I am working with the STM32U585RIT6 and need to implement a secure firmware update. In my application code, I don’t want to handle flash management or low-level update logic. I only want to generate a secure binary file and perform the update.I reviewed the SBSFU and X-CUBE-SFI examples. The X-CUBE-SFI solution requires a license and an HSM card, which I do not want to use. The SBSFU example available under B-U585I-IOT02A/Projects/Application/SBSFU involves multiple procedures and is somewhat difficult to understand.Given these constraints, how should I approach implementing a secure firmware update?
Hi all,I was doing a firmware update from my raspberrypi to my MCU through I2C, and I facing this write protection issue.On initial flash with swd, I was flashing bootloader + main app to their required locations with their meta data like CRC program length into flash locations 0x08012810, 0x08012820 respectively. I am facing this issue while I try to erase and program new value "Write protection error at 0x08012800 - check flash protection settings".Mcu used : STM32G070CBT6 (F: 128 Kb, R: 36kb), , Page size 2KBOption bytes used : WRP1A_STRT = 0x3f WRP1A_END = 0x00, WRP1B_STRT = 0x3f WRP1B_END = 0x00
Hello, I am trying to use SAES with a wrapped key to decrypt firmware updates on an stm32u5g9vjtxq. I am not sure how I should be changing the InitVect in CRYP_AES_CBC mode after hcryp is already initialized with HAL_CRYP_Init. To elaborate on what I am trying to do I have created a wrapped key that is being stored in OTP memory along with the IV used to encrypt / decrypt that wrapped key. My bootloader calls HAL_CRYPEx_UnwrapKey using the OTP memory address of the wrapped key and the IV also stored in OTP. I then want to change the IV to match that of what was used to encrypt the new firmware image, the unwrapped key is what was used to encrypt the firmware image. I am not sure how to accomplish this without having to call HAL_CRYP_Init again...I think the second call to HAL_CRYP_Init looses the unwrapped key and replaces it with whatever is defined in hcryp.Init.KeySelect which I have set to CRYP_KEYSEL_HW.To summarize I need to be abl
Hello,I would like clarification on the behaviour of STM32U3 devices when Readout Protection (RDP) Level 1 is enabled.Configuration:TrustZone: DisabledDebug interface: SWD/JTAGQuestions:With RDP Level 1, is Flash completely unreadable by any third-party tool or by any boot mode (system memory boot, RAM boot, etc.), except when accessed by application code running on the MCU?With RDP Level 1, is application debugging still supported (attach debugger, halt, step, breakpoints), and are there any known limitations compared to RDP Level 0?Any confirmation or documentation reference would be appreciated.Thank you,Vijay
Hi, I am trying to implement DA on an stm32H563, I have created the .obk file, and was selected in the Stm32Programmer. I have changed the product_state to provisioning and I got the message "Do you want to use the default?"I clicked YES and I got the default DA, located in ..\STM32CubeProgrammer\bin\DA_Default_Config\STM32H5I was able to perform a full regression and then I tried again to flash and secure the chip, and this time I did choose "NO" to the default. Now I have tried my DA password and the default and none of them works. Also, I did at first tried to provision the mcu with my obk file, but was complaining about the OB not in provisioning. So after the provisioning I got locked out.Can the board be saved in any way or I have just bricked an mcu?I am using the STM32H563 NucleoThanksAle
I'm working on a project which is being ported over to be TrustZone aware, part of this project makes use of an OCTOSPI configured in memory mapped mode for file access. Base settings come from the IOC however the memory mapping is executed in source.In the non-TrustZone project this works without issue, however in the TrustZone aware one it is triggering a SecureFault upon trying to access a memory region. // Sample access that causes the SecureFault uint32_t testAccess = *(uint32_t *)0x90008000; The SAU reports an AUTHVIOL error for the address 0x9000_8000.The SAU is configured to enable NonSecure access to the region 0x9000_0000 through 0x9FFF_FFFF.The MPCWM settings have also been configured to mark the same region as NonSecure and UnprivilegedThe OCTOSPI DMA channel is configured for NonSecure and UnprivilegedThe MPU is disabled, however we have also tested with enabling the MPU in both contexts and mapping the same region to be Non-Secure, Unprivileged with no succ
Hello,After creating a new project based on the FreeRTOS_Queues_ThreadFlags_TrustZone example from MX and generating code, there is a compile error:[build] C:/Users/tuoma/AppData/Local/stm32cube/bundles/gnu-tools-for-stm32/13.3.1+st.9/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: CMakeFiles/FreeRTOS_Queues_ThreadFlags_TrustZone_AppliNonSecure.dir/Src/stm32n6xx_hal_timebase_tim.c.obj: in function `HAL_InitTick': [build] C:/Users/tuoma/STM32Cube/Example/FreeRTOS_Queues_ThreadFlags_TrustZone/AppliNonSecure/Src/stm32n6xx_hal_timebase_tim.c:56:(.text.HAL_InitTick+0x1e): undefined reference to `HAL_RCCEx_GetTIMGFreq' [build] Memory region Used Size Region Size %age Used [build] RAM: 66120 B 511 KB 12.64% [build] collect2.exe: error: ld returned 1 exit status [build] ninja: build stopped: subcommand failed. [build] ninja: build stopped: subcommand failed. [proc] The command: cube-cmake --build C:/Users/tuoma/STM32Cube/Example/FreeRTOS_Queues_ThreadFlags_Trus
I have a working program on my own board using a STM32G081KBU6. Debug using SWD and programming a release version works fine. As long as RDP remains at Level 0, I'm able to debug, erase and reprogram updates to the board.Usually for other ST MCU's that I've used, once I've finalized a release version, I usually do the bare minimum of changing RDP to Level 1 to prevent code readout. If I need to do a firmware update, I'll just regress RDP back to Level 0 and update to the new version.However, for this device, once I change the RDP to level 1, it seems like the SWD debug port is completely killed, and Cube programmer is unable to connect to the device anymore.I've tried all the connection and reset modes in Cube programmer, including powering the board on and trying to connect immediately. I'll only keep getting this error.I'm sure that I did not accidentally set RDP to Level 2, as the setting was done in Cube Programmer itself, and I've verified this on more than one board. Note al
Hello, I'm posting a new message because the previous one was not answered with successful connection. The problem is that when MCU is populated on my board with Read-Our Protection enabled, it is not possible to connect STM32CubeProgrammer v.2.21.0 to that MCU, it becomes a brick.This option was available in the version 2.0.0. that doesn't work on Windows 11.How can be done two step connection: 1) full erase and 2) connection ? Thanks,Alex
Hello,I'm looking for some clarification over how the PCROP area can be used. The user manual for STM32L471 states that code in this area can be executed but that data at flash in this area cannot be read. Does this mean if I put a decryption algorithm in this area that I cannot also put the key in this area also? As is would be unreadble? Nick.
Good morning everyone,I need to apply the "Closed" product state to my device using the STM32H573VI.I don't need TrustZone enabled and want to use a password for debug authentication.I wanted to perform the operation via "code" using the HALs, but once I set the state to "Provisioning(0x17)" from "Open(0xED)," my firmware won't boot, and I can't even provision the *.obk file using the STM32CubeProgrammer.bool ProductState::set(states newState) { FLASH_OBProgramInitTypeDef flashOptionBytes= {0}; HAL_StatusTypeDef ret {HAL_ERROR}; if(newState == states::Unknown) { Log::msg("Invalid product state\n"); return false; } Log::msg("Setting product state to %s ...\n", toString(newState).c_str()); HAL_FLASH_Unlock(); HAL_FLASH_OB_Unlock(); flashOptionBytes.OptionType = OPTIONBYTE_PROD_STATE; flashOptionBytes.ProductState = (static_cast<uint32_t>(newState) << FLASH_OPTSR_PRODUCT_STATE_Pos); Log::msg("Program state ...\n"); ret = HAL_FLASHEx_OBProgram(&flashOpt
I have exported X509 certificate from STM32H573I-DK board, and checked how it is organised.The certificate was issued by "ST CA 01 for STM32 Initial Attestation".I would like to verify whether it is truely signed by ST's upper-level certificate.Where can I find the upper-level certificate?
Hi ST team,I am using STM32U5G9 in my project. It would need simple firmware update feature and the image would be received by UART from a zigbee module.I have read UM2851 and AN5447 application notes and check the SBSFU example in STM32CubeU5 package (v1.8.0) in github. I believe this is what my project needs:1. MCUBOOT (Secure area)2. NS Application (non-secure primary slot)3. Nonsecure image secondary slot (for firmware update)4. Authentication and integrity check5. SWAP mode with scratch region I want to maximize the flash usage, so it doesn't need:1. Secure application2. Secure data3. Non-secure data4. Loader5. Encryption The bootloader would verify the signature in primary slot and execute the NS application. NS application would write the new image into Nonsecure image secondary slot when firmware update is needed.I would like to ask:1. How to modify the SBSFU example to meet above requirement? How should I modify below config file?- mcubo
We need to develop an offline programmer to program the STM32H562VIT. The product state need to be changed to Closed with an OBK file programmed. The OBK data only in HDPL1.We can't simply use the RSS to program the OBK like STM32Cubeprogrammer. We could only write and read the flash registers by SWD.When in OPEN state, we could program the OBK files successfully, then we change the state to provisioning and closed. But if we first change the state to Provisioning, then try to program the OBK data , the programming of OBK is always failed.So our questions is how to program the OBK file data when in Provisioning state for a third programmer?
STM32 H573 TrustZone Enabled question. I'm executing the STM32 H573 example for TrustZone Enabled (OEMiROT, Secure, and Non Secure Apps). I know the OEMiROT and Non Secure App prints out and logs info, but I want to be able to do that in the Secure App for logging purposes - errors and debugging. I tried to use Gemini to create code that does that, but there appears to be many security hoops to jump through to do that, and I have been unsuccessful. Do you have an example of what I can do to do this? Gemini creates the following functions and instructs me to place it under the Non Secure App and call it from a Secure App function, but I keep running into the problem of where I'm getting multiple definition of `NS_putc_utility' error. /*** @brief Non-Secure Call-able (NSC) function that returns the pointer* to the Non-Secure World's _write (UART) function.** The __attribute__ flag ensures the compiler generates the securit
Hello, I am looking for guidance regarding the STM32H533 MCU, specifically in the area of secure and non-secure memory management.Could you please let me know if there is a dedicated application note that explains how to store and manage encrypted keys on the STM32H533?Additionally, is there an application note or reference that provides a step-by-step example demonstrating the use of secure flash, secure memory, or secure storage on this MCU? Thank you for your support.Best regards,Aymen
Hi,I am using STM32H563 with OEMiROT_Boot example project, I got a problem to read the FLASH_SIZE register (0x08FFF80C).I found two issues,(1) the value of this register is 0 at begining of OEMiROT_Boot main() function.(2) the register become not accessable after sau_init_cfg(). Snaku
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.