Ask questions and find answers on STM32 security frameworks and tools, including cryptographic libraries, TrustZone, and the Secure Manager.
Most recent activity
I followed the GPIO_IOToggle_TrustZone Example for STM32U5, which is documented in UM2883 (STM32CubeU5GettingStarted.pdf; section 5.1.1). The development board used is a NUCLEO-U575ZI-Q.Details:I've set the TZEN-Bit in FLASH_OPTR using STM32CubeProg successfullyUsed STM32CubeIDE to import existing project (%USERPROFILE%\STM32Cube\Repository\STM32Cube_FW_U5_V1.0.0\Projects\NUCLEO-U575ZI-Q\Examples\GPIO\GPIO_IOToggle_TrustZone) from filesystem into default workspace (%USERPROFILE%\STM32CubeIDE\workspace_1.7.0)sticked to the guide in UM2883:Open the STM32CubeIDE toolchainOpen Multi-projects workspace file .projectRebuild xxxxx_Secure projectRebuild xxxxx_NonSecure projectLaunch Debug as STM32 Cortex-M C/C++ Application for the secure project.In the Edit configuration window, select the Startup panel, and add load image and symbols of the non-secure project.Be careful, the non-secure project has to be loaded before the secure project.Then click "OK"Run the example on debug perspective
Hello.I succeeded to run my own app with SBSFU on a NUCLEO-H753ZI. But now, my app uses Lwip and differents DMAs. Then, I need these 3 MPU regions:MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER0; MPU_InitStruct.BaseAddress = 0x24000000; MPU_InitStruct.Size = MPU_REGION_SIZE_512KB; MPU_InitStruct.SubRegionDisable = 0x0; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER1; MPU_InitStruct.BaseAddress = 0x30040000; MPU_InitStruct.Size = MPU_REGION_SIZE_2
Does anyone know if there is a bootloader template available for ATM32H7B3 that I can start off my project with? Preferably some template that allows secure and non secure creation of the bootloader. TIA.
I just start a project to connect STM32H7 device to AWS IoT using STSAFE-A110 , and I am not doing the secure booting.I have couple of questions1) STSAFE-A110 has a ST CA certificates in in zone 1, so my understanding is to retrieve this certificate and register to AWS IoT, this device should be authenticated. am I missing anything?2) Currently the STM32 demo project mix bootloader project with main application . Bootloader build a se_interface_app.o for application to link. I understand it is for demo and safety. My question is if I only want to do the AWS IoT authenticate, how to get rid of the STM32 Secure Engine /bootloader part?thanks a lot
Hi.,Because i wanted to verify if the processes worked as well on my work provided Laptop. I ran the homework a second time. The TFM Homework of course resulted in mutliple Errors and nothing worked. But now i can't even use the L5 Board anymore. I get no output on the Serial and the usb part shows a fail.txt with the following content:The interface firmware FAILED to reset/halt the target MCUTrying to connect the STCubeProgrammer also now fails with: DEV_TARGET_NOT_HALTEDSo i can't manually wipe the device and restore it again.Quick help would be appreciated.
Hi,In my port of SBSFU (v2.4.0, not yet 2.5.0) I'm having trouble transferring SFU files over YMODEM due to missing characters at the receiver. This makes it seem the com loader is too slow however it is the same as from the H753 on which it is based.I've split the logging and ymodem transfers to uart3 (logs) and uart1 (ymodem). Uart1 uses the Arduino header on the STM32H735G-DK board however I have the same issue when just using uart3 with MINICOM_YMODEM defined and using minicom sb.During transmission I'm not logging anything to avoid slowing down the com loader data reception.When I use a simple loop that receives 1 character at a time and outputs once a small buffer is full and constantly send data from another STM32H735G-DK to the one with this receive loop, I get all data. But the smallest delay causes data to be missed and I believe this is why the com loader doesn't work.Any idea how I can avoid missing characters during transmission?I guess maybe my uart configuration is not r
Hello,I am trying to get SBSFU working on my G071RB Nucleo board with my own test application.So far I have used the X-Cube-SBSFU examples and have the UserApp running as expected, it boots and I can run the tests. All good.I now want to replace the UserApp wit my own application and test with that.I have built SBSFU and have been able to use the postbuild.sh script to merge my application with SBSFU ok.SBFU runs, but I am getting a watchdog reset everytime it comes to execute the user firmware as below:= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL = [SBOOT] STATE: CHECK STATUS ON RESET WARNING: A Reboot has been triggered by a Watchdog reset! Consecutive Boot on error counter = 5 INFO: Last execution detected error was:Watchdog error. = [EXCPT] WATCHDOG RESET FAULT! = [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD = [SBOOT] STATE: CHECK USER FW STATUS A valid FW is installed in the active slot - version: 5 = [SBOOT] STATE: VERIFY USER FW SIGNATURE = [SBOOT] STATE: EXECUTE USER
Hello everyone,I am trying to port the SBSFU project to a stm32h723xx board from the stm32h753xx project but I have discovered many discrepancies because the latter has dual bank flash while the former has only one flash bank.Do you suggest to start from a single bank MCU's project and then adapt the drivers or do you have any better ideas?Thank you!
hi we followed the document "Getting started with X-CUBE-AWS STM32Cube Expansion Package for Amazon Web Services® IoT Core". The compilation is successful and binaries were generated. when the binary SBSFU_B-L4S5I-IOT01_aws_demos.bin through stm32cubeprogrammar we got the following logs. can anyone of give me solution for this issue?. thanks in advance.
Hi,Developing AES GCM on a customer board that is used STM32H750VBT6 with CubeMX 6.1.1 has a problem needs help.Tested example code CRYP_AES_GCM from STM32Cube_FW_H7_V1.8.0 Projects/STM32H735G-DK/Examples/CRYP is failed. And used JLINK debug figure out all registers of crypt are all zero. and test code run to DES cipher.Has any suggestion?Thanks
In STM32H7 reference manual: Prototype void resetAndInitializeSecureAreas(RSS_SecureArea_t area);but in SBSFU library V2.4.0 file "sfu_low_level_security_rss.h" Prototype void (*resetAndInitializeSecureAreas)(uint32_t nbAreas, SFU_LL_RSS_SecureArea_t *areas);The parameter is apparently different. Which one is correct?Another question is in reference manual the function exitSecureArea must be called before jumpto user application, but in SBSFU library, the function exitSecureArea has never been called. Is it correct?Thanks
Hi,I'm still in the phase of understanding the STM32Programmer together with the STM32WB55. I came across the following behaviour:As you can see from the screenshot the STM32Programmer is saying that it successfully disabled the read out protection and in the next command its complaining that the read out protection is set :pensive_face: Quite strange. Actually I couldn't recover the Nucleo board with the STM32Programmer. So I tried a software download with STM32CubeIDE. This worked and after that the STM32Programmer could readout the device again.One more time - for me the way the STM32 Tools are working look a little bit unclear and unstable to me. I wonder how professional development will work if you need to use them. Commercial tools might make the difference but they are not available to me.Best RegardsMarkus
how to use the pcrop of stm32f7xx in segger embeded studio, I found a pdf "dm00346619-proprietary-code-read-out-protection-pcrop-on-stm32f72xxx-and-stm32f73xxx-microcontrollers-stmicroelectronics",I saw the usage process, but I don't know how to use it in segger embedded studio
Hi,We are migrating our code from using M3_CryptoFW_RngHW_2_0_6 to using libSTM32Cryptographic_CM4.a. Our target is STM32F405VGTx. When compiling we get a linker error from the library itself (cmox init is part of the ST lib), not from a function our code directly uses. What are we missing here? any required configuration?.\Application\Application.axf: Error: L6218E: Undefined symbol cmox_ll_deInit (referred from cmox_init.c.o)..\Application\Application.axf: Error: L6218E: Undefined symbol cmox_ll_init (referred from cmox_init.c.o). Thanks!
We are using STM32H750VB, for this please send me Crypto AES 128bit code examples, in online we got lot of crypto lib but we need example source code for this crypto AES128 bit...
I have an issue with stack corruption on the first FPU access (specifically vmov instruction) after jumping to the application code from SBSFU. I noticed that when the application starts the LSPACT bit is set in FPCCR register. Clearing the bit in startup code (in application) fixes the stack corruption and application starts correctly.My questions are:is this correct fix for the issue?SystemInit function enables the FPU. Should it also do some other initialization for it (like clearing the aforementioned bit)?should SBSFU do something to the FPU configuration before jumping to the application?I'm using STM32H7 MCU. SBSFU is based on an example project from SBSFU package. Application uses standard startup code from STM32Cube
I'm currently testing the UART bootloader on a NUCLEO-L496ZG-P, the bootloader itself works fine and i've written a python script which can upload .bin files to the controller.The problemi'm having is that the product will need Readout Protection in the end, but when i'm uploading a programm and afterwards send the Readout Protect command ( 0x82 + checksum ) and than pull the jumper from boot0 (currently it's a jumper, but will be handled otherwise later on) and reset the controller it doesn't boot into the user application, but instead into an undefined(??) state which is neither bootloader nor user application (none of the user LEDs are on or blinking (my user app currently is only blinking LEDs) and it's also not responding to any of the commands from the bootloader command set). Only when going through a power cycle the chip will boot into the user application.So i guess my question is, is this intended? Is there any way to get into the user application without going through a powe
I'm attempting to configure peripherals in STM32CubeMX, but I'm getting error_handler calls from my DMA configuration for ADC1.All the necessary peripherals (DMA1 channel1, ADC1) are configured as secure in CubeMX, but when HAL_ADC_MspInit attempts to set the SECM bit for hdma_adc1, the write fails. I am running only a secure image (i.e., no non-secure image is loaded). In IAR, "TrustZone" is enabled, and set to "Secure" mode.On boot, I call the following, in order: HAL_Init(); SystemClock_Config(); MX_GTZC_S_Init(); MX_ICACHE_Init(); MX_DMA_Init(); MX_GPIO_Init(); MX_ADC1_Init();The Error Handler is hit when attempting to set hdma_adc1's source point, which is secure.
I am working on STM32L552 Nucle0-144 board with Trustzone enabled. Secure code starts from 0x0C000000 and non secure code vector table located at 0x08040000. After completing the initializations in secure code I am calling non secure reset handler by loading the address from 0x08040004. Here I observed in disassembly that non secure Vector table contents are all 0's (Zeros), hence not able to load the non secure initialization code. Please guide me to resolve this
I think using other secure element should feasible, but not sure how difficult it is.As ST provides a set of tools like SBSFU etc middleware, may I know is that easy to change to support other secure element other than STFAFE-A110?
Hi allMy cipher text from STM32F429 crypto library(AES-CBC-256) is CTS(Ciphertext Stealing),but the cipher text can'e decrypt by openssl on my PC because the file length is not correct.What can I do to solve it?Thanx
I am trying to learn wireless firmware development.For that I am looking for a microcontroller with only Physical layer(ie when I place an ASCII character 'a' in an address it takes its binary value and transmit it as RF Signals).All other layer should be firmware iimplementation.I don't want any libraries pre-built because I want to built it from scratch.The controller should not have any packet or frame size limitation and entire packet right from Premeable to CRC should be cutomizable from firmware Should be compatible with 2.4 GHz WiFi and Bluetooth protocol.Please suggest a suitable controller and if possible share me the documents of the controller
hi here I am configure the CRC register of STM32f469IITx I am using the function CRC_CalcCRC(); to generate the crc for 32-bit data.i am not getting the crc please any one help me.uint32_t data=0xAAAAAAAA;uint32_t crcvalue=0x00000000;how i am using crcvalue = CRC_CalcCRC(data);crcvalue = ? (crcvalue is giving null only)
Hi,May I know the "STM32CubeExpansion_Crypto_V4.0.1" has implemented hardware accelerator via stm32l5xx?Please advise,Rgds,QiZhang
Hello,The mentioned board utilizes usb otg communication through the USB connector. DM and DP pins are PA11 and PA12 which are directly connected from the mcu to the USB connector (no available GPIO pins). There is no usart or uart connected to the DP and DM pins. Every SBSFU example including the most similar one - stm32F413H - uses usart/uart interface. For example the stm32F413H uses usart6 which is connected to the DP and DM pins. Possible solutions (?) : 1) Swaping the uart interface with usb otg interface in sbsfu project; 2) Directly connecting USB DM and DP pins to one of the available usart/uart interfaces;The first solution requires extra changes in the project files, by extra I mean, that the files that need to be updated are more than the mentioned default files in the documentation e.g. low level services files. And I dont know if this will not break anything else...The second solution requires soldering the uart/usart GPIO (or the mcu) pins to the usb connector pins. Are
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.