Ask questions and find answers on STM32 microprocessors and dedicated embedded software solutions, such as Yocto SDK, Qt, and OP-TEE.
Most recent activity
Hello ST team,I am facing a boot-time crash in OP‑TEE on an STM32MP257DAI3.The system boots through BL2 and BL31 successfully, but OP-TEE triggers a data abort followed by a SERC exception, leading to a panic at <stm32_serc_handle_ilac>.I would appreciate guidance on correct RIF/RISAF configuration for OP-TEE and how to trace SERC exception ID's to actual peripheral .Here is my OPTEE error logWARNING: This OP-TEE configuration might be insecure! WARNING: Embeds insecure stm32mp_provisioning driver ..... I/TC: Platform stm32mp2: flavor PLATFORM_FLAVOR - DT stm32mp257f-ev1.dts I/TC: OP-TEE ST profile: secure_and_system_services D/TC:0 0 call_initcalls:40 level 3 check_ta_store() D/TC:0 0 check_ta_store:418 TA store: "early TA" D/TC:0 0 check_ta_store:418 TA store: "Secure Storage TA" D/TC:0 0 check_ta_store:418 TA store: "REE" D/TC:0 0 call_initcalls:40 level 3 early_ta_init() D/TC:0 0 early_ta_init:56 Early TA 80a4c275-0a47-4905-8285-1486a9771a08 size 46235 (compressed, unco
DescriptionHello,we are currently integrating secure boot on an STM32MP15-based platform using the ST OpenSTLinux ecosystem (TF-A + OP-TEE + U-Boot + RAUC / ST update solution here: https://github.com/STMicroelectronics/meta-st-ota/).During this work, we identified a potential gap in the chain of trust related to the boot filesystem (bootfs), specifically the use of a mutable extlinux.conf.ProblemIn our current setup:TF-A authenticates FIP (OP-TEE + U-Boot)U-Boot supports FIT signature verification for kernel / DTB / initramfsextlinux.conf is stored in bootfs (ext4) and remains writable - this post-install.sh changes rootfs partuuid after each update. U-Boot uses extlinux.conf to select kernel / DTB and to define kernel command line (`root=PARTUUID=e91c4e10...`). This PARTUUID is changed after the update. With secure boot enabled, if extlinux remains mutable, it cannot be signature-protected, which violates the chain of trust.QuestionWhat is the recommende
Hello!I'm working on a STM32MP257F-EV1 board. So far, I've been modifying the kernel device tree that came with the kernel after building the openstlinux distribution, and have that working. I'd like to move to CubeMX-generated device trees though, to adapt to a future custom design (still on the EV1 board for now though). I'm using CubeMX 6.17.0 on Ubuntu Linux.However, I was surprised to find out that simply doing "Start My Project from ST Board" and selecting the EV1 doesn't actually configure the board with the same functionality as the defaults from the distribution:* In my earlier post, I noted that eMMC booting doesn't work [1] (now works, but after changes)* I have bluetooth connected to USART6, also doesn't work out of the box (and still doesn't)* A SDIO-connected wifi card sits on the sdmmc1 (the SD card slot). Works with my modifications to the kernel device tree, but not with the same modifications to the /* USER CODE BEGIN ... END */ sections in the CubeMX-generated tree.*
I got a panic message from drivers/st/clk/clk-stm32-core.c at Trusted Firmware. My question is: What is clock ID 5? Is that MSI clock or LSE clock?Is there any information I could read about this ID?int clk_stm32_enable_call_ops(struct stm32_clk_priv *priv, uint16_t id) { const struct stm32_clk_ops *ops = _clk_get_ops(priv, id); if ((ops->is_enabled != NULL) && ops->is_enabled(priv, id)) { return 0; } if (ops->enable != NULL) { ops->enable(priv, id); } if ((ops->is_enabled != NULL) && !ops->is_enabled(priv, id)) { ERROR("failed to enable clock id: %u\n", id); panic(); } return 0; } The output isNOTICE: Early console setup ERROR: failed to enable clock id: 5 BACKTRACE: START: clk_stm32_enable_call_ops 0: EL3: 0xe017bac 1: EL3: 0xe01be2c 2: EL3: 0xe01beb0 3: EL3: 0xe01bf54 4: EL3: 0xe01c240 5: EL3: 0xe01db28 6: EL3: 0xe029a2c 7: EL3: 0xe0170dc BACKTRACE: END: clk_stm32_enable_call_ops PANIC at PC : 0x000000000e01be
Hello,I am facing an issue with DFU mode on an STM32MP157C when Secure Boot is enabled (OTP locked) and SCMI is active via OP-TEE, and I would like to confirm whether this is an expected behavior or a known limitation.I am using STM32CubeProgrammer to load FSBL and the FIP image into RAM, then entering U-Boot DFU mode in order to flash the eMMC. This workflow is used for recovery and reprogramming purposes.I am using the same software stack (ATF 2.12, OP-TEE 4.3.0, U-Boot 2025.01, device tree with SCMI configuration) on the two boards (based on stm32mp157c-dk2).The only difference between them is the Secure Boot state: one board is not locked, the other one has Secure Boot enabled.On the non-locked board, DFU works reliably with STM32CubeProgrammer. I can enter DFU mode, send the FlashLayout, and perform multiple DFU transactions without any issue. OP-TEE does print errors related to SCMI TA loading, but DFU continues normally.On the locked board, DFU becomes unstable. T
Hi ST community,We are bringing up a brand-new custom board based on STM32MP131C (Rev.Y) and are facing an issue while flashing SPI-NAND over USB DFU.Boot statusTF-A (BL2/BL31) boots correctlyOP-TEE OS boots and hands off to normal worldU-Boot starts normally and detects SPI-NANDSo the full boot chain up to U-Boot looks healthy.SPI-NAND detailsPart: GigaDevice GD5F4GM8UExxGSize: 512 MiBBlock size: 128 KiBPage size: 2048OOB: 128Detected correctly by U-Boot.Issue descriptionWhen flashing over USB DFU from U-Boot, erase/write operations fail due to many bad blocks at very low addresses, including block 0.Example output:Marking bad block at 0x00000000 (-5)Skipping bad block at 0x00020000Skipping bad block at 0x00040000Skipping bad block at 0x00060000Limit reached 0x80000 while erasing at offset 0x80000Error: DFU write errorBecause of this, DFU flashing fails consistently.Are there specific U-Boot or TF-A configurations recommended for SPI-NAND on STM32MP13?Please find the attached patches
Dear All,I generated the code after configuring the STM32MP257F on CubeMX, however, after opening the generated project on STMCubeIDE and building it yield errors. I don't get why. Please Help.Here is the complete error report shown on IDE:16:38:45 **** Incremental Build of configuration Debug for project hrt-mc-stm32mp2_CM33 ****make -j8 all arm-none-eabi-gcc "../OPENAMP/mbox_ipcc.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DMETAL_MAX_DEVICE_REGIONS=2 -DVIRTIO_SLAVE_ONLY -DCORE_CM33 -DUSE_HAL_DRIVER -DSTM32MP257Fxx -c -I../Core/Inc -I"C:/Users/Foto/Battery Dynamics GmbH/80 Students - Documents/83 Data/2025-05 MA Swain/17_WS/STM32MP/IOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/include" -I../OPENAMP -I../../Drivers/STM32MP2xx_HAL_Driver/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc/Legacy -I../../Utilities/ResourcesManager -I../../Drivers/CMSIS/Device/ST/STM32MP2xx/Include -I../../Middlewares/Third_Party/OpenAMP/virtual_dr
Hello ST community. I am trying to understand the support the otfdec https://wiki.st.com/stm32mpu/wiki/OTFDEC_internal_peripheral internal device has or will have in the OpenSTLinux. Can anyone suggest reading material on supporting the otfdec for mp2?
Section 5.1.1 Step 3 says that Copy the dts file from the directory: x-linux-gnss1-app\linux-kernel\patch\5.15\kernel to the kernelsource directory at <KERNEL SOURCE PATH>/ arch/arm/boot/dts/But in the latest X-LINUX-GNSS1 package, the linux kernel is 6.1.11 and there are 3 patch files and 1 fragment file is present. It is unclear what to copy exactly. @Saurabh.Rawat
I am struggling with getting a STM32mp25D board flashed, it hangs at BL32 (see output below). It does have one warning "WARNING: Could not enable VRSEL for vddio2", but I don't think that is relevant to the hanging at BL32 (but I could be wrong). I have successfully flashed a STM32mp25F-EV1 board, that works fine. Seeing as the difference between the D and F flavor is that F supports secure boot, I have attempted to tweak OPTEE settings, such as building OP-TEE OS with configuration CFG_STM32MP_PROFILE=system_services, as suggested here. I have also attempted to set BOOTSCHEME_LABELS = "opteemin" in the boot scheme section of the stm32mp25.conf file. Someone else on the team is also tweaking firewall/security settings, also with no success. I'm not sure exactly what they have attempted on that front, however. I am wondering if someone else has run into this problem/has a solution? I'm also unsure if I'm barking up the wrong tree thinking that the issue lies with OPTEE/f
Hi!I am working on the STM32MP257F-DK board for a robotics project. For this, I want to map some of the GPIO to M33 in order to control the motors while the Linux of the A35 will run the ROS software. From what I understood is follows:I need to customise the device tree to give the permissions of the GPIO to M33 (I initially tried directly flashing with a STM32CubeIDE project and the mpu got reset)I need OpenAMP to communicate between the processors (A35 needs to send calculated moves to M33)How to achieve it I am not sure and I am unable to do it. I went through the STM resources but I am finding it quite confusing.I have installed the Developer-Package, Distribution-Package and Starter-Package as given in following documents:https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP2_boards/STM32MP257x-EV1/Develop_on_Arm%C2%AE_Cortex%C2%AE-A35/Install_the_SDK https://wiki.st.com/stm32mpu/wiki/STM32MPU_Distribution_Package#Installing_the_OpenSTLinux_distribution https://wiki.
Hi,I'm experiencing a fetching error with m4projects-stm32mp1 while building st-image-weston.First i had problem while fetching from:git://github.com/STMicroelectronics/STM32CubeMP1.git;protocol=https;branch=masterSince github doesn't support git: protocol anymore i changed that to https.But i still have fetching errorERROR: m4projects-stm32mp1-1.7.0-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'https://github.com/STMicroelectronics/STM32CubeMP1.git;protocol=https;branch=master')I can clone this repo manually but yocto doesn't.Cloning that takes some time (about 2 minutes) but yocto fails quickly. Seems it doesn't even tries to wait fetching to finish.Are there any thoughts how to solve that?
SummaryI'm attempting to add support for a custom STM32MP135-based board (M5Stack CoreMP135) to Yocto using meta-st layers, but the u-boot-stm32mp recipe appears to enforce rigid constraints that prevent using custom defconfigs and device trees. Environment- **Yocto Version**: Kirkstone- **meta-st Version**: OpenSTLinux 5.0 (Kirkstone)- **Target Board**: M5Stack CoreMP135 (STM32MP135DAE7, 512MB RAM)- **U-Boot Version**: v2022.10-stm32mp-r2- **Reference**: M5Stack successfully builds this board with Buildroot using custom defconfig Problem Description What Works in BuildrootM5Stack's Buildroot configuration successfully builds U-Boot for the custom board using:```BR2_TARGET_UBOOT_BOARD_DEFCONFIG="coremp135"BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_ST_PATH)/board/m5stack/coremp135/uboot-dts/*"BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="dtb-y=stm32mp135f-coremp135.dtb DEVICE_TREE=stm32mp135f-coremp135"``` Attempts in Yocto (All Failed) Attempt 1: Using UBOOT_MACHINE Override**Machine config:
Hello,I tried to understand what does A35-TD does better than M33-TD flavor and vice versa. But I don't find enough information. The information that confuses me is it says A35-TD Flavor has Hard real time on Arm Cortex-M33. What does it mean operation wise- what capabilities does it have extra compared to M33-TD Flavor? Could someone please help me understand this? Thanking.with regardsAmit
I'm working on adding a custom STM32MP257 board based on the openstlinux distribution package, and I'm currently using the STM32MP257F-EV1 board. I'm having problems with booting on eMMC with a stm32cubemx-generated device tree. What I've done:* Created a STM32MP257F-EV1 project in CubeMX. I've only changed the project name, no pinning etc (based on instructions from https://wiki.st.com/stm32mpu/wiki/How_to_create_STM32MPU_projects_with_STM32CubeMX#Create_an_STM32MP2_series_project)* Copied the generated output into layers/meta-st/meta-st-stm32mp-addons/mx* Copied stm32mp25-mx.conf to a custom one and edited (perhttps://wiki.st.com/stm32mpu/wiki/How_to_create_your_own_machine)BOOTSCHEME_LABELS += "optee" [...] BOOTDEVICE_LABELS += "sdcard" BOOTDEVICE_LABELS += "emmc" * Built the image usingDISTRO=openstlinux-weston MACHINE=stm32mp257f-simon source layers/meta-st/scripts/envsetup.sh bitbake st-image-westonwhich finishes successfully (CUBEMX_DTB, CUBEMX_PROJECT etc being set in
We have a custom board with an STM32MP151A and STPMIC1. The PMIC is connected to I2C4 over pins PD12 and PD13.In the process of migrating our software from OpenSTLinux 6.0 to 6.2, I initially got stuck into an optee panic (attached optee-panic.log with optee log level set to 3); after some investigation I *think* I figured out that the problem was coming from I2C4 being assigned to the secure context, but pins D12/D13 not being secure.I managed to go around that by making the I2C4 controller non-secure and removing all reference to it from the optee dts, but then the kernel was hanging forever (attached optee-pass-kernel-fail.log) until I also marked the RCC as non-secure for optee and changed the clock definitions in the kernel to not use SCMI (to do so I had to patch stm32mp15-scmi.dtsi to be empty).I now have a booting configuration by essentially avoiding SCMI for clocks and regulators (I have attached the kernel and optee dts), but I am wondering whether this is necessary bec
I have an issue with PMIC. It seems that Op-tee won't start och activate the PMIC. Do you know why? Any suggestion? The error is 0xffff0008 = TEE_ERROR_ITEM_NOT_FOUND.Notice that I have copied the DT from DK board. F/TC:0 0 probe_driver_node:543 Probing stm32-gpu on node gpu@48280000 D/TC:0 0 probe_driver_node:556 element: stm32-gpu on node gpu@48280000 deferred 3 time(s) F/TC:0 0 probe_driver_node:543 Probing stm32_pmic2 on node stpmic2@33 F/TC:0 0 stm32_pmic2_probe:923 Probe stpmic2 F/TC:0 0 initialize_pmic2:893 Initialize stpmic2 F/TC:0 0 lock_i2c_bus_access:796 thread access F/TC:0 0 unlock_i2c_bus_access:837 thread access completed F/TC:0 0 lock_i2c_bus_access:796 thread access F/TC:0 0 unlock_i2c_bus_access:837 thread access completed F/TC:0 0 stpmic2_register_read:259 REG[0 v=0x21 F/TC:0 0 lock_i2c_bus_access:796 thread access F/TC:0 0 unlock_i2c_bus_access:837 thread access completed F/TC:0 0 stpmic2_register_read:259 REG[0x1 v=0x11 I/TC: PMIC STPMIC REFID:2.A V1.1 F/TC:0
I have a platform where I need two different Linux distros, one kinda like Android's recovery environment, and one main application environment.They will have different packages, and probably also different init-systems, as the recovery environment should be as small as possible, so I probably need to build them in separate steps and separate Yocto distros.Additionally the recovery environment will be completely stored in a separate NOR flash, where also the bootloader is stored, the main application distro will be in a NAND flash.How can I get the OpenSTLinux build system to generate an appropriate flashlayout for this?So far I got it to work with the bootloader in NOR and rootfs in NAND, but the extra system in NOR seems to be a bit more effort.
Dear all, I was trying to setup the NVIC for EXTI for certain pins on STM32MP257F over CubeMX. However the nomenclature in CubeMX confuses me a lot. As I know there are two EXTIs: EXTI1 and EXTI2 which completely changes when we look into NVIC there it shows EXTI and EXTI1. Now the confusion is if EXTI is EXTI1 or 2 and so on.Thanking you all.with regardsAmit
gpioinfo outputgpiochip9 - 10 lines:line 0: "PZ0" inputline 1: "PZ1" inputline 2: "PZ2" inputline 3: "PZ3" inputgpiomon output# gpiomon --num-events 1 --edges falling PZ0^C# gpiomon --num-events 1 --edges falling PZ1^C# gpiomon --num-events 1 --edges falling PZ2^C# gpiomon --num-events 1 --edges falling PZ3gpiomon: unable to request lines on chip /dev/gpiochip9: No such device or addresswhy is there a problem with PZ3 pin specifically? noone is using itshould i add something in dts?
Hello! I'm attempting to build a custom bootloader for the STM32MP133C, heavily reliant upon the STM32MP13XX hal layer and then provided cmsis_core and cmsis_device_mp13 packages/pieces. I'm attempting this on IAR (company decision) which has added some wrinkles to this. I load the main application to the NAND flash using a custom flashloader, and then run the Bootloader code from sysram. Can't do both at the same time because IAR's flash loader uses the sysram.The bootloader initializes the necessary items- the HAL, system clock, DDR, UART, Flash, Ethernet, etc. I have it blink an LED 5 times for fun, and then load the .bin file from flash into a specific offset in the DDR, where I'm hoping to run from. I then set a function pointer to the starting location of the main app, and run that function pointer. It looks pretty simple/straightforward, as shown below: GetApplicationDetails(flash); //loads from flash to DDR. void (*p_AppEntryPoint)(void);//boot the full OSp
I'm in a bit of a pickle. I got a MIPI DSI screen with 1200x1920 resolution. It turns out for SMT32MP25x max vertical supported resolution is 1536. But datasheet says this. Some over-target non-guaranteed use cases are possible, but with specific constraints:• Drive simultaneously three panels, using the three interfaces (parallel, LVDS, DSI), witha same content.• Drive simultaneously two parallel LVDS panels, using each one link, with a reducedresolution and a same content.• Drive a 4 k panel via the DSI, with a limited features and performances: one layer,no resize, no rotation, 30 fps, and non-standardized blanking sizes. How do i specify those params in dts or/and linux panel driver? I tried setting 30Hz on panel, but that did not help - linux drm fails with "vblank wait timed out"This fails - 1200x1920@30Hz.clock = 80288,.hdisplay = 1200,.hsync_start = 1200 + 32,.hsync_end = 1200 + 32 + 14,.htotal = 1200 + 32 + 14 + 26,.vdisplay = 1920,.vsync_start = 1920
Hi, I'm using a STM32MPU157C with linux 6.6, uboot, OP-TEE 4.0 and TF-A 2.10 and I have a Device Tree (for linux and uboot) which declares the USB OTG node as following : &usbotg_hs { compatible = "st,stm32mp15-fsotg", "snps,dwc2"; pinctrl-names = "default"; dr_mode = "host"; pinctrl-0 = <&usbotg_hs_pins &usbotg_fs_dp_dm_pins>; vbus-supply = <&vbus_sw>; /delete-property/ wakeup-source; }; usbotg_hs_pins: usbotg-hs-0 { pins { pinmux = <STM32_PINMUX('A', 10, ANALOG)>; /* OTG_ID */ }; }; usbotg_fs_dp_dm_pins: usbotg-fs-dp-dm-0 { pins { pinmux = <STM32_PINMUX('A', 11, ANALOG)>, /* OTG_FS_DM */ <STM32_PINMUX('A', 12, ANALOG)>; /* OTG_FS_DP */ }; };I explicitly use it in FS as a Host and remove the wakeup-source declared by the stm32mpu151.dtsi.My problem is that I can see that when entering in suspend, there is a difference of ~4-5mW in power consumption depending on if the USB node is enabled or not in the device t
Hi,Greeting!I am working on the STM32MP135F-DK board and trying to interface a 4x5 matrix keypad using GPIOs.I configured the keypad as follows:Columns (C1–C5):C1 → PE1 (Pin 37)C2 → PF11 (Pin 35)C3 → PF9 (Pin 33)C4 → PD13 (Pin 31)C5 → PE6 (Pin 29)Rows (R1–R4):R1 → PA0 (Pin 40)R2 → PA5 (Pin 38)R3 → PA7 (Pin 36)R4 → PE5 (Pin 32)After modifying the device tree and flashing the updated .dtb, I observe the following issues:The display becomes glitchy.The boot logo appears corrupted.The system becomes unresponsive after boot.Recovery is only possible after reflashing the starter package using STM32CubeProgrammer.From my analysis:Manual GPIO control seems to work correctly.The matrix_keypad driver is loaded not properly.matrix_keypad 20480 0 matrix_keymap 12288 1 matrix_keypadI suspect this might be related to incorrect GPIO or pinmux configuration, possibly causing a conflict with other peripherals (e.g., display).Could you please help identify:The root cause of this issue?Whether these GPIO
I am running into issues building for the eMMC storage target for the `stm32mp25-disco` MACHINE type.I thought that adding "emmc" to `BOOTDEVICE_LABELS` should be enough to trigger building emmc flashlayout files. Is that not the case? I haven't found clear documentation on the subject.I tried making modifications to both `local.conf` and the machine conf directly. I was able to confirm the change takes affect with `bitbake -e`. Each time I build an image it only builds the flashlayout files for `sdcard`. What am I missing?mkdir yocto cd yocto repo init -u https://github.com/STMicroelectronics/oe-manifest -b refs/tags/openstlinux-6.6-yocto-scarthgap-mpu-v25.08.27 repo sync DISTRO=openstlinux-weston MACHINE=stm32mp25-disco source layers/meta-st/scripts/envsetup.sh printf "%s\n" 'BOOTDEVICE_LABELS = "emmc"' >>conf/local.conf bitbake core-image-minimal ls -l tmp-glibc/deploy/images/stm32mp25-disco/flashlayout_core-image-minimal/optee/ FlashLayout_sdcard_stm32mp257f-dk-ca35tdcid-os
WATCH ON-DEMAND | STM32 Summit 2026
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.