Ask questions and find answers on STM32 microprocessors and dedicated embedded software solutions, such as Yocto SDK, Qt, and OP-TEE.
Most recent activity
Hi, I am using STM32MP1F157-DK2 focusing on the ARM Cortex M4 chip and I am facing some issues while wanting to read ADC values from my sensors. I am relatively new to this and any advise or help would be greatly appreciated. I flashed the starter package into the STM32 discovery board initially based on documentation here. The following is the code performed on Arduino that I wanted to perform on the STM32 discovery board. void setup() { // initialize the serial communication: Serial.begin(9600); pinMode(10, INPUT); // Setup for leads off detection LO + pinMode(11, INPUT); // Setup for leads off detection LO - } void loop() { if((digitalRead(10) == 1)||(digitalRead(11) == 1)){ Serial.println('!'); } else{ // send the value of analog input 0: Serial.println(analogRead(A0)); } //Wait for a bit to keep serial data from saturating delay(1); } Based on the schematic of the STM32MP157F-DK2, I found out that the STLINK RX and TX is connected to PA2 a
Hello, I get the following error when trying to run bitbake -k -v core-image-minimal Build Configuration:BB_VERSION = "2.6.0"BUILD_SYS = "x86_64-linux"NATIVELSBSTRING = "universal"TARGET_SYS = "arm-poky-linux-gnueabi"MACHINE = "stm32mp1"DISTRO = "poky"DISTRO_VERSION = "4.3.1"TUNE_FEATURES = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"TARGET_FPU = "hard"meta meta-poky meta-yocto-bsp = "nanbield:bf9f2f6f60387b3a7cd570919cef6c4570edcb82"meta-oe meta-python = "nanbield:1750c66ae8e4268c472c0b2b94748a59d6ef866d"meta-st-stm32mp = "nanbield:eccd561ae8dc9c942491ef772b2d5385a64f66ae"Initialising tasks...NOTE: Marking Active TasksNOTE: Pruned 13989 inactive tasks, 5116 leftNOTE: Assign WeightingsNOTE: Compute totals (have 1 endpoint(s))done.Sstate summary: Wanted 14 Local 0 Mirrors 0 Missed 14 Current 2380 (0% match, 99% complete)NOTE: Executing TasksNOTE: Setscene tasks completedNOTE: Running task 4801 of 5116 (virtual:native:/home/user/dev/yocto/yocto/meta-st-stm32mp/recip
Hi,I have an STM32MP157d-dk1 board, which I am flashing with a Yocto Kirkstone, core-image-minimal image.I am trying to enable production mode debugging of the M4 through STM32CubeIDE, but so far without success.I have added ssh and sftp to my local.conf file:IMAGE_INSTALL:append = " module-init-tools openssh " EXTRA_IMAGE_FEATURES ?= "debug-tweaks tools-debug eclipse-debug ssh-server-openssh" CORE_IMAGE_EXTRA_INSTALL += "openssh-sftp openssh-sftp-server"and I have loaded the USB Gadget Ethernet module on the MP1:modprobe g_ether dev_addr=12:34:56:78:9a:bc host_addr=12:34:56:78:9a:bd ifconfig usb0 192.168.7.1 netmask 255.255.255.0I have configured my debugging profile to use "thru Linux Core" and set it up with the proper IP.When trying to connect to the board from CubeIDE, it stays in yellow light, with either status "Status: Idle" or "Status: Busy", but never gets a green light.If I start the debugger, it says "Configured inet address '192.168.7.1' not reachable"Everything works as e
Hello..We are using STM32MP157A-DK1 Kit.We have quarry that can we access ddr memory from CM4.As there no proper information in reference manual that how to access ddr memory from CM4.Please help us in accessing DDR memory from CM4. regards,Navaneeth kumar
Hello,We are using STM32157AAA3 Processor in our custom board and Microchip Ksz9893 switch for ethernet and the switch is configured using i2c.when we are trying to ping ethernet in RGMII mode in U-Boot v2022.10-stm32mp-r1 we are getting the Rx-clock frequency 125MHz but the Tx clock is configuring for 2.5Mhz and we are getting ping is not alive.when we try to ping ethernet in RMII Mode with auto negotiation it works fine.And we are able to ping ethernet in linux(v5.13) with fixed-link property in rgmii and rmii but when we are trying to use fixed-link in ubootV2022.10 we are getting cpu reset issue.Please find the below attached screen shots for our processor specific and board specific configurations and output log with out fixed-link we are getting without fixed-link propertywith fixed-link we are gettingWith fixed-link property please help us in this regards.regards,Srikanth.
Hello everyone,I've installed STM32CubeIDE and I've created a new STM32 project with STM32MP1x (in this case STM32MP131AAE3) as target but in the project there are only two directories (DeviceTree and Drivers).There isn't a source directory ("src") with C files where I can write my code. So... where can I write the code? What can I do?
Hello everyone,I have to convert a neural network into optimized C code for STM32MP1x. Is it necessary using OpenSTLinux (so X-Linux-AI) or is there an other way to get it?
Hello! Although, the OS is not supported, I'd be happy to get any clues on my relatively generic question.I have realized, that TEX remapping registers (PRRR and NMRR) values are hardcoded in Linux kernel source..equ NMRR, 0x40e040e0I'm particularly interested in the value for the first class of memory access. Lowest two bits (b00) describe Non-Cachable access for Normal memory. FreeBSD kernel uses Write-Back+Write-Alloc. type and it seems to cause problems. When it programs prrr&nmrr and then tries to flush entire unified TLB (p15, 0, r0, c8, c7, 0), I witness distortion of stack memory (zeroes) with lose of return address, etc.Is it kinda implementation dependent behavior of STM32MP157CAC or I shall investigate some OTP/Security settings, preprogrammed by vendor of my board?Thanks in advance for any clues!Stan
I'm having trouble in bringing up my custom board. I've made a custom device tree using CubeMX and adding the sections as described in "Lab-MP15_FromPartNumber_To_BasicDeviceTree_with_CubeMx". I can program fsbl-boot and fip-boot, but i'm not able to boot:E/TC:0 tzc_it_handler:79 TZC permission failureE/TC:0 dump_fail_filter:417 Overrun violation on filter 0E/TC:0 dump_fail_filter:420 Permission violation on filter 0E/TC:0 dump_fail_filter:425 Violation @0xfff09000, non-secure privileged write, AXI ID 480Also earlier in the log:E/TC:0 0 print_probe_list:366 |- Driver stm32mp1-cpu-opp on node cpu0-opp-table failedI've seen earlier topics on this error (@debugging), the solution was to add a 'reserved memory' section in the u-boot device tree.I have this in my device tree, tried both 0xce000000 and 0xde000000, but I still get the error, any ideas?Attached is the full log and de decompiled .dtb from u-boot.
I've been trying to cross compile pyzmq for my stm32mp135f-dk and I'm facing issues with it. I've ran the script to setup my environment for the SDK. And made the required changes in the setup file. Here's my stackoverflow post with the logs as well. https://stackoverflow.com/questions/77420874/cross-compiling-pyzmq-fails-because-the-setup-picks-up-the-x86-compiler-automati?noredirect=1#comment136505142_77420874Any help is much appreciated. The goal is to have a IPC mechanism between a C and Python application that is quick to implement.
Hi,I am using a PCM3060 codec connected to a STM32MP135 MPU over I2S1 and I2C, and compiling STM Linux (v6.1) (along with STM's version of TF-A, Optee, and U-Boot) using Buildroot.I had some trouble getting ALSA to output to the codec, it kept giving the response: 44004000.audio-controller-pcm3060-dac: ASoC: pcm3060-dac <-> 44004000.audio-controller No matching formats I managed to work around the issue by changing the formats entry in snd_soc_dai_driver, in pcm3060.c (https://github.com/STMicroelectronics/linux/blob/7928f69738d2e57ee2a0dba6e9e680a3bf75ded9/sound/soc/codecs/pcm3060.c#L189) to SNDRV_PCM_FMTBIT_S32_LE. #define PCM3060_FORMATS (SNDRV_PCM_FMTBIT_S32_LE) static struct snd_soc_dai_driver pcm3060_dai[] = { { .name = "pcm3060-dac", .id = PCM3060_DAI_ID_DAC, .playback = { .stream_name = "Playback", .channels_min = 2, .channels_max = 2, .rates = PCM3060_DAI_RATES_DAC, .formats = PCM3060_FORMATS, }, .ops
The LPTIM_TypeDef struct that is used throughout many of the HAL header files contains a few RESERVED fields that cover unused address offsets in the peripheral's memory map.The first of these, RESERVED1, is declared as uint16_t. I believe that this is incorrect and that it should be a uint32_t field to ensure that the address offsets of the subsequent fields are correct.Could someone please double-check and correct this if necessary?
Hi, I tried the Hello World application on Cortex-A7, I want to try linking my custom application library in this example. Can I do that?I changed the print_hello function and calling another function from my custom library.I tried linking custom library in Makefile byLDFLAGS += $(shell pkg-config --libs gtk+-3.0) -lxxxxx.aThe library file is in the same folder. But Get the below error: arm-ostl-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/usr-x/STM32MPU_workspace/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi -o gtk_hello_world gtk_hello_world.c -O2 -pipe -g -feliminate-unused-debug-types -Wall -pthread -I/home/usr-x/STM32MPU_workspace/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/gtk-3.0 -I/home/usr-x/STM32MPU_workspace/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/include/gio-unix-2.0 -I/home/usr-x/STM32MPU_workspace/Developer-Package
Dear ST community,I am currently trying to install an 8bit 8080 LCD , and i figured out that it needs FMC $ to be set up in devicetree in order to interface with it using DRM in Linux. i have the following device tree pinctrl nodes setup fmc_pins_mx: fmc_mx-0 { pins { pinmux = <STM32_PINMUX('D', 0, AF12)>, /* FMC_D2 */ <STM32_PINMUX('D', 1, AF12)>, /* FMC_D3 */ <STM32_PINMUX('D', 4, AF12)>, /* FMC_NOE */ <STM32_PINMUX('D', 5, AF12)>, /* FMC_NWE */ <STM32_PINMUX('D', 7, AF12)>, /* FMC_NE1 */ <STM32_PINMUX('D', 14, AF12)>, /* FMC_D0 */ <STM32_PINMUX('D', 15, AF12)>, /* FMC_D1 */ <STM32_PINMUX('E', 7, AF12)>, /* FMC_D4 */ <STM32_PINMUX('E', 8, AF12)>, /* FMC_D5 */ <STM32_PINMUX('E', 9, AF12)>, /* FMC_D6 */ <STM32_PINMUX('E', 10, AF12)>, /* FMC_D7 */ <STM32_PINMUX('F', 0, AF12)>, /* FMC_A0 */ <STM32_PINMUX('G', 9, AF12)>; /*
I am bitbaking the core-image-minimal image, for a plain yocto poky distribution (Kirkstone), using stm32mp1 as my machine, and I am trying to figure out how the various st partition images are included in the build process. That is, how and where are the st-image-bootfs.bb, st-image-userfs.bb and st-image-vendorfs.bb included in the core-image-minimal build? Everything is build as intended, but I cannot figure out how.I cannot find anywhere, where the recipes are added to any of the environment variables I usually use to include recipes, (IMAGE_INSTALL, PACKAGE_INSTALL, etc.).The only place I can find a reference to, for instance the bootfs recipe, is in meta-st-stm32mp/conf/machine/include/st-machine-common-stm32mp.incSTM32MP_BOOTFS_IMAGE ?= "st-image-bootfs" But I cannot trace that to how the recipe is included in the build.Please help.
My device tree:spi4_pins_csa: spi4-0 { pins { pinmux = <STM32_PINMUX('E', 12, AF5)>, /* SPI4_SCK */ <STM32_PINMUX('E', 14, AF5)>; /* SPI4_MOSI */ bias-disable; drive-push-pull; slew-rate = <1>; }; pins2 { pinmux = <STM32_PINMUX('E', 13, AF5)>; /* SPI4_MISO */ }; }; &spi4 { pinctrl-names = "default"; pinctrl-0 = <&spi4_pins_csa>; cs-gpios = <GPIO_CO_CS GPIO_ACTIVE_LOW>; status = "okay"; spidev@0{ compatible = "spidev"; reg = <0>; spi-max-frequency = <4000000>; }; };The output:root@apollo-e2412:~# spidev_test -D /dev/spidev1.0 spi mode: 0x4 bits per word: 8 max speed: 500000 Hz (500 kHz) [ 609.925039] spidev spi1.0: SPI transfer timed out [ 609.928391] spi_master spi1: failed to transfer one message from queue can't send spi message: Connection timed out Aborted
I have an STM32MP157D-DK1 development board and have built a buildroot image using the bootlin buildroot-external-st (st_stm32mp157d_dk1_demo_defconfig) external build tree. I have an Acubrite 12" 1080p touchscreen monitor that I am trying to get working at the monitor's native 1920x1080 resolution for use with a QT5 application but it is not working.The monitor works fine but is limited to 1280x720 resolution. Modetest does not report anything higher than 1280x720: root@stm32mp1:~# modetest -M stm Encoders: id crtc type possible crtcs possible clones 31 38 DPI 0x00000001 0x00000001 Connectors: id encoder status name size (mm) modes encoders 32 31 connected HDMI-A-1 250x140 5 31 modes: index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot #0 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver #1 1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver #2 800x600 75.00 800 816 896 1
i have been trying to use the LTDC peripheral on the Linux kernel to use it on the ILI9340 / ILI9340 in 8 bit mode.i use this in the device tree: &ltdc { status = "okay"; port { #address-cells = <1>; #size-cells = <0>; ltdc_ep1_out: endpoint@1 { reg = <1>; remote-endpoint = <&dsi_in>; }; }; }; &dsi { #address-cells = <1>; #size-cells = <0>; status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; dsi_in: endpoint { remote-endpoint = <&ltdc_ep1_out>; }; }; port@1 { reg = <1>; dsi_out: endpoint { remote-endpoint = <&panel_in>; }; }; }; panel_ili9341: panel-ili9341@0 { compatible = "displaytech,dt024ctft", "ilitek,ili9341"; reg = <0>; reset-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>; power-supply = <&v3v3>; status = "okay"; port { panel_in: endpoint { rem
board : STM32MP157F-DK2os : OpenSTLinux Kirkstonebuild command : bitbake st-image-coreroot@stm32mp1:~# rfcommCan't open RFCOMM control socket: Protocol not supported
Having doing a workshop regarding OpenST linux boot customisation (https://www.youtube.com/watch?v=hqGA5Krk0mU), I stumbled on a problem with a mass storage mount. Doing "ums 0 mmc 0" in uboot gives me partitions within an sdcard but only to see them as read only, unable to be mounted.Mounting sdb1 via terminal gave me error of "wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program or other error".St link is working, only problem is with usb download gadget.Unfortunately I am a beginner within the stm ecosystem so any help is greatly appreciated.Host is Macos Ventura 13.6, virtual virtualbox 7.0.6 as sudo (because of a problem with VERR_SHARING_VIOLATION in usb in regards to st link)
Hello, I am using the STM32MP157F-DK2 board, I also developed a carrier board in order to use external peripherals. I am using a 5V external power supply and I supply it through pin headers CN2 expansion, since I don't want to use the USB type C connector. I would like to skip the current verification in the boot process in software, maybe from the device tree or a recipe. I am using yocto to develop my custom image. If I connect first the USB-type-C and the external power supply at the same time, the boot process finishes correctly, if I disconnect the USB-Type-C after that, the operating system can run correctly with the external power supply, but the USB-type-C is needed in order to finish the boot process. Is it possible to skip that 3A verification on software? I am in the kirkstone branch, 5.15.67 kernel version.Regards, @obedPH
Hi Im using a STM32MP157-DK2 with a OpenSTlinux. I load my .elf file of for the M4 to /lib/firmware/ and starts it by chaning the state to start in remoteproc. The problem I have is that remoteproc seems to not run the code from the beginning of the main function. I have added some GPIO debugging outputs to see if they are activated but not all of them are activated. The code seems however to be work fine and the UARTs and ADC etc that are initialized and do work. So they are obviously initialized correctly... If I then stops the process by sending stop to remoteproc and then re-starts by sending start, all debug outputs are activated. Meaning that the program restarts from the beginning of main. In the below example, the GPIO will not toggle at first start, but it toggle during the second start. int main(void) { /* USER CODE BEGIN 1 */ //HAL_Init(); MX_ADC1_Init(); MX_ADC2_Init(); HAL_DeInit(); /* USER CODE END 1 */ /* MCU Configuration---------------------------
Hi there,I have a custom board based on STM32MP157F, with USB2 connected to STM32CubeProgrammer for flashing the eMMC. No USB-ID, no USB-VBUS connected.The STM32CubeProgrammer downloads the FSBL and U-Boot, but the software does not reconnect as "USB download gadget", it starts again. I believe the problem is related to the following, but not sure.We have tried quite a few things in the u-boot dts and dtsi, but nothing gets it working as it should be.I appreciate any help, thanks.
Hello! Is it feasible to start FBSD kernel?So far I stuck with following error (seems to be from tf-a): Loading kernel... /boot/kernel/kernel text=0x1b4 text=0x5ad698 text=0x17e3d0 data=0xa4860 data=0x0+0x20c000 0x4+0x88d70+0x4+0xea43b| Loading configured modules... can't find '/etc/hostid' can't find '/boot/entropy' Using DTB compiled into kernel. Kernel entry at 0xc0400200... Kernel args: (null) metadata: filename:/boot/kernel/kernel, size=11874740 loadaddr=0xc0400000 ERROR: Illegal access to 0xffff0010: ERROR: FAIL_ID = 0x4c0 ERROR: Non-Secure ERROR: Privilege ERROR: Read PANIC at PC : 0x2ffc97b1 Exception mode=0x00000016 at: 0x2ffc97b1 I'm sure, that control passes to the kernel _start point. Any clues?
https://community.st.com/s/question/0D53W00000PoivmSAB/changing-the-emmc-pins-with-otpI have the same pin mapping as above: SDMMC2_CK - PE3 (AF09)SDMMC2_D0 - PE6 (AF07)SDMMC2_CMD - PG6 (AF10)I programmed the OTP fuses as follows:WORD 3: 0x23000004 (I also program SD as primary and eMMC as secondary)WORD 5: 0x56755395WORD 6: 0x000076A4The problem is that even after flashing the eMMC with the TFA image as per the following procedure: https://u-boot.readthedocs.io/en/latest/board/st/stm32mp1.html#prepare-emmc I still get nothing on the UART4 console.We also put a scope on the SDMMC2_CK line and no clock is detected. Does it mean the BootROM is not accessing the eMMC?Am I missing something?
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.