Get ready for the STM32 Summit 2026 | Online, November 3
Ask questions and find answers on STM32 microprocessors, including hardware, power, DRAM, flashing, interfacing, device tree, and peripherals.
Most recent activity
As part of our project, we are using an STM32MP157DAC custom board that has the same design with the STM32MP157D-DK1 development board except for a few changes (schematics of the design is attached)The board generally works when trying to upload and debug code to the M4 core using JTAG-SWI connection.However the board does not work when trying to boot from SD card. The steps in the wiki to populate the linux image to an SD card were used. The Cube Programmer software does not recognise the board.I tried using command line by typing ifconfig (or lsusb), but the connection cannot be recognised.To avoid the Cube Programmer, flashing the linux kernel U-Boot was also tested but no result obtained (The board still does not boot from the SD card).Both booting processes (using cube programmer and u-boot) were tested with an STM32MP157F-EV1 with no problems. Attached is our board's schematics (taken majorly from the reference board (STM32MP157D-DK1). Connection to the board for booting is
I want to download and use firmware (FW) to DDR3. Since DDR is initially disabled, the firmware to activate DDR and the main FW project are separate, and the download procedure is as follows:First, run the DDR activation FW to enable DDR.Download the main FW to DDR and enter debug mode. (The main FW does not perform MPU initialization during download because the debugger has cleared the monitor reset.) For reference, the MPU is the STM32MP131FAE7, and the DDR is the K4B4G1646E.I have successfully enabled DDR and modified the linker script of the main FW to download FW to DDR (base address: 0xC0000000). However, there is an issue. Among various possible problems, the most challenging one to solve right now is that the uint8_t variables are not changing as expected.Even when assigning values to uint8_t variables like: uint8_t val1 = 10; uint8_t val2 = 20; uint8_t val3 = 30; uint8_t val4 = 40;they do not change properly. There are no such issues with uint16_t or uint32_t v
When I use sp_ min, I use the following command to generate fip in the Bareenvironment, and can start the u-boot normally:fiptool create --tos-fw bl32.bin --nt-fw u-boot-nodtb.bin --fw-config stm32mp157d-***-fw-config.dtb --hw-config stm32mp157d-xx.dtb --tos-fw-config stm32mp157d-***-bl32.dtb fip.binBut when I use OP-TEE, I use the following command:fiptool create --tos-fw tee-header_v2.bin --tos-fw-extra1 tee-pager_v2.bin --tos-fw-extra2 tee-pageable_v2.bin --fw-config stm32mp157d-***-fw-config.dtb --nt-fw u-boot-nodtb.bin --hw-config u-boot.dtb --tos-fw-config stm32mp157d-***-optee.dtb fip.bin The result is that can't enter the u-boot,stuck somewhere, I don't know whether there is a problem with the configured op-tee system or the generated fip method is wrong?Please take a look. Thank you very much.
Hello,I am trying to set a static MAC address on an STM32MP157 board via U-boot, I have been following this guide.https://wiki.st.com/stm32mpu/wiki/How_to_update_OTP_with_U-Boot#:~:text=The%20fuse%20command%20allows%20you,(for%20a%20temporary%20update)It seemed to work as the ethaddr has been set as seen in image1, however when I boot the board and check ifconfig the MAC address is not present and the board is still using a different MAC address on each boot.Does anyone have any thoughts or ideas on what to do?RegardsStephen
make ARCH=arm O="$PWD/../build" multi_v7_defconfig fragment*.configmake[1]: Entering directory '<path>/Developer-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/sources/arm-openstlinux_weston-linux-gnueabi/linux-stm32mp-4.19-r0/build' GEN ./Makefile## configuration written to .config# GEN ./Makefile<path>/Developer-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/sources/arm-openstlinux_weston-linux-gnueabi/linux-stm32mp-4.19-r0/linux-4.19.9/scripts/kconfig/Makefile:109: *** No configuration exists for this target on this architecture. Stop.make[2]: *** [<path>/Developer-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/sources/arm-openstlinux_weston-linux-gnueabi/linux-stm32mp-4.19-r0/linux-4.19.9/Makefile:539: fragment*.config] Error 2make[1]: *** [<apth>K/Developer-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-02-20/sources/arm-openstlinux_weston-linux-gnueabi/linux-stm32mp-4.19-r0/linux-4.
Objective is to get the RGB888 LCD working with ECO 5.0 This panel worked fine with ECO 1.0[1] Follow this, topic: https://community.st.com/t5/stm32-mpus-products/stm32mp1-ltdc-device-tree-for-rgb-display/td-p/315953. In ECO 5.0 these DT entries seems not valid anymore. DTC warnings occurs as listed below, even though the build goes through.[2] RGB LCDs have reset and Enable pins for LCD control, The link above had an DT entry for it. enable-gpios = <&gpioh 15 GPIO_ACTIVE_HIGH>; // DISP reset-gpios = <&gpioh 7 GPIO_ACTIVE_HIGH>; // RESET But PH7 the reset pin is not released at boot. using gpioset -c 7 7=1, the reset is released (backlight goes on), it seems the panel DT node is ignored or panel entries have been changed. Since CubeMX does not generate DT panel examples and the wiki's might be outdated, it feels like a state of limbo.P.S: when using gpioget -c 7 7, the tool seems to reconfigure the I/O as input and the o
An simple RGB LCD panel does not show any screen or backlight.Trying to solve that to enable the PWM backlight timer for it.Some post followed:https://www.kernel.org/doc/Documentation/devicetree/bindings/display/st%2Cstm32-ltdc.txthttps://community.st.com/t5/stm32-mpus-products/how-to-add-pwm-backlight-to-timer-block/td-p/213372https://community.st.com/t5/stm32-mpus-embedded-software/pwm-backlight-not-working-can-you-please-check-my-device-tree/td-p/202199https://community.st.com/t5/stm32-mpus-embedded-software/how-to-use-timers2-as-pwm-backlight/td-p/357071cat /sys/kernel/debug/pinctrl/soc\:pinctrl@50002000/pinconf-pins | grep PA5pin 5 (PA5): alternate 1 (TIM2_CH1 TIM2_ETR) - push pull - pull down - low speedroot@stm32mp1:~# cat /sys/kernel/debug/pwm platform/40000000.timer:pwm, 4 PWM devices pwm-0 (backlight requested enabled period: 5000000 ns duty: 5000000 ns polarity: normal pwm-1 ((null) period: 0 ns duty: 0 ns polarity: normal pwm-2 ((null) period: 0 ns du
For Rockchip RGB panel this link to refers to device tree binding of panel-dpi, (MIPI-DPI), https://wiki.st.com/stm32mpu/wiki/Display_panels_hardware_componentsSeveral RGB panels are also listed in panel-simple.yaml. Which devicetree bindings one to follow for RGB panels ?
I'm trying to run my application compiled and linked for DDR on STM32MP135F-DK. Following the wiki istruction it's necessary preliminary to run the DDRInit project on SYSRAM that initialize the DDR and then execute my custom program.When I execute the DDRInit project the DDR configuration seems to be ok but when ddr_test_data_bus() is executed it fail at the first DDR base address 0xC0000000. Can someone explain to me why? Thanks in advance.
Hello,I have compiled a custom image to run on the M4 core on my stm32mp157f-dk2. I generated the code using STM32CubeMX. I am able to build it fine but am having issues launching it on the m4 core. Here are the commands that I run. echo executable.elf > /sys/class/remoteproc/remoteproc0/firmware echo start > /sys/class/remoteproc/remoteproc0/state The output I get is this root@stm32mp1-brady:/lib/firmware# echo start > /sys/class/remoteproc/remoteproc0/state [ 169.647382] remoteproc remoteproc0: powering up m4 [ 169.651669] remoteproc remoteproc0: Image is corrupted (bad magic) [ 169.657239] remoteproc remoteproc0: Boot failed: -22 -sh: echo: write error: Invalid argument I could not find a clear solution or cause to this. Does anyone know what this error means? I am able to run the OpenAMP_TTY_echo.CM4.elf on the M4 core using the same commands with no issues.Thanks.
Custom board. with STM32MP157 Objective is the use spidev to test and make transfer over the SPI2 bus. Problem: no ls /dev/spi*Added SPI2 using cubeMX to a project without these and generate the files.Compare the files generated with files generated for configuration w/o SPI2 1. stm32mp151.dts contains the nodes for spi2No changes needed/made2. TFANo differences found 3. OP-TEE- Added ETZPC nodes for SPI2DECPROT(STM32MP1_ETZPC_SPI2_ID, DECPROT_NS_RW, DECPROT_UNLOCK)- Added the clockCLK_SPI2S23_PLL4PNote: These changes are not mentioned in the WIKI 4. U-Boot- Added pinctrl nodes- Added device nodes5. Kernel- In board_defconfig file add the requirements as per the SPI WIKI.- Added pinctrl nodes (same as uboot)- Added device nodes (same as uboot) 6. for the nodes the dma deletion was uncommented, otherwise the following errors appears in dmesg. The PIO error was fixed by using the cs property in the device node, instead of PI0 i Pinctrl section (C
i try to flash starter package to our mmc but the error is found i done step by stepin botton text i bold the error please check it once and help me out why this is happend. 10:55:11 : UR connection mode is defined with the HWrst reset mode10:55:11 : USB speed : High Speed (480MBit/s)10:55:11 : Manuf. ID : STMicroelectronics10:55:11 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x000010:55:11 : SN : 00420027313251183137333910:55:11 : DFU protocol: 1.110:55:11 : Board : --10:55:11 : Device ID : 0x050010:55:11 : Start Embedded Flashing service10:55:11 : Memory Programming ...10:55:11 : Opening and parsing file: tf-a-stm32mp157f-dk2-usb.stm3210:55:11 : File : tf-a-stm32mp157f-dk2-usb.stm3210:55:11 : Size : 220.41 KB10:55:11 : Partition ID : 0x0110:55:11 : Download in Progress:10:55:13 : File download complete10:55:13 : Time elapsed during download operation: 00:00:01.81810:55:13 : RUNNING Program ...10:55:13 : PartID: :0x0110:55:13 : Start ope
Hi,My LCD display format is RGB666, I removed the "LCD_R0,LCDR1, LCD_G0,LCD_G1,LCD_B0,LCD_B1" in file "stm32mp15-pinctrl.dtsi", and recompile my device tree, then upload to my board. I tried to use the LCD_R0 as GPIO with command: gpioset gpiochip7 2=1But get error: "[ 52.329202] stm32mp157-pinctrl soc:pin-controller@50002000: pin PH2 already requested by panel; cannot claim for GPIOH:114[ 52.348561] stm32mp157-pinctrl soc:pin-controller@50002000: pin-114 (GPIOH:114) status -22gpioset: error setting the GPIO line values: Invalid argument"Please advise how to reuse the unused LTDC pin as GPIO.Thanks,QiZhang ltdc_pins_a: ltdc-a-0 { pins { pinmux = <STM32_PINMUX('G', 7, AF14)>, /* LCD_CLK */ <STM32_PINMUX('I', 10, AF14)>, /* LCD_HSYNC */ <STM32_PINMUX('I', 9, AF14)>, /* LCD_VSYNC */ <STM32_PINMUX('E', 13, AF14)>, /* LCD_DE */ <STM32_PINMUX('H', 8, AF14)>, /* LCD_R2 */ <STM32_PINMU
Hello,is there any example how to configure LTDC device tree entry for RGB display ?Documentation is unclear on that, only MIPI mode is quite well documented.RegardsArkadiusz
Do the SPI interface need an entry in the SCMI file, as what I2C requires to work ?if yes, So far could not find the exact entry for SPI2. According to the SCMI wiki not, but you never now. (:-))
Kernel tree does not assign any driver to pin PZ2. After gpioset -c gpiochip11 2=1, the pins goes actually high (from low) but the gpioset program stalls. SSH at that moment into the device shows: line 0: "PZ0" input line 1: "PZ1" input line 2: "PZ2" output consumer="gpioset" line 3: "PZ3" input line 4: "PZ4" input consumer="kernel" line 5: "PZ5" input consumer="kernel" line 6: "PZ6" input line 7: "PZ7" input Aborting CTRL-C/Z gpioset causes the device to be busy upon a next set.Is there a way to set the pin and the client release itself as consumer of GPIO pin to be able to change the pin later back to low? root@stm32mp1:~# gpioset -c gpiochip11 2=1 ^Z[1]+ Stopped gpioset -c gpiochip11 2=1 root@stm32mp1:~# gpioset -c gpiochip11 2=0 gpioset: unable to request lines on chip '/dev/gpiochip11': Device or resource busy root@stm32mp1:~# gpioget -c gpiochip11 2 gpioget: unable to request lines: Device or resource busy
Hello all,I already booted my image by following this link:https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP135x-DK/Let%27s_start/Populate_the_target_and_boot_the_imageThus, I'm using kernel v24.06.26My main goal is to modify Linux kernel and device trees, that's why I'm following below link:https://wiki.st.com/stm32mpu/index.php?title=STM32MPU_Developer_PackageAnd above link directed me to below one:https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package#Modifying_the_Linux_kernel_configurationFrom this link, I came until this step:And in the link that i pointed, which is:https://wiki.st.com/stm32mpu/wiki/Menuconfig_or_how_to_configure_kernel#Menuconfig_and_Developer_PackageI followed the instructions, copied uImage and rebooted board like below:However, my Linux kernel does not start, ST Logo appears and goes, and it continues like this.Here is my logs: E/TC:0 Panic 'Watchdog' at ?:0 NOTICE: CPU: STM32MP135F Rev.Y NO
Got this error in boot log.[ 4.036653] stm32f7-i2c 5c009000.i2c: error -ENOENT: Failed to get controller clock [ 4.054809] stm32f7-i2c: probe of 5c009000.i2c failed with error -25c009000 refers to i2c6. Below is the relevant section in the optee dts. I2C4 and I2C6 share a clock and I2C4 is working fine. I2C6 is mentioned in the eztpc node, so that ain't it either. st,clksrc=< CLK_CKPER_DISABLED CLK_ETH_PLL4P CLK_SDMMC12_PLL3R CLK_STGEN_HSI CLK_I2C46_HSI CLK_SDMMC3_PLL3R CLK_USBO_USBPHY CLK_UART24_HSI CLK_RNG1_CSI CLK_MPU_PLL1P CLK_AXI_PLL2P CLK_MCU_PLL3P CLK_RTC_LSI CLK_MCO1_DISABLED CLK_MCO2_DISABLED >; The i2c6 section:&i2c6{ pinctrl-names = "default", "sleep"; pinctrl-0 = <&i2c6_pins_z_mx>; pinctrl-1 = <&i2c6_sleep_pins_z_mx>; status = "okay"; pcf85263: pcf85263@51 { compatible = "nxp,pcf85263"; reg = <0x51>; status = "okay"; }; }; I2C4 was set up to 400kHz and I2C6 default, changing I2C4 to de
Custom SMT32MP15 board connected via the micro USB to a host PC. This board has HDMI via an RGB to HDMI chip but here PA10 is only used for USB OTG-ID) (there was another post on this about HDMI). Build kernel from ECO 5.0. The Gadget functions worked fine with ECO 1.On the host PC lsusb shows : ID 1d6b:0104 Linux Foundation Multifunction Composite GadgetThis would seems the gadget driver is working the board is in device mode. (right ?)ls /sys/kernel/debug/usb/49000000.usb-otg/dr_mode ep1in ep2in ep3in ep4in ep5in ep6in ep7in ep8in fifo params stateep0 ep1out ep2out ep3out ep4out ep5out ep6out ep7out ep8out hw_params regdump testmodeBoard dts entries: (based on the board entries form ECO 1.0 and ST Wiki)Note: only added this in the kerne; dts, not in uboot. &usbotg_hs{phys = <&usbphyc_port1 0>;phy-names = "usb2-phy";pinctrl-names = "default";pinctrl-0 = <&usbotg_hs_pins_a>;dr_mode = "otg";phy-names = "usb2-phy";// Note e
I'm trying to program the STM32MP1 processor over the ST-LINK V2 probe.But I'm facing some issues. My device cannot be found. STMicroelectronics ST-LINK GDB server. Version 7.8.0 Copyright (c) 2024, STMicroelectronics. All rights reserved. Starting server with the following options: Persistent Mode : Disabled Logging Level : 1 Listen Port Number : 61234 Status Refresh Delay : 15s Verbose Mode : Disabled SWD Debug : Enabled Target no device found Error in initializing ST-LINK device. Reason: No device found on target. First of all, I have made my own STM32MP1 board (https://github.com/DanielMartensson/STM32-Computer) and my goal is to install Linux onto it. But I having some issues with that too. So therefore I will try to program it with ST-LINK V2 in debug mode.Soldering of the pins:Vcc is OK - The Red LED is blinking 5 HzGND is OKNRST will shut down the blinking red LED of 5 Hz when NRST goes to GND = Good soldering o
We made a new board with STM32MP157FAC1.I tried booting with SD card with STM32MP1 Starter Package image of STM32MP157x-EV1.I am inquiring about the following error. NOTICE: CPU: STM32MP157FAC Rev.ZNOTICE: Model: STMicroelectronics STM32MP157F eval daughter on eval motherINFO: PMIC version = 0x21INFO: Reset reason (0x15):INFO: Power-on Reset (rst_por)INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000INFO: FCONF: Reading firmware configuration information for: stm32mp_ioINFO: Using SDMMCINFO: Instance 1INFO: Boot used partition fsbl1ERROR: stm32_sdmmc2_send_cmd_req: timeout 10ms (cmd = 0,status = 2000)WARNING: CMD0, Retry: 1, Error: -60ERROR: stm32_sdmmc2_send_cmd_req: timeout 10ms (cmd = 0,status = 2000)WARNING: CMD0, Retry: 2, Error: -60ERROR: stm32_sdmmc2_send_cmd_req: timeout 10ms (cmd = 0,status = 2000)WARNING: CMD0, Retry: 3, Error: -60ERROR: SDMMC1 init failedPANIC at PC : 0x2ffec8efException mode=0x00000016 at: 0x2ffec8efCan you guess what error it is?
Hello,We are using 5V/3A adapter to supply STM32MP135F-DK, and we are designing a mechanical structure for our project. To use the board without plug we have to use external power supply and do required connections (using gnd pins etc.). How can we do that?
Hi,I'am also using STM32MP157C-DK2 to communicate between the A7 and the M4 using the Virtual Uart (OPENAMP and IPCC).I was trying to use STM32MXCube to configure the peripherals but the STM32MP157C-DK2 board is not available instead CubeMX has STM32MP157D DK1.If I create a project in MXCube with MCU selector instead of Board selector it doesn't allow me to activate OpenAMP.As both boards have similar hardware but different MCUs - CAC3 and DAC1 respectively can I still run MXCube project created by selection of 157D-DK1 board and run it on 157C-DK2 board. Thanks in advance!Mansi Patwari0 Kudos Reply
Hello everyone,We have a custom board based on stm32mp157c. We have a working bsp, which have tf-a 2.2 and u-boot 2020 version. Currently we are updating tf-a to 2.6 and u-boot to 2022. In our board we have burned mac address in the otp and we can read the mac address from otp using the old tf-a and u-boot version.But currently we can not read otp from the using the current version. It is showing following message while retrieving mac-address from the otp. invalid MAC address 0 in OTP 00:00:00:00:00:00 I have following device tree configuration in the optee. &bsec { status = "okay"; ethernet_mac_address@e4 { reg = <0xe4 0x8>; st,non-secure-otp; }; ethernet_mac1_address@ec { reg = <0xec 0x8>; st,non-secure-otp; }; ethernet_mac2_address@f4 { reg = <0xf4 0x8>; st,non-secure-otp; }; board_id@fc { reg = <0xfc 0x4>; st,non-secure-otp; }; user_otp@100 { reg = <0x100 0x80>; st,non-secure-otp; }; }; In u-
Hello @PatrickF ,Hope all is well.I need to access STGEN both in A7 core as well as M4 core. I have seen some previous posts related to STGENR register access.Credit to PatrickF for this code.#define STGENR_CNTCVL_OFF 0x0000 #define STGENR_CNTCVU_OFF 0x0004 #define STGENR_CNTCVL (*(uint32_t *) (STGENR_BASE + STGENR_CNTCVL_OFF)) #define STGENR_CNTCVU (*(uint32_t *) (STGENR_BASE + STGENR_CNTCVU_OFF)) uint32_t cntr_upper, cntr_lower; uint64_t cntr; __HAL_RCC_STGENRO_CLK_ENABLE(); do { cntr_upper = STGENR_CNTCVU; cntr_lower = STGENR_CNTCVL; } while (STGENR_CNTCVU != cntr_upper); cntr = ((uint64_t)cntr_upper << 32) + (uint64_t)cntr_lower;I did not implement the above code, but I was trying to see if I can read STGENR from A7 using Devmem2.I found STGENR_BASE from the manual which is 0x5A005000. I used devmem2 tool to read the lower counter (address offset = 0x0000) and upper counter(address offset = 0x0004)The devmem2 values for both are 0x0. I am n
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.