Ask questions and find answers on STM32 security frameworks and tools, including cryptographic libraries, TrustZone, and the Secure Manager.
Most recent activity
When I run the STM32SecuWS-material.exe installer, it tells me I need to install Java and takes me to Oracle's website. But my understanding is that Oracle Java is not free for commercial use and we would be using STMicro security in a commercial environment, so the free Java licence is not valid. Is this correct? Or has ST licenced Java for use with the programmer? In short. is it legal for me to install Java form Oracle to support the security workshop?I'm due to take the workshop on in 38 hours time.
Hello,i have a programm which is sending 2bytes + 16bit CRC from SPI2.There are two STM32F765 on my board. The test programm is generated with CubeIDE and only SPI2 initiallyzed.One MCU is calculating the crc correct and the other is not correct.(Checked with an online crc calculation website)polynom used: 0x9021Result from MCU 1(correct): 0x08 0x06 0x24 0xDCResult from MCU 2(not correct): 0x08 0x06 0x63 0xEEI have checked the register before sending, they are equal.After sending the registers are equal, the only differnce is in SPI2->DR where the calculated crc can be seen.Regards,BastianIs there a way to test if the processor hardware damaged?
Hi, I am trying activate read protection to level-1 with using batch(.bat) file. I am commanding to ST- Link Utility via batch file. My batch file code is like that:@ECHO OFF"C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility/ST-Link_CLI.exe" -c SWD -OB RDP=0 -ME -P C:\gok.hex -V "after_programming" -OB RDP=1 PAUSEExplanation of code is;-c SWD : connects to device-OB RDP=0 : sets read protection level to 0-ME: mass erase-P c:\gok.hex : program hex file to flash-V "after_programming": verify if programmed correctly-OB RDP=1 : set read protection to level 1When I execute batch file it's programming and verifying the selected .hex file and setting read protection to level 1 but my code is not running in the mcu. I tried reseting after executing the batch file but it didn't help. If I erase the "-OB RDP=1" command at the end, code is running. I have done same things with ST-Link Utility(not with batch file this time- manually), I programmed the hex file an
Make make clean Cannot run program "make": Launching failedError: Program "make" not found in PATHPATH=[C:/ST/STM32CubeIDE_1.4.2/STM32CubeIDE/jre/bin/server;C:/ST/STM32CubeIDE_1.4.2/STM32CubeIDE/jre/bin;C:/ST/STM32CubeIDE_1.4.2/STM32CubeIDE/jre/lib/amd64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\PuTTY\;C:\Program Files\php-7.2.
I've ported the SBSFU package for my user app. It works great when only read out protection is enabled. Everything works as it supposed to. However, when I activate other security flags random errors/problems arise in the code. For example, when I activate the PCROP, a timer based PWM stops working. I'm using HAL library for this PWM so I'm not sure how the error might come from my code. TIM_OC_InitTypeDef sConfigOC; sConfigOC.OCMode = TIM_OCMODE_PWM1; sConfigOC.Pulse = (uint32_t)dCycle*10; // 1000 count PWM timer sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; HAL_TIM_PWM_ConfigChannel(hboard.release_tim, &sConfigOC, TIM_CHANNEL_1); HAL_TIM_PWM_Start(hboard.release_tim, TIM_CHANNEL_1);I've had trouble with other security flags too. For example when I activated MPU_USERAPP my user app starts started to consistently crash with hard faults in a module so I deactivated it. The funny thing is that after some development on other parts of my
Hi guys,I'm currently utilising SBSFU as an external flash secure bootloader (with all security settings turned off for debug) using the STM32H7B3's OTFDEC (On-the-fly Decryption) peripheral.My user application boots and runs via the OFTDEC and memory-mapped OCTOSPI flash just fine via the SBSFU bootloader mapping to the region 0x90000000, however, whilst I'm able to attach my debugger to the process and see and step through lines of assembly, as soon as I load my linker file to link the process to my source code via LOAD %L INCREMENTALI receive an error 57: illegal address (0x90000400) which is the correct and seemingly valid memory-mapped start address of the application. The keyword INCREMENTAL makes sure that the debugger doesn't restart the CPU when adding the linking information so the OTFDEC mapping should still be valid.Does anyone have any suggestions or experience in debugging memory-mapped programs or in doing so with Keil MDK?Many thanks
I have a SPI on STM32F746 configured:/* SPI6 init function */void MX_SPI6_Init(void){ hspi6.Instance = SPI6; hspi6.Init.Mode = SPI_MODE_MASTER; hspi6.Init.Direction = SPI_DIRECTION_2LINES; hspi6.Init.DataSize = SPI_DATASIZE_16BIT; hspi6.Init.CLKPolarity = SPI_POLARITY_LOW; hspi6.Init.CLKPhase = SPI_PHASE_2EDGE; hspi6.Init.NSS = SPI_NSS_HARD_OUTPUT; hspi6.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4; hspi6.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi6.Init.TIMode = SPI_TIMODE_DISABLE; hspi6.Init.CRCCalculation = SPI_CRCCALCULATION_ENABLE; hspi6.Init.CRCPolynomial = 32773; hspi6.Init.CRCLength = SPI_CRC_LENGTH_16BIT; hspi6.Init.NSSPMode = SPI_NSS_PULSE_DISABLE; if (HAL_SPI_Init(&hspi6) != HAL_OK) { Error_Handler(); }}void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle){ GPIO_InitTypeDef GPIO_InitStruct = {0}; if(spiHandle->Instance==SPI2) { /* USER CODE BEGIN SPI2_MspIni
Hi All,We are launching one of our product to market. And we are using STM32F429ZiT6 MCU.Recently I am going through the data sheet for list of option bytes which needs to be set during manufacturing. I have an understanding on what should be set. But I just want to confirm my understanding and these will serve the purpose.Below is our application roughly. In the first 3 sectors we have the bootloader-------- which never changesWe do an OTA for the application. So the rest of sectors are divided in to 2---1 for main application....1 for back up. The rest of sectors(4-24) are divided into 2 -----10 sectors each for --- application and back upso we do write and erase operations from sector 4-24.So given the above situation.The option bytes we are setting is RDP- > Level 2(0xCC) because no one must be able to read through JTAG, SWV,...etcWrite protection on sector 0, sector 1 , sector 2 ------because bootloader is unchanged.Rest of the sectors are not write protected as we are erasing
When comparing installation results with contents of Security_WS_Tools_Installation.pdf, there are the following inconsistencies: Running C:\STM32SecuWS\Tools\Other\CheckEnv.bat does not complete, as it requests STM32CubeProgrammer v2.5.0, whereas STM32CubeProgrammer v2.4.0 is the version installed by the installer. When opening ZIP File, directory C:\CSTM32SecuWS\L4 only includes subdirectory STM32CubeExpansion_SBSFU_V2.4.0, but not >Scripts or >FinishedProjects
..
Is it a problem if I join the meeting at 9:00? Before I have to take the children to school
Under SBSFU, I am able to run my custom application, and everything run fine. But changing the SFU defualt UART.with USB throughing error "USB Device not recognize!!!", I debug through SBSFU code, and USB stack(CDC and Devi ce only Configuration) initialize correctly.I will highly appreciate for any help.With regardsJitu
Hi,I am currently going through the "STM32 security in practice workshop" which is for the G0 and I really like it.Now my target is a G4 with dual bank. So I wonder if you have some code for this MCU as it probably needs some more settings to add because of its 2 banks. Or does the HAL refer to bank 1 (where the bootloader is) anyway by default? I do NOT need 2 images, just to handle the dual-bank design properly when adding the protections.You don't set the secure memory area in code in the workshop. Is there any special reason for this and can this be done from code?And what is actually the difference between the code presented in the workshop and the X-CUBE-SBSFU. Which is recommended to use? I find the practice workshop easier to understand and implement than the SBSFU. Additionally, SBSFU projects do not seem to be based on CubeMX (.ioc) and therefore don't offer easy implementation of modern bootloaders using FD-CAN or similar as far as I understand.Thanks,Anguel
I'm registered for the Dec 3 workshop, but haven't received the hardware yet. Please advise, thanks.
Porting to STM32F429VIT6 from STM32F413HChanged made so far:1) Choosing the example from the same STM32 family as starting point if possibleSTM32F413H Discovery example chosen: 2) Editing the used IDE configuration files to rename what needs to be renamed to adapt to your target: This step is not usually manadatory3) Adapt the mapping to your flash (files in Linker_Common). Use documentation to understand underlying constraints (sector size, write protect size, etc ...)The linker script has been updated to for the 2Mbyte flash on the STM32F429xx Dual Bank from the 1.5 Mbyte Single Bank4) Adapt the USART port used for interfacing with secure boot and application (header file located in target directory of SBSFU and example application)The USART port has been changed to USART3 which is part of the JTAG connector. Tested with an application firmware and it works fine)5) Adapt the clocking to your target: use STM32CubeMX to generate your clocking and copy paste the generated functiona. I a
HelloI am using Buildroot instead of Yocto with STM32MP157C and I wanted to know if there is a difference while parametrizing security features on my MPU and if the community.st.com website is relevant in my case or not.Best regards
Running USB virtual serial port program separately is normal,but download the virtual serial program through sbsfu, USB can't recognize it.Can you give me some suggestions,thankyou very much.
I'm trying to finish a first homework related to the SBSFU. I can build the SECoreBin project which at the end generates the SECoreBin.bin file. So it works fine. Next I try to build the SBSFU project but then I get "Nothing to build for project STM32L476RG_NUCLEO_2_Images_SBSFU"Building the UserApp ends with an error:c:\st\stm32cubeide_1.4.2\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: cannot find -l:se_interface_app.o collect2.exe: error: ld returned 1 exit status make[1]: *** [makefile:58: UserApp.elf] Error 1 make: *** [makefile:51: all] Error 2 "make all" terminated with exit code 2. Build might be incomplete.All the tools are installed correctly, Java is updated.Michal
Hello, here is my situation, I've got accepted at the 12th November workshop, but because the boards were delivered with some delay (received them on 18.11.2020), I couldn't participate to that workshop. Now I have the boards and I would like to attend the workshop on 24.11.2020 or 03.12.2020, is it possible?
I'm trying to set read protection on STM32F412 to level 1 via JLink during initial flashing. I'm issuing next commands:J-Link>w4 0x40023C08 0x08192A3B Writing 08192A3B -> 40023C08 J-Link>w4 0x40023C08 0x4C5D6E7F Writing 4C5D6E7F -> 40023C08 J-Link>mem32 0x40023C14 1 40023C14 = 0FFFAAEC J-Link>w4 0x40023C14 0x0fff55ED Writing 0FFF55ED -> 40023C14 J-Link>mem32 0x40023C14 1 40023C14 = 0FFF55ED J-Link>r Reset delay: 0 ms Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via AIRCR.SYSRESETREQ. J-Link>mem32 0x40023C14 1 40023C14 = 0FFFAAED But AFTER rest and BEFORE any user code can run it self-resets from 0x55 - LEVEL1 to AA - LEVEL0.A few hours before this happened I was able to lock it from bootloader with next code: FLASH_OBProgramInitTypeDef flash; HAL_FLASH_OB_Unlock(); flash.RDPLevel = OB_RDP_LEVEL_1; flash.WRPState = OB_WRPSTATE_ENABLE; flas
The installation instructions give dire warnings not to press OK until the installation has finished:and, indeed, the popup appears - saying "finish the ongoing installation":But the popup blocks the installation from proceeding - all progress stops!!So what am I supposed to do?
Hi all,I'm trying to add the STM CRC32 to the hex or axf file, after this I need to convert it to .bin file because I've a Bootloader and I want to check the CRC32 to see if there's a valid image stored. I'm using srec_cat but doesn't work. Thanks.
Shared in the Google Drive is Security_WS_Tools_Installation.pdfLinked from the email is Security_WS_Tools_Installation_V3.pdf:https://www.st.com/content/dam/OLM%20Email%20Marketing/2020/EMEA/Events/Security%20workshop%20-%20second%20part/Security_WS_Tools_Installation_V3.pdfThe _V3 suffix suggests a later version - so, presumably, that's the one to use?
The download & decryption & swapping of the firmware looks fine at first sight.But then a critical failure occurs because additional code is detected beyond the FW image.====================================================================== = (C) COPYRIGHT 2017 STMicroelectronics = = = = Secure Boot and Secure Firmware Update = ====================================================================== = [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL = [SBOOT] STATE: CHECK STATUS ON RESET INFO: A Reboot has been triggered by a Hardware reset! INFO: Last execution status before Reboot was:Executing Fw Image. INFO: Last execution detected error was: No error. Success. = [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD = [SBOOT] STATE: DOWNLOAD NEW USER FIRMWARE File> Transfer> YMODEM> Send [Ready to receive].[EOT]. FwSize=-16843010 | PartialFwSize=-16843010 | PartialFwOffset=-16843010 | 33632 bytes received = [SBOOT] STATE: REBOOT STATE MACHINE ========
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.