Ask questions and find answers on STM32 security frameworks and tools, including cryptographic libraries, TrustZone, and the Secure Manager.
Most recent activity
As I understand OTFDEC will be used to on-fly decryption, while execution (am I correct)?After debug is fused (RDP set to level 2) all DHUK keys are individual for each device, while during debug phase all keys are common. How can I make test run of the software in production environment with production keys?
I set my flash OB to iROT-Provisioned (Dont know exactly Product life cycle state, but I can not debug anymore) Based on my understanding, it may be in a CLOSED state. However, I am not sure how to change the state as I want to follow the Debug authentication control principle. Could you please assist me in changing the state of the flash OB? Best Regard.
Currently, my program cannot be executed, and it is useless to pull up the boot pin, and STLink cannot be linked. There is a way to reset the chip register boot_lock, TZNE, and RDP? or how to perform full chip erasure?
Hi @ChannelWe are using STM32U585 for implementation of TF-M and TF-M SBSFU for our project. now we are planning to change our controller to STM32U5A5 controller. I have couple of doubtsSTM32U585 is PSA Level3 certified while STM32U5A5 is not PSA level3 certified. Will it have any implication on Security related implementation TF-M and SBSFU.What will be the difference if the controller is PSA level 3 certified and not certified.Will there be an official release from ST on TF-M Implementation and SBSFU. When can we possibly expect the release.is there any other impact in terms of security while switching the controller.Awaiting reply in this regard.Thanks for the support
Hi,I am trying to implement SBSFU on NUCLEO L452RE board just by copying the project for NUCLEO L432KC (2_images, Y modem protocol) and changing necessary elements (target device, startup_***.s file, UART and led setup). When trying to download UserApp.sfb file through Y modem protocol I see in debugger (running SBSFU project with all protections disabled) that calling the function SE_SFU_IMG_Read during reading active firmware version (function SFU_IMG_GetActiveFwVersion) changes my variables in SRAM.Do you have any advice how to overcome this issue or can you just provide me an example with NUCLEO-L452RE board?Thanks for the support
Hi there. Before attempting any password locking on my STM32575, I read the password lock location and it returned all zeroes like soReading 32-bit memory content Size : 4 Bytes Address: : 0x400220200x40022020 : 00000000After setting the PW, it now returns non zero like soReading 32-bit memory content Size : 4 Bytes Address: : 0x400220200x40022020 : 000C0000I've tried disabling the PW, writing to all zeroes and writing it to all FFs, but I can't get back to the point where all zeroes are returned. Can you advise how to get to that state?thanks in advancePaul
I've run into an issue with the section of the UserApp linker script which ensures that the binary size is a multiple of 16 bytes:.align16 : { . = . + 1; /* _edata=. is aligned on 8 bytes so could be aligned on 16 bytes: add 1 byte gap */ . = ALIGN(16) - 1; /* increment the location counter until next 16 bytes aligned address (-1 byte) */ BYTE(0); /* allocate 1 byte (value is 0) to be a multiple of 16 bytes */ } > APPLI_region_ROMThis seems to fail for some binary sizes, where the following error is given:ld.exe:STM32WB5MMGHX_FLASH.ld:139 cannot move location counter backwards (from 0000000008032340 to 000000000803233f)If I change the size of the binary by adding some other command, the error goes away. I believe what's happening here is this:For a binary size of 0x3233f bytes, the first line advances the location counter to 0x32340.The second line rounds this to 0x32340, since it's already a multiple of 16 bytes, but then subtracts 1 byte, so it's attempting to set the location
I have flashed the SBSFU application with write protection enabled for flash address 0x08000000. After that, I am unable to erase using jlink commander.exe as well as by IAR->project->Download->erase.STM32H743 has SWD interface and i am using jlink debugger for connection.I am able to connect jlink debugger. But i could not erase it.Please suggest me how to erase the flash of STM32H743II.
I'm trying to enable secure boot for general purpose ARM microcontrollers. Based on my research, secure boot starts with a Root of Trust (ROT). Usually this ROT is hardware based, which means that the microcontroller should have a dedicated immutable memory region that stores the very first code that runs after voltage is applied to a microcontroller. This region, also called the BOOT ROM is critical for secure boot as it is the basis on which all later stages of firmware are authenticated.Now, most microcontrollers that I have implemented in projects earlier do not have this ROT which is why I'm looking to make things secure using a cryptographic module that will act as a secure storage for both the BOOT ROM code and any additional keys for encryption, signing, authentication, etc. The ST33 TPM seems to be a good fit. The TPM 2.0 specification states that the TPM can be used for CRTM (Core Root of Trust Measurement) by which I assume that I can still keep my bootloader code in whateve
In previous development project we were able to place several variables with a magic number and checksum of the application at the end of the interrupt vector table that the bootloader could use to check if a valid application existed.Since the STM32CubeIDE generates the startup code this is not possible. Is anyone aware of a way for the STM32CubeIDE to place values such as the CRC into flash memory automatically during the build process??
Hi,I ran the SBSFU example of STM32CubeU5 following what is in the readme file without any problem. Then I disabled TrustZone but I cannot run the projects made with STM32CubeIDE, verification of the downloaded firmware fails. If I try to erase the flash memory (full chip erase) with STM32CubeProgrammer I get an error message. The error message indicates to check the flash memory protection but I have not set some flash memory protection.Thanks
Dear Sir.I am using the example TFM_Loade_Non_Secure , It compiles I set for Download NonSecure App Image , when I send any file*.elf with TeraTerm.File,Transfer.YMODEM.Send , then the programreply with "Abortes by user".Please Advise
Hi,I want to know a properly way do to that.If i use standard configuration I run hard fault as soon as DMA start (linklist mode) (HAL_HASHEx_SHA256_Start_DMA).I put Fault Analyser details Source/Destination secure bit are set before calling this function.Can someone help me?Thanks Have a good day.Aurélien
Hello all,I am working on the STM32H753 Evaluation board and I have a software architecture with an SBSFU running in the internal flash, that jumps to the External NOR flash to execute the user application (Download and Active slot in External NOR flash). My user application is FreeRTOS based. I am currently working on SBSFU v2.6.1 and have managed to customize the Nucleo H753's example project and my user application to execute successfully from the external NOR flash on my STM32H753 Evaluation board. But, in the process, I had to disable the Memory Protection Unit (MPU) in the SBSFU side due to the following couple of problems: Enabling the MPU causes the user application to hang at the RTOS thread creation and not proceed further. I see that this is not supported at the IOC level alsoThe Data Cache being enabled in the SBSFU side was corrupting the External NOR flash for some reason, causing the signature of the firmware to mismatch and causes critical errorAlso, I see in FreeRTOS w
Hi,I have a custom board built around an STM32U585AII6 that utilizes RDP level 2 to prevent debug access. In the firmware I provided keys to allow for regression from level 2 back to level 0 and have been able to do this regression through the Cube Programmer successfully on many occasions, but only when I completely remove power from the device in between the various steps of the process. A successful regression typically follows the sequence below:Successfully Apply RDP Level 2 PasswordDisconnect Device from power sourceReconnect power and successfully connect to the Cube ProgrammerSuccessfully Apply RDP Level 1 PasswordDisconnect Device from power sourceReconnect power and successfully connect to the Cube ProgrammerSet RDP option bytes to Level (0xAA)Is it a requirement to completely remove power from the device or is it possible to perform RDP regressions while keeping the device power?
I'm running SPI with DMA and CRC enable between two stm32, slave is stm32f415 MCU.Sometimes it appears that data received is corrupted whereas CRC check gives no error. For instance (polynomial used is 0x1021)Normal behavior:3 words sent: 0xAAA0; 0x0001; 0x50B1, CRC computed and sent is 0xC33B4 words are received : 0xAAA0; 0x0001; 0x50B1; 0xC33B , CRC check OK.Error case:4 words are received: 0xAAA0; 0x0001; 0xD0B1; 0xC33B, but CRC check is OK (CRCERR in SR not set) and after the end of transmission, RXCRCR = 0xC33B.It seems that at peripheral level, the data is received correctly (hence the correct CRC computing), but somehow a data corruption happens after!SPI used is SPI1, with DMA2_Stream0. Speed is 13.5MHz. Any thought ?
I use STM32H755ZI to configure the product, but the market is out of stock, can I use STM32H745/STM32H757/STM32H747 instead?Assuming I'm not using CryptoHash/SFI/SBSFU and MIPI-DSIIs LQFP144 pin to pin?
We would need to implement Secureboot & secure FW upgrade feature in one project.I find both STM32G0B0CE and STM32G0B1RET6 not support RNG.But the blow link shows they both support SecurebootX-CUBE-SBSFU - Secure boot & secure firmware update software expansion for STM32Cube - STMicroelectronicsMy question:Whether G0x0 and G0x1 could support secureboot & upgrade features?If not, whether you have any prefer mcu chips, pin to pin compatible preferred, for our new selection?BRs,Carlos
Hi, team.Question about security of the MCU.Is it possible to log illegal access by the debugger in the state of RDP Level 1? Any bits is a available for it?
I am using CubeIDE 1.11.2 with a STM32F3DISCOVERY board and have created an IDE project via the integrated CubeMX GUI.I want to activate read protection via HAL_FLASHEx_OBProgram as well as the write protection for the FLASH area of my firmware (applying the same HAL function).But HAL only allows one of the two features at a time.The reason is that for every single action (write RDP and write WRP) HAL completely erases the OptionBytes via the FLASH peripheral (as you can see in the HAL source code).It is important for us to enable RDP and WRP at the same time!I could do it the bare metal way, but our project is intended for all our used STM32 MCUs and that's exactly what HAL was created for.Please, can you tell me a way to enable both RDP and WRP with the HAL functions at the same time?Thanks in advance!
Hello,I have a B-U585I-IOT02A board and was trying out the TFM Application example from STM32Cube_FW_U5_V1.2.0.After flashing the firmware as instructed, I could successfully run the test application. However, after re-connecting the board, I now get "Error: ST-LINK error (DEV_TARGET_NOT_HALTED)" and am unable to use the device.I wonder what is causing this behaviour? and how can I unlock the device?Many thanks,
Hi All,i have downloaded the STM32U585 firmware package from the official sources and want to implement the TFM SBSFU program code into my development board(U585-IOT2A) using STM32 Cube IDE. The user manual mentions installation not possible using Cube IDE and works with EWarm IAR Workbench version 8.50.9. But i am not able to download the mentioned version of EWarm IAR Workbench. Please suggest the following:Implementation support using STM Cube IDEWorking IDE version of EWarm IDE.Kindly provide assistance regarding the same.References Used : UM2851 and STM32U585 Firmware PackageThanks and Regards
The question below refers to L452.I encounter once in a while a random activation of the readout protection.I suspect the code that disables the watchdog operation before switching to STOP mode (as it updates the user option bytes).Can this affect the readout protection? is there another idea why is the protection fired?Thanks,Ariela
I have a user bootloader I have used across various STM32 parts over 12 years. In production RDP level 1 is enabled and this has always been fine for various STM32F1, F2, F4 based products we have in production, and for thousands of units in the field. However on a new product using an STM32L151C8T6A, setting RDP prevents update via this bootloader.The bootloader uses XMODEM-1K over UART - the target emits the "C" start character and starts the update of the application area if the host responds to the start character before a timeout. With RDP=0, this process works as expected. With RDP=1, the first XMODEM-1K packet is sent in response to the "C" start byte, but it is ignored (i.e. no ACK, NAK or CAN) and the existing unmodified application boots. I do not believe that the processor is resetting, because that would cause the "C" to be emitted again, rather it seems to be ignoring the XMODEM-1K packet, and booting after timeout.There is no JTAG/SWD connection, and nothing connected on-
Hello, I'm a bit stuck and I am not sure what to do so I am asking for your help.Here is the problem :I have a custom board with a STM32WB35 that was working fine for a while. But after multiple (incomplete) boot when I was soldering the battery to my board it seems to have altered the STM because it doesn't boot anymore. The other consequence is that I can't write a code anymode to this micro. I am using a J-Link and STMCubeIde and everytime I try it fails at the very beginning (compare 0%) then shows this error :"ERROR: Timeout while calculating CRC, RAMCode did not respond in time."At the beginning of the program the option bytes are modified to be able go in bootloader mode in some situations. That's why I was thinking that while writing the option bytes the STM32 got interrupted and it may have harmed the STM / the program.I tried to start from fresh, erasing the flash using J-Link Commander v7.86.But I was not possible because the flash is locked.I can't read the flash where the
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.