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,I’m working on a project with Secure Manager on STM32H573IIK3Q using the STM32H573-DK board. I have followed the official tutorial from ST to make my application compatible with Secure Manager:https://wiki.st.com/stm32mcu/wiki/Security:How_to_make_your_application_compatible_with_Secure_ManagerSo far the system works fine — I can blink LEDs and run a basic non-secure application without issues.However, as soon as I integrate FreeRTOS and switch the HAL timebase source from SysTick to TIM7, the program immediately stops and goes into the BusFault_Handler() after TIM7 interrupt. Steps to reproduce:1) Follow the Secure Manager tutorial and set up SM provisioning2) Confirm basic GPIO/LED blinking works3) Add FreeRTOS middleware (no other changes)4) In Clock Configuration → SYS, change Timebase Source to TIM75) Build and flash — program immediately hits BusFault_Handler() Environment / versionsSTM32CubeMX: 6.17.0STM32Cube FW_H5: V1.6.0STM32CubeIDE: 2.1.0 Thank
Hello,I'm currently working on a project using the STM32U5A5VJT6 processor, and I'm exploring the feasibility of implementing WireGuard in a bare-metal environment. I found one mention of WireGuard in this community post [link], however afaik it is an application for an OS based ST product. So I'm looking for more detailed insights.Is STM actively working on any initiatives to bring WireGuard support to processors like the STM32U5A5VJT6, especially for bare-metal implementations?The WireGuard protocol was primarily designed for OS-based systems with kernel support, which makes bare-metal implementation exceptionally challenging. Given the cryptographic and networking demands, has anyone made significant progress or come across alternative approaches that could support WireGuard (or similar VPN functionality) on an STM32?I encountered Mongoose’s library for networking on STM32, which offers some guidance on web server setups. Are there other resources or community-driven efforts that ad
Hello,I am working on the X‑CUBE‑AZURE TFM_Azure_IoT example for the B‑U585I‑IOT02A board and would like to replace the default UART loader with CAN and USB loaders. While the non-secure loader boots and runs correctly, the non-secure interrupts for FDCAN and USB do not trigger. In the application, both peripherals work with interrupts, but in the loader, they do not.To make this change, I modified the loader's non-secure application size to accommodate the FDCAN and USB stacks. However, I am encountering issues with interrupts not firing.I have verified that FDCAN works in polling mode in the non-secure loader application.Environment:Board: B‑U585I‑IOT02A (STM32U585)X‑CUBE‑AZURE: TFM_Azure_IoT (v2.3.0)Toolchain/IDE: STM32CubeIDEWhat I've tried:Adjusted the non-secure application size to fit the CAN and USB stacks.Ensured the peripherals are initialized in the non-secure context.Checked the interrupt enablement for CAN and USB, but no interrupts are firing.Thanks in advance!
We are currently in the early planning stages of developing a PCI PTS/SSF-compliant payment terminal and have selected the STM32U5 series as our target MCU due to its advanced security features (TrustZone, PCROP, HUK, etc.).To ensure we start on the right foundation, we would greatly appreciate your guidance on the following:1. Recommended Software Stack:Which version of STM32Cube_FW_U5 and Trusted Firmware-M (TFM) / SBSFU is currently recommended or validated for security-critical applications like payment systems?Are there any known issues or errata in older versions (e.g., V1.7.0) that we should avoid for certification purposes?2. PCI-Specific Resources:Does ST offer any reference designs, evaluation reports, or application notes specifically tailored for PCI PTS/SSF compliance on the STM32U5 platform?Are there pre-validated secure boot, secure firmware update, or key management implementations we can leverage?3. Documentation & Tooling:Could you share the latest Security Refere
Dear community,where can I find the source code for this generated MX66UW1G45G_STM32H7S78-DK_XSPIM1-SFIx.stldr file?I need to load binary files on an sd/emmc flash passing through the OEMiRoT boot that loads the specific external loader I want to implement based on this MX66UW1G45G_STM32H7S78-DK_XSPIM1-SFIx example. I have already implemented a custom external loader for my sdcard which works fine when loading the binary directly from CubeProgrammer or IAR ide (no mapping mode), however it fails to load the external loader in RAM through OEMiRoT bootloader through a UART serial interface with this command: .\STM32_Programmer_CLI.exe -c port=COMxx br=xxx -elbl "my_loader.stldr" -w my_encrypted_file.bin "my_custom_address". The same command works fine with the above example when the firmware update new binary is loaded in the macronix flash. Thank you for help
Hello,I am working with the STM32L476 and would like some clarification regarding the One-Time Programmable (OTP) area.From the reference manual, I understand that STM32L4 devices provide 1 KB of user OTP memory (128 double words). I would like to better understand the following:What exactly is stored in the OTP area? Is the OTP region purely user-programmable, or does ST also store factory calibration or security-related data in this region? Is OTP used internally by the MCU for enforcing Flash security mechanisms such as RDP, WRP, or PCROP, or is it strictly for user data? How is OTP protected ? I am trying to understand the architectural role of OTP in relation to Flash protection and secure boot mechanisms.Thank you.
I have created my secure boot demo project on STM32H563ZI using the link below.https://wiki.st.com/stm32mcu/wiki/Security:How_to_start_with_STM32CubeMX_OEMiRoT_Boot_path_on_STM32H563During provisioning, the secure image is signed by the TPC (STM32TrustedPackageCreator) tool. TPC supports the standard MCUboot signing process: calculating SHA256, generating the firmare image signature TLV (e.g., ECDSA256 0x22) using the specified private key, and adding standard TLVs. All these work just fine with the TPC tool.Now, I need to append a full public key (IMAGE_TLV_PUBKEY 0x02) as an additional TLV into the image. And one more layer of TLV (IMAGE_TLV_ECDSA256 0x22) for the signature of this pub key. Does TPC support custom TLVs by changing its config file (e.g., OEMiROT_S_Code_Image.xml)?I acually couldn't find ways to do that via TPC, so I switched to use imgtool. imgtool sign --key "C:/Work/nucleo_h563zi/Secure/ROT_Provisioning/OEMiROT/Keys/OEMiROT_Authentication_S.pem" --header-s
Our current product uses the STM32H533 microcontroller and password based Debug Authentication. We have a need to generate a large number of different DA passwords and corresponding OB Keys provisioning data. This is possible by creating our own tool to generate OB Keys .xml files and passing those into the STM32TrustedPackageCreator_CLI.exe tool, but it would be nice to cut out the .xml files and need to use the Trusted Package Creator tool. Given that the input .xml file contains a 'hash' tag and that output .obk file contains 512 bits of seemingly random data, I suspect this is a SHA-512 of the password, however I cannot manually re-create the same hash. I've attempted padding the password to various different lengths, with various different values, additionally including the additional bytes that are included in the created 'password.bin' file that accompanies the .obk file. What process/data goes into creating the contents of the .obk file? Is
OTP portion of FLASH is a valuable asset in some STM32 families and represents a convenient place to store things like security keys. For this, it is desirable - and, as it's part of FLASH, also quite logically expected - that setting read-out protection to any level above 1 prevents the debugger from reading it.In RM0444 Rev.5 and RM0454 Rev.5 (the current 'G0 manuals), the following text indicates that this should be the case:The following table appears to indicate the same behaviour:However, user @DAlbe.3 reported, that he was able to read out OTP using debugger, while RDP was set to Level1.This, together with the fact, that the above table has changed across RM revisions, rises questions about the OTP's security.Can ST please comment? Thanks,JW
Hello everyone,I'm trying to disable the TrustZone (TZEN bit) on an STM32L562E-DK development board to leave it in a completely clean state (without protections) so I can use it as a standard MCU. However, I'm encountering errors when trying to modify the Option Bytes with STM32CubeProgrammer, and I would appreciate your help.My configuration:Board: STM32L562E-DKSoftware: STM32CubeProgrammer v2.21.0Connection: Integrated ST-LINK (SWD at 8000 kHz)Current Option Bytes status (initial read):TZEN = 0x1 (Trust Zone enabled)RDP = 0xAA (Level 0, no readout protection)SECWM1_PSTRT = 0x0, SECWM1_PEND = 0x7F (Safe area defined)Screenshots of the complete configuration are attached.The problem:From the STM32CubeProgrammer graphical interface, I can modify and apply changes to almost all Option Bytes (such as safe areas or write protection) without issue. However, when I try to uncheck the TZEN box (to set it to 0) and click "Apply," I get the following errors:Error: Option Byte Programming failed
Hello everyone,I am working on a custom board based on the STM32U575RGT6 (1MB Flash). I am encountering a hard fault (SecureFault) during the initialization of the Non-Secure application after integrating the SBSFU.Context:Hardware: Custom board with STM32U575RGT6.Initial Project: A working application using TrustZone active + FreeRTOS (generated via CubeMX). The Option Bytes were set to a default 50/50 split (Secure/Non-Secure).Goal: Implement a Secure Boot / Firmware Update mechanism.What I did:I used the ST example for B-U585I-IOT02A as a reference.I integrated SBSFU_Boot and SBSFU_Loader into my project folder.I adapted the linker scripts (.ld), postbuild.sh, and flash_layout.h to match the 1MB Flash size of the U575RGT6 (vs 2MB on the B-U585I).In my original application, I replaced the .ld files and startup_xx.s files with those provided in the SBSFU_Appli example.Configur
I have been looking at the CRA Q&A and was wondering what you you are meaning with the reporting of security incidents 2026-12-11. Do you mean the reporting according to article 14 that enters into force 2026-09-11?
Hi, I'm starting to play with the SBSFU examples provided by ST. I'm trying to build the SBSFU (mcuboot based) example for the STM32L5 which can be found in the STM32SecuWS provided here . I'm stuck trying to build the TFM_SBSFU_boot (partial console output):arm-none-eabi-gcc "C:/STM32SecuWS/TFM/STM32Cube_FW_L5_V1.3.0/Projects/STM32L562E-DK/Applications/TFM/TFM_SBSFU_Boot/Src/low_level_com.c" -mcpu=cortex-m33 -g3 -DSTM32L562xx -DUSE_HAL_DRIVER -DNDEBUG -DTFM_DEV_MODE '-DMCUBOOT_TARGET_CONFIG=<flash_layout.h>' '-DMBEDTLS_CONFIG_FILE=<config-boot.h>' -DMCUBOOT_DOUBLE_SIGN_VERIF -DBL2 -c -I../../Inc -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/CMSIS/Device/ST/STM32L5xx/Include -I../../../../../../../Drivers/STM32L5xx_HAL_Driver/Inc -I../../../../../../../Middlewares/Third_Party/trustedfirmware -I../../../../../../../Middlewares/Third_Party/trustedfirmware/platform/ext/common -I../../../../../../../Middlewares/Third_Party/trust
Hi Community,I am porting STM32Cube_FW_U5_V1.8.0\Projects\B-U585I-IOT02A\Applications\SBSFU example to be used with USB port for firmware upgrade instead of Uart. I use B-U585I-IOT02A board with U585. Because of some requirements I need to use bare metal USB stack and I successfully ported the classic STM one according to article How to use STMicroelectronics classic USB device middleware with new STM32 families . I have used it SBSFU example and the usb stack works fine when I use it in non secure environment and run Loader binary or Appli_NonSecure as separate application with TZEN=0 without bootloader - I was able successfully send fw image over usb using ymodem. But when I used it in full secure original setup as in the example, I mean TZEN=1, booting with bootloader, using Appli_Secure/Appli_NonSecure - I experienced board restarting when connecting board's USB to the PC - it looks like something goes wrong during USB enumeration process. I have checked that US
Hello ST, I am working with STM32WBA52 and I am no longer able to connect to the device using STM32CubeProgrammer. When trying to connect, I got the following error: The interface firmware FAILED to reset/halt the target MCU A fail.txt file is also generated. The connection fails even when trying: Connect under reset. Different SWD frequencies. PH3 (BOOT) pin forced high. The issue appeared after changing security-related option bytes (TZEN / RDP). The device seems to boot normally, but debug access is blocked. I suspect the MCU enters Secure state early and prevents the debugger from halting the core. Is this expected behaviour on STM32WBA when TZEN = 1 and RDP = 1 without Debug Authentication configured? Does STM32WBA block SWD access by default in Secure mode? Best Regards,Dhia
Hello,I used the SBSFU 2.6.2 and it's STM32L432KC 1_Image example.Everything was cool, so I modified the UserApp and removed the demonstration application menu (a potential way to select a new download, this could save me...) Then, I unfortunately found out, I can't erase the chip so I can't flash a new firmware ... and finally I realized, I left most (or all) of the security macros enabled...I'm trying over the STM32CubeProgrammer play with RDP, WRP PCROP. Biggest issue to me seems PCROPas MCU rejects changes. The RDP I could set to level 0 easily (AA) and WRP protection also seem fine.Is there any chance to unlock my STM32L432KC nucleo back ?Thank youC:\Users\Vladimir.Sustek>STM32_Programmer_CLI.exe -c port=swd -ob displ ------------------------------------------------------------------- STM32CubeProgrammer v2.20.0 ------------------------------------------------------------------- ST-LINK SN : 0673FF515152827187223922 ST-LINK FW : V2J46M31 Board : NUCLEO-L432KC Voltage : 3.24
Need help? Is it possible to disable RDP2 and return to AA mode when I did not set a password before setting up RDP2? Is there a default STM password? Thanks
Using STM32TRUSTEE-SM framework, the non-secure application is built by the project.py script which in turn callsSTM32TrustedPackageCreator_CLI.exe -pb SM_Code_Image_bin.xmlto generate the application .bin file in MCUboot format.The xml file has <Param> <Name>Security Counter</Name> <Value>auto</Value> <Type>Data</Type> <Command>-s</Command> <Hidden>1</Hidden> <Default>auto</Default> </Param>It is my understanding that with this setting, an incrementing counter should be placed in the image header's ih_ver.iv_build_num field. But this field stays 0 no matter what I put under <Value>, auto or direct number.There is a command "-s" which according to the documentation would be passed on to the imgtool executable, which, however, is described as thisand therefore would have nothing to do with any counter.Could anybody shed some light on it, please? I am using the latest version 2.20.
We have a board with an STM32H7S3, using STiROT and OEMuROT to run our own application. The application runs in place from external flash, and uses external RAM for data.The process has proven extremely challenging, but we have been able to get the application to run...up to the point where it needs to initialise a peripheral which uses a PLL-dependent clock.OEMuROT does some clock initialisation, but we need to change some of those settings, including turning on additional PLLs.I've tried adding clock setup code to the app (originally generated by CubeMX), but it fails because you can’t change PLL settings while they’re running. So I added a call to the HAL function to reset the clocks first – but that also doesn’t work because we’re running from the external flash at this point, which relies on a PLL!I then tried moving the clock setup code into the bootloader – in the code which runs at the end of proceedings, or at the start – but they also failed.This code has to run from internal
Hello , I am aiming to demonstrate secure storage operation SST using PSA APIs using STM32U585. To verify that TF-M services are operational and Secure/Non-Secure communication works. However I dont find any more stm32cube TFM ready solutions/examples. So i have started from SBSFU examples and cloned TFM Source code from trusted firmware m git and trying to integrate the lib I need . Is this the right way to do so ? is there better starting point? Also it make more sens to put this in secure world however not sure if there is any considerations to think of while doing this . This is what I am trying to do one Secure Storage lifecycle: Write data to Secure Storage using psa_ps_set() Read the data back using psa_ps_get() Verify data integrity using memcmp() Remove the stored object using psa_ps_remove()
I'm using the link below to select boot path and do secure boot device provisioning for my STM32H563 board:https://wiki.st.com/stm32mcu/wiki/Security:How_to_start_with_STM32CubeMX_OEMiRoT_Boot_path_on_STM32H563Boot path is configured as follows:I have run provisioning.bat, the product state was set to PROVISIONED. The provisioning was successfull, with logs at the end of ob_flash_programming.log:OPTION BYTE PROGRAMMING VERIFICATION:Option Bytes successfully programmedTime elapsed during option Bytes configuration: 00:00:01.334Programming successHowever, inside ob_flash_programming.log, it also shows:PROGRAMMING OPTION BYTES AREA ...Warning: Option Byte: boot_ube, value: 0xB4, was not modified.Warning: Option Byte: hdp2_end, value: 0x0, was not modified.Warning: Option Byte: secbootadd, value: 0xC0000, was not modified.Warning: Option Byte: secwm2_end, value: 0x0, was not modified.Warning: Option Byte: sram2_ecc, value: 0x0, was not modified.Warning: Option Byte: sram2_rst, va
Hello,I have written a custom bootloader for my stm32u5 project and have been testing it for the last few months with multiple working firmware updates. To give some context, I transfer an encrypted firmware image to an external flash chip over CANfd from the currently running firmware. The next time the device boots, the bootloader looks for a new encrypted image on the external flash and if found it will decrypt the image, delete the internal flash where the application lives and then flashes the decrypted image. It will then de-init some peripherals and jump to the new application, fairly standard implementation. All of this has been working flawless until I set RDP = 1(DC) in stm32cubeprog. Also need to mention that I have set both passwords for RDP regression a while ago, I just have not been setting the RDP level beyond 0.With RDP = 1 the device will boot as it should, and I can send it a firmware update. I will power cycle the device and it will per
In STM32Cube_FW_H7RS_V1.3.0, file Projects/STM32H7S78-DK/Applications/ROT/STiROT_iLoader/STM32CubeIDE/prebuild.bat:As currently written, it fails in a couple of places. Here are the changes necessary for it to run:(The system won't let me upload the edited batch file.)
I am attempting to make a previously developed design run with Trustzone enabled. I have been unable to get the HSPI1 PSRAM to function.I've set the peripheral's GTZC's attributes to NSEC|NPRIV.I've set the appropriate GPIO pins' attributes to NSEC.I've set the MPCWM Config to consider the memory as NSEC|NPRIVI've set the appropriate/associated DMA channels as NSEC|NPRIV.None of these seem to have any effect. The Initialization code hangs/timesout in:BSP_HSPI_RAM_Config16BitsOctalRAM in stm32u5a9j_discovery_hspi.c.RCC->AHB2ENR2 shows the HSPI clock enabled.Can anyone point to a minimal working example of using the AP512 on the STM32u5A9J-DK with trustzone enabled?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.