Ask questions and find answers on STM32 microprocessors and dedicated embedded software solutions, such as Yocto SDK, Qt, and OP-TEE.
Most recent activity
To bootup STM32MP157 from SD card, the layout for SD is partition#1, u-boot-spl.stm32, first copy of first stage bootloader partition#2, u-boot-spl.stm32, second copy of first stage bootloader partition#3, u-boot.img, second stage bootloader partition#4, rfs.ext4, root file system here there is single copy of second stage bootloader, if there is power off during flashing firmware, uboot on partition#3 might be corrupted and then my device would not be able to bootup, I would like to change the partition layout to partition#1, u-boot-spl.stm32, first copy of first stage bootloader partition#2, u-boot-spl.stm32, second copy of first stage bootloader partition#3, u-boot.img, first copy of second stage bootloader partition#4, u-boot.img, second copy of second stage bootloader partition#5, rfs.ext4, root file system and modify the spl first stage bootloader to add in check, if it detect 1st copy of uboot is corrupted, then it will load second copy instead, so far haven't seen
Hi,i try to use a ADM DMA with the board in object.I generate the code with CUBE MX and i add only the function HAL_ADC_Start_DMA(&hadc1, (uint32_t*)&buff, 1); before the while loop in the main.After i start the ADC, the hadc1.State remains in HAL_ADC_STATE_REG_BUSY and the DMA2_Stream0_IRQHandler never happens.I attach the .ioc file of the project.Someone can help me?Thanks a lot
Hello,I am working on a project that acquires ADC readings and saves them into a buffer in the M4 side of STM32mp157 chip on DK2 board, now I need to build a kernel module that copies the saved buffer from the SRAM to DDR on the A7 side when a certain interrupt is triggered.As I am a beginner in embedded linux world I am wondering about the way to do this, I tried memcpy() at first but errors arise when inserting the module (Can't page virtual address error), I also tried converting the SRAM address from physical to virtual before memcpy() but that didn't work as well.Is there a direct way to copy data between the memories like memcpy() or do I need to use DMA from the kernel module to copy the data, if the DMA is the way, sharing an example would be great.Thanks
I use STM32MP151CAA3 mounted on my own board.I want to start to count up TIM3 in PWM generation mode in Cortex-M4.I have written following code, However, TIM3 doesn't start to count up (After Line 56, TIM3_CNT value doesn't change at all).In this code, PB04 port is used as PWM output port.void TIM3_Count_Start(void) { TIM_HandleTypeDef m_handleTim3; TIM_OC_InitTypeDef sConfigOC; TIM_SlaveConfigTypeDef sSlaveConfig; TIM_MasterConfigTypeDef sMasterConfig; GPIO_InitTypeDef GPIO_InitStruct; /* Peripheral clock enable */ __TIM3_CLK_ENABLE(); GPIO_InitStruct.Pin = GPIO_PIN_4; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_LOW; GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); m_handleTim3.Instance = TIM3; m_handleTim3.Init.Prescaler = 0; m_handleTim3.Init.CounterMode = TIM_COUNTERMODE_UP; m_handleTim3.Init.Period = 0; m_handleTim3.Init.ClockDivision = TIM_
I'd like to use aiohttp on OpenSTLinux but when I try to install it complains about needing Python 3.6+.Is there a straightforward way to upgrade to a new Python? I'm running the STM32MP1 DK2 board.Thanks,Andrew
Dear STM engineers and community,I'm working with STM32MP157-DK2 (Developer-Package 1.2) and an evaluation board for ADAU1977 ADC from Analog Devices. Desired setup entails using the external codec as the master of I2S communication (the same as with the onboard Cirrus codec on the board).Following the great documentation provided by the wiki pages (kudos to the teams working on that!) I have almost managed to get everything working perfectly.In order to get to this point I have done the following:Desoldered SB1 through SB4, and then soldered SB13 through SB16 in order to disconnect onboard codec from SAI2 and access it from the GPIO headerAdded the codec_of_xlate_dai_id in the source of the manufacturers driver according to: https://wiki.st.com/stm32mpu/wiki/SAI_device_tree_configurationIncluded the source files of the edited codec driver through kconfing and menuconfig and configured them as modularEdited the device tree (stm32mp157c-dk1.dts) according to all available documentation
Hello dear.I solved all errors and warnings.But I am getting a do_compile error and I can't figure out the cause, so I need help.I used the devtool build cherry0 command and bitbake cherry0 causes the same situation.The build message is:-------------------------------------------------------------------moonlive@kheng:~/work/STM32MP1/Distribution-Package/openstlinux-20-02-19/build-openstlinuxeglfs-stm32mp1/workspace$ devtool build cherry0NOTE: Starting bitbake server...NOTE: Started PRServer with DBfile: /home/moonlive/work/STM32MP1/Distribution-Package/openstlinux-20-02-19/build-openstlinuxeglfs-stm32mp1/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 42503, PID: 7602WARNING: You have included the meta-gnome layer, but 'x11' has not been enabled in your DISTRO_FEATURES. Some bbappend files may not take effect. See the meta-gnome README for details on enabling meta-gnome support.Loading cache: 100% |############################################################################################
Hi,I'm testing the UART_Receive_Transmit_Console example from STM32Cube_FW_MP1_V1.2.0 on the STM32MP1-DK1 discovery board. An HAL_ERROR is raised during the HAL_UART_Init and it seems that the function UART_SetConfig cannot find or set the clocksource correctly. I have set the PCLK1 clock in the u-boot and tf-a .dts files and I'm using a linux image with this setting.Is this function UART_SetConfig from the stm32mp1xx_hal_uart.c file only working in engineering mode or should it work also in normal mode?François
We made device tree for u-boot of stm32151c. But it can't work i2c4 for STPMIC1. PZ4,PZ5 is correctly connected to STMPIC1 with pull-up resistance.SDA,SCL has no signal.Attached is a device tree file.Please let me know what additional point to review.u-boot log message.************************************************************U-Boot SPL 2018.11-stm32mp-r4 (Jun 17 2020 - 11:05:13 +0900)Model: STMicroelectronics custom STM32CubeMX boardRAM: DDR3-DDR3L 16bits 533000Khzstpmic1_read: failed to read register 0x27 : -110ddr power init failedresetting ...U-Boot SPL 2018.11-stm32mp-r4 (Jun 17 2020 - 11:05:13 +0900)Model: STMicroelectronics custom STM32CubeMX boardRAM: DDR3-DDR3L 16bits 533000Khzstpmic1_read: failed to read register 0x27 : -110ddr power init failedresetting ...************************************************************
Hi, i am running yocto on STM32MP157 C reference board,Now I want use the fw_printenv from the user space for that I have found the recipe in the BSP i.e sources/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.07.bb but if I include u-boot-fw-utils in the st-image-core.bb file and try to build I was throwing errors as below:make -f ./scripts/Makefile.build obj=scripts/basic| rm -f .tmp_quiet_recordmcount| make -f ./scripts/Makefile.build obj=scripts/kconfig stm32mp15_trusted_defconfig| scripts/kconfig/conf --defconfig=arch/../configs/stm32mp15_trusted_defconfig Kconfig| ***| *** Can't find default configuration "arch/../configs/stm32mp15_trusted_defconfig"!| ***| scripts/kconfig/Makefile:128: recipe for target 'stm32mp15_trusted_defconfig' failed| make[1]: *** [stm32mp15_trusted_defconfig] Error 1| Makefile:492: recipe for target 'stm32mp15_trusted_defconfig' failed| make: *** [stm32mp15_trusted_defconfig] Error 2| ERROR: oe_runmake failed| WARNING: exit code 1 from a shell comm
Dear ST community,I’m trying to use the distribution package as described in the guide https://wiki.st.com/stm32mpu/wiki/STM32MP1_Distribution_Package#Installing_the_OpenSTLinux_distribution, but the oe-init-build-env file is absent.The first commands:$ repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-20-02-19And$ repo syncFinish successfully.However when I initialize the OpenEmbedded build environment (chapter 5.1):PC $> DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.shThe command fails due to the missing of the oe-init-build-env file.I check the revision of the openembedded-core folder and it is cd7cf933b3235560ec71576d8f3836dff736a39f as indicated in the manifest (https://github.com/STMicroelectronics/oe-manifest/blob/thud/default.xml), however inside the openembedded-core folder there is no oe-init-build-env file.How can I solve this problem?.Thanks in advance for any suggestions.Regards
I just made a pure x-cube-ai project with no user code included, and it is stuck at creating network object... I couldn't analyze this problem because it seems to be related to the network library.(prefix .a). Willing to help me out?
..
If I build the dts files that come with the developer package, I lose the ethernet. I need to add support for USART3 and UART7, but any new build of the device tree will make the ethernet disappear.
I want to change the environment with STM32MP151. but I can't find about this information , question 1) How to configure STM32MP151 for uboot ? how to change to single core from dual core ?2) How to configure STM32MP151 for linux kernel?3) Is it possible to test the operation by setting the dual core of the STM32MP157C-DK2 to single core?
In regular kernel and application development, does ST Linux running on the STM32MP15x series MPU allow booting over the network to a remote developer host, i.e. nfs-boot or similar so that "in-place" debugging can be performed?thanks, -pete u.
STM32MP1.Working on an solution that will use OpenAMP between M4 and A7 and then to user space. The M4 will run real time critical code that will send a message to the A7 when data is available, Got the raw and USART samples compiled nder CubeIDE and it''s working as loading the M4 code works.However wish to use a callback (interrupted) solution in a Linux user space application instead of this user space application polling a device or channel endpoint in a thread to check for data , thus to save CPU load. Even better is avoiding to have to use kernel modules for this A7/M4 brigde. I could not find much use cases of OpenAMP even it's quite an established technology. Any guidance would be helpful.
Hi all,I'm trying to build an openstlinux image (st-image-core) with yocto and bitbake.I have tried to compile it with a native ubuntu 18.04 and a virtual machine ubuntu 18.04 but the errors are similar.See attached log files. Referring to this community posts:https://community.st.com/s/question/0D50X0000ASoluGSQR/issues-compiling-distribution-package-on-dockerhttps://community.st.com/s/question/0D50X0000CBmacpSQB/157adk1-hook-updateudevhwdb-failsi have installed all packages from PC_prerequisites which are required.Hope someone can help. Thanks a lot.Kind regards DmnSd
How do I modify the clock frequency of stm32mp157 peripheral ,eg:HDMI display
Hi,i created a DT in Cubemx and now everythings works fine, with the exception of the CAN Bus.Here are the Snippets of the Device in DT:/// Clocks section CLK_FDCAN_PLL4R in the Clocks Section /// &m_can1{ pinctrl-names = "default", "sleep"; pinctrl-0 = <&fdcan1_pins_mx>; pinctrl-1 = <&fdcan1_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN m_can1 */ /* USER CODE END m_can1 */ }; And here are some debugs things from the Console:root@stm32mp1~# ip link set can0 type can bitrate 125000 root@stm32mp1:~# ip link set can0 up [ 2704.826934] IPv6: ADDRCONF(NETDEV_UP): can0: link is not ready [ 2704.831483] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready root@stm32mp1:~# cansend can0 1337#34.23.44 interface = can0, family = 29, type = 3, proto = 1 [ 2720.472282] m_can 4400e000.can can0: bus-off root@stm32mp1:~# I connected a scope FDCAN_RX / TX. I also have a complete Transceiver on a PCB connected to this device, with a termination.Is the
Which setting do i need? right now i try to build u-boot as debian package with follwoing settings:dpkg-buildpackage -a armAt the begining of the compilation i get following error:dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type arm-openstlinux_weston-linux-gnueabi, try setting a correct CC environment variableNevertheless it compiles successfully but the problem is that after the comliation the packager fails with follwoing error:Can't exec "arm-linux-gnu-objcopy": No such file or directory at /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm line 475.As you can see it search for arm-linux-gnu-objcopy and not the one i have specifed by openst-weston-compiler!What are the right calling parameters for dpg-buildpackage and "arm-openstlinux_weston-linux-gnueabi"-Compiler ? Thanks
Hi All.I develop M4 Core firmware using a custom board based on STM32MP151C.There is no problem with SPI communication without using DMA. However, when DMA is used, waveforms do not occur the pins or only the NSS pins react, resulting in waveforms.I want to know if I set the DMA wrong.Below is the corresponding code.__IO uint16_t __TEST_BUFFER[3];voidMX_DMA_Init (void){ /* DMA controller clock enable */ __HAL_RCC_DMA2_CLK_ENABLE(); __HAL_RCC_DMAMUX_CLK_ENABLE(); /* DMA2_Stream1_IRQn interrupt configuration */ HAL_NVIC_SetPriority (DMA2_Stream1_IRQn, 0, 0); HAL_NVIC_EnableIRQ (DMA2_Stream1_IRQn); return;}voidMX_SPI2_Init (){ LL_SPI_InitTypeDef SPI_InitStruct = { 0 }; LL_GPIO_InitTypeDef GPIO_InitStruct = { 0 }; if (IS_ENGINEERING_BOOT_MODE()) { LL_RCC_SetSPIClockSource (LL_RCC_SPI23_CLKSOURCE_PLL3Q); } /* Peripheral clock enable */ LL_APB1_GRP1_EnableClock (LL_APB1_GRP1_PERIPH_SPI2); LL_AHB4_GRP1_EnableClock (LL_AHB4_GRP1_PERIPH_GPIOB); LL_AHB4_GRP1_EnableClock (LL_AHB4_GRP1_P
Hi,I have created a layer with my custom distro config and altered the conf/local.conf to point to this new distro. So far so good, everything worked as expected. Now comming back and I want to resource the environment with source ./layers/meta-st/scripts/envsetup.shI got the following problem:build@1f814fef97e6:/build$ source ./layers/meta-st/scripts/envsetup.sh [HOST DISTRIB check] Linux Distrib: Ubuntu Linux Release: 18.04 [BUILD_DIR configuration] 1. build-openstlinuxeglfs-stm32mp1 - DISTRO is 'openstlinux-exut' and MACHINE is 'stm32mp1' 2. NEW - *** SET NEW DISTRO AND MACHINE BUILD CONFIG *** Which one would you like? [build-openstlinuxeglfs-stm32mp1] 1 bash: [: -z: binary operator expected Selected BUILD_DIR: build-openstlinuxeglfs-stm32mp1 [source layers/openembedded-core/oe-init-build-env][with previous config] [ERROR] No 'openstlinux-exut.conf' file available in layers/meta-stI also got the same problem if I specified the build-directory as argument. Be
####Error messages are below..ERROR: gstreamer1.0-plugins-bad-1.14.4-r0 do_compile: oe_runmake failedERROR: gstreamer1.0-plugins-bad-1.14.4-r0 do_compile: Function failed: do_compile (log file is located at /home/kheng_sw/work/STM32MP1/Distribution-Package/openstlinux-20-02-19/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/gstreamer1.0-plugins-bad/1.14.4-r0/temp/log.do_compile.8464)ERROR: Logfile of failure stored in: /home/kheng_sw/work/STM32MP1/Distribution-Package/openstlinux-20-02-19/build-openstlinuxeglfs-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/gstreamer1.0-plugins-bad/1.14.4-r0/temp/log.do_compile.8464---------------------------------##### The specific location of the error is like below.| photography-enumtypes.c:6:1: error: stray '\' in program| \#include "photography.h"| ^| photography-enumtypes.c:6:2: error: stray '#' in program| \#include "photography.h"| ^| photography-enumtypes.c
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.