Ask questions and find answers on STM32 microprocessors and dedicated embedded software solutions, such as Yocto SDK, Qt, and OP-TEE.
Most recent activity
I'm working on a driver present in the Linux 5.4 kernel. In RS485 communication I receive everything I send, without being connected to another device to return what I sent.I use the command echo -e "Test" > /dev/ttyLP0 for the submission.I know that by default in RS485 communication I receive everything I send, but I want to disable the return (echo).BUG:My setup is:PLC - Programmable Logic ControllerProcessor: LS1027 (It's not a ST processor)Linux Kernel 5.4 (tty driver present in this kernel version, who owns the stm32-usart.c)I use a USB logic analyzer to analyze the signal sent through the echo -e "Test" > /dev/ttyLP0. With rs485 serial pins: D+, D- and GND.Hardware:Best regardsEduardo Gerhardt
I am trying to configure the TIM2_CH4 to capture mode on EV1 board so I can sense a fan speed from a PWM fan but I keep getting cat: read error: Connection timed outI have configured the timer as follows: &timers2{ pinctrl-names = "default", "sleep"; pinctrl-0 = <&tim2_pins_mx>; pinctrl-1 = <&tim2_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN timers2 */ dma-names = "ch3"; pwm { /* enable PWM on TIM2 */ status = "okay"; }; /* USER CODE END timers2 */ }; tim2_pins_mx: tim2_mx-0 { pins { pinmux = <STM32_PINMUX('A', 3, AF1)>; /* TIM2_CH4 */ bias-disable; drive-push-pull; slew-rate = <0>; }; }; tim2_sleep_pins_mx: tim2_sleep_mx-0 { pins { pinmux = <STM32_PINMUX('A', 3, ANALOG)>; /* TIM2_CH4 */ }; };I am using TIM12_CH1 to generate a pulse and I have shorted the two pins on the board.What am I doing wrong? Is there a better way to detect the sense on a PWM fan?
I am configuring the CPU to wake up from UART reception and/or GPIO interrupt:echo enabled > /sys/devices/platform/soc/4000f000.serial/tty/ttySTM1/power/wakeupecho enabled /sys/devices/platform/soc/4000f000.serial/power/wakeupAnd it goes to sleep with:echo "mem" > /sys/power/stateAfter 1 hour in sleep mode, the time is 20 minutes slow. This is not happening in Run mode.Additional Information:Linux 5.4.313.0V RTC battery backup
Hi!I ordered now a STM32H747I-DISCO board. Have looked in the source tree from U-Boot (ST fork and mainline). I know there is a support for STM32H743I-EVAL board. Wondering why there isn't a support for the STM32H747I-DISCO.Generic question:Has somebody interests when I add U-Boot support for the STM32H747I-DISCO Board?(Maybe I could also add Linux support. Okay, 32MiB is maybe not enough RAM...)It's maybe only a gimmick...
Hi,I'm using OpenST-linux version 4.9 on a STM32MP157c-ev1 and I wrote a simple script to run my firmware for Core M4. I would like to know how I can make the script run automatically after system boot.Here's my script if could of any help for answers, I wrote it following this guide, I tested it launching manually and it works, but now I would like to it runs automatically after system finishes booting. How can I do?RegardsMarco #! /bin/sh ################### CONFIGURATION VARIABLES ################################################### FIRMAWARE_PATH="/lib/firmware/" M4_FIRMWARE_NAME="xmi_ccu-test_CM4.elf" REMOTE_PROCESSOR="remoteproc0" ########################### SCRIPT BODY ###################################################### # Add firmware path if different then /lib/firmware if [ $FIRMAWARE_PATH != "/lib/firmware/" ]; then echo -n $FIRMAWARE_PATH$FIRMAWARE_PATH > "/sys/module/firmware_class/parameters/path" fi # Load firm
SAI2 Block A configured as a MasterTX and works. Fs configured for 48KHz, bit clock configured as 64*Fs and MCLK as 256*MCLK. I've verified these signals are sent to the audio codec which is configured as a slave (receives MCLK, SCLK, LRCLK (Fs)). The audio codec provides a transmit line and receive line for data. I'm successful with my asynchronous block A in sending audio to the audio codec but when I configure block B as synchronous to block A, the FIFO never fills, and I've verified this inside the HAL_SAI_Receive function. It just times out. I've verified that the audio data is on the SDB line as well via an oscilloscope.Might be related, but on the development boards GPIO connector which exposes all SAI2 pins except MCLK, all signals read as 0v even though reading off of the audio codecs lines, I get the correct signals that I'm generating on those lines. Just an extra problem. I don't have this issue with the I2C that I connect to the audio codec with.Heres the configuration of
Hi dears I wish you a good day ,I am working on my bachelor graduation prohect which is ( an overcurrent protection relay design ) and I using an STM32MP1 to have all the functions and required controlling inside it. And I want to add a communication interface ports with my device to share real time arc Fault data with other devices using local networks and I want to add at least 2 10/100/1000 Mbps Ethernet (RGMII) and 2 Optical Transceivers SFF 1000BASE. I want to add this ETHERNET and SFF module to my project and after a lot of research I noticed that the MPUs only can connect with only one ethernet for and I also found the ETHERNET switches, but I analyzed the marketing, and the experts says that ethernet switches are not good in real time data transferring and the best way to implement the multiple ethernet and SFF transceivers with the project is using the FPGA. And I checked some devices that using for communication, and I noticed that they used the FPGA for that I started t
Hi, I know that the ecosystem is already at 3.1.0 or higher, but we started our project in 2019 and working with image based on that release (1.0.0) and don't plan to upgrade.I wanted to send a link to the SDK from your website to our customers, but the link to 1.0.0 doesn't workI am using:https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32-mpu-openstlinux-distribution/stm32mp1dev.html#If I attempt to download any other SDK (1.1.0 for example) it worksOnly the 1.0.0 option is broken
/* USER CODE BEGIN PD */ #define ADC_BUF_LEN 4096 /* USER CODE END PD */ ... /* USER CODE BEGIN PV */ uint16_t adc_buf[ADC_BUF_LEN]; ... /* USER CODE BEGIN 2 */ HAL_ADC_Start_DMA(&hadc2, (uint32_t*)adc_buf, ADC_BUF_LEN);I've got the above code added to my project with the attached IOC, but when I hit a debug breakpoint after a second or so there are no values in the adc_buf.In addition, when I probe the ANA1 (Arduino Pin A3) with nothing plugged in, I get a sine wave that sits offset at ~3v and has a peak to peak voltage of about 800mV and 128MHz frequency. See pic below. It's also notable that there is no "DMA Continuous Requests" option in Parameter Settings which I understand I need to set to Enabled.
I'm building an elf file, SCPing it to the controller and using the fw_cortex_m4.sh to load it on the m4, but no matter what I set the APB2DIV scaler to the number of times per second TIM16 is called doesn't change. The only thing that does seem to affect the frequency is the prescaler on the TIM16 pin, but I've already got it set to 0 and I only get about 1.4kH.
Hi dear all,I'm looking for dual ethernet examples to implement with my stm32mp157d MPU , but I couldn't find anything on the internet.I've seen that there is no STM32 with dual ethernet interface but i want to add dual ethernet and fiber ports to my stm32mp157d but i can not find any references .So I look among the 3-port or 4 ports switches like (LAN9313,KSZ8863,KSZ8765 ….. etc) but unfortunately I cannot find any reference design by ST. Also, I cannot find any switch chip available in the market due to the long delays.Maybe I could go with some serial ethernet module using SPI or UART ?Speed isn't a requirement in my application, of course it would have been better to directly implement the TCP stack on the MCU using the ST libs, to have access to the code.Any ideas/examples links about how I could implement two ethernet ports(RJ45)(10BASE-T and 100BASE-TX support) and 2 fiber ethernet (100BASE-FX support via external fiber transceiver) ?Thanks
Hi,I'm using a custom buildroot build (2021.11) with linux 5.15.13, on the stm32mp157f-ev1 board.I can load an .elf M4 firmware into the M4 core and start it, using /sys/class/remoteproc/remoteproc0However, I can't use the debugging feature of STM32CubeIDE. I get an error in "final launch sequence". It works fine when I'm running the standard ST linux distribution however.Does anybody know, what is required for CubeIDE debugging to work on the M4 core in production mode?I notice some ST stuff missing from linux 5.15.13, compared to the 5.10.61 linux used in the ST distribution: rproc_srm_core, rproc_srm_dev, tee_remoteproc, rpmsg_tty. Any of this required for CubeIDE debugging?
I am using MB1407C (stm32mp157x-DK2 extension board with touch-screen) connected to my custom board. When board is booting I am getting the "ST life.augmented" screen on the U-boot and black screen when kernels starts. Also I am getting the telnet commands when I am updating the flashlayout using the CubeMxFlashLoader - so my guess is the DSI connection is working, but why do i get the black screen instead of the Wayland Weston desktop- that is shown when stm32mp157x-DK2 loads up the OS? What am i missing? What is other way to test the DSI connections?
hi,I am working with a custom board based on the STM32MP157C. I use a lan9303 chip which is acting as a switch for ethernet. In the linux kernel, there are no problems with the ethernet but I can't get it to work in u-boot. Even when I use the same Device-Tree layout for the ethernet and phy. The address 0 is the same thats used by the kernel but u-boot doesn't seem to find the phy there.The device tree for ethernet looks like this:&ethernet0 { status = "okay"; pinctrl-0 = <&ethernet0_rmii_pins_a>; pinctrl-1 = <&ethernet0_rmii_pins_sleep_a>; pinctrl-names = "default", "sleep"; phy-mode = "rmii"; }; &pinctrl { ethernet0_rmii_pins_a: rmii-0 { pins1 { pinmux = <STM32_PINMUX('G', 13, AF11)>, /* ETH1_RMII_TXD0 */ <STM32_PINMUX('G', 14, AF11)>, /* ETH1_RMII_TXD1 */ <STM32_PINMUX('B', 11, AF11)>, /* ETH1_RMII_TX_EN */ <STM32_PINMUX('A', 1, AF11)>, /* ETH1_RMII_REF_CLK */ <STM32_PINMUX('A', 2, AF11)>
Hi all,I am not familiar with STM32 platform but the DFSDM ADC feature seems to do exactly what I want (external delta-sigma modulator + digital filtering). I bought a STM32MP157C-DK2 board and started playing with it. But, I can't find any working example of DFDSM and I am a bit lost ...What would be the best way to start working with DFSDM ?Thanks,Best regards,Nicolas
Hi All,i am using stm32mp1 with i2c on sgtl5000 codec and control lines are over carrier i2si am getting kernel soc sgtl5000.c error sgtl5000 0-000a: Error reading chip id -6<STM32_PINMUX('A', 15, AF5)>; /* I2S1_WS */<STM32_PINMUX('Z', 0, AF5)>, /* I2S1_CK */ <STM32_PINMUX('Z', 1, AF5)>, /* I2S1_SDI */ <STM32_PINMUX('Z', 2, AF5)>, /* I2S1_SDO */ <STM32_PINMUX('Z', 6, AF5)>; /* I2S1_MCK */Any reference dts on i2s1 would be helpful.. and suggest on kernel error .
I'm using the bootlin buildroot branch: st/2021.02.I want to run a certain function on init of the Uboot (board_init function), like the ones used for the DK1 and DK2. My problem is that the function doesn't seem to be called. I have tried to debug the problem and put printf and put commands to get something shown on terminal, but nothing gets printed on terminal. I also tried to put while(1); function, to the board_init function, but the boot just goes on. When using make uboot-rebuild, I can see that the stm32mp1.c is compiled after I have changed it. I also deleted everything on output/images, so that the new images are really made. I also tried to do the same to board_late_init function, but no change.What am I doing wrong? Is the function not really called? If not, why? And if yes, why isn't it even stopping with while(1) endless loop?
Hello, i'm trying to use M4 kernel from A7 kernel worked under linux.I've started with openSTlinux distro and it works well (i can upload firmware to M4 using rproc), but for some reasons i need to make a very small distro (less than 16 mb). For this i'm started to use buildroot build system, which i configured to use linux kernel from https://github.com/STMicroelectronics/linux (i've tried to use 5.10 and 5.4 branches)I'm try to original .config from openstlinux (/proc/config.gz) to build my own kernel and it builds fine. But when system is booting up i've got a regrettable messages:[ 1.667275] stm32-rproc 10000000.m4: error -EINVAL: failed to get mcu reset[ 1.674148] remoteproc remoteproc0: releasing m4[ 1.678863] stm32-rproc: probe of 10000000.m4 failed with error -22Some investigation brought me to file drivers/reset/core.c and function static int of_reset_simple_xlate(struct reset_controller_dev *rcdev, &nbs
Hi,I'm working the stm32mp157c som and trying to boot external quad spi flash (cypress S25HL512T). I added this to dts. &qspi { pinctrl-names = "default", "sleep"; pinctrl-0 = <&quadspi_pins_mx>; pinctrl-1 = <&quadspi_sleep_pins_mx>; status = "okay"; #address-cells = <1>; #size-cells = <0>; flash0: flash@0 { compatible = "n25q512a","micron,m25p80"; reg = <0x0>; #address-cells = <1>; #size-cells = <1>; spi-max-frequency = <50000000>; partition@0x00000000 { label = "boot"; reg = <0x00000000 0x00500000>; }; partition@0x00500000 { label = "bootenv"; reg = <0x00500000 0x00020000>; }; partition@0x00520000 { label = "kernel"; reg = <0x00520000 0x01ae0000>; }; partition@0x02000000 { label = "spare"; reg = <0x02000000 0x00000000>; }; }; };aliases { spi6 = &qspi; };On the kernel side, I followed the following link.https://wiki.st.com/s
Looking at the clock in the MX Device Configuration Tool it says 204 to APB1 Timer Clocks (MHz).To get to 10000 Hz I have to divide 204 MHz by 20400. Fortunately there are a bunch of ways to do this. But on the first try I tried Prescaler 51Counter Period 100Internal Clock Division Division by 4The reason I did it this way is that I suspected 10000 Hz will be too fast and they will eventually go to 1000 Hz or something between 1000 Hz and 10000 Hz and it would be easy to change the counter period for the new value. I saved it and generated new code. static void MX_TIM14_Init(void) { /* USER CODE BEGIN TIM14_Init 0 */ /* USER CODE END TIM14_Init 0 */ TIM_OC_InitTypeDef sConfigOC = {0}; /* USER CODE BEGIN TIM14_Init 1 */ /* USER CODE END TIM14_Init 1 */ htim14.Instance = TIM14; htim14.Init.Prescaler = 51; htim14.Init.CounterMode = TIM_COUNTERMODE_UP; htim14.Init.Period = 100; htim14.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; htim14.Init.Aut
Is there any plan to release C++17 compatible HAL and LL libraries for MP1 platform? I had written a lot of code in C++17 and later found out that MP1 libraries are full of `register` keyword which is not supported since C++17. A temporary solution is of course deleteing the keyword from all HAL and LL sources (no hard work, there are only about 20 occurences), but I would like to know the official plan or statement about this.Thank you.
I've enabled pps-gpio and pps in the kernel config and added the following to the device tree:/{ //... pps{ compatible = "pps-gpio"; gpios = <&gpiod 13 GPIO_PULL_UP>; status = "okay"; }; };but this results in the following when starting the system:[ 1.350093] pps-gpio pps: failed to request PPS GPIO [ 1.350132] pps-gpio: probe of pps failed with error -22do you have any hint for me how i can fix that?I also tried adding a pinctrl section (which resulted in other problems).Thanks!Thomas
Good day,Has anyone been able to compile Azure Sphere OS for the STM32MP157D-DK1.I have the yocto environment configured, and I am able to build a vanilla embedded Linux image, but when I add the azure bblayers to the build. the build fails. I also tried building the OS with the provided build-os.sh script, it built successfully but I was not able to get the dev board to boot.Kind regards,Rayaan
I have custom stm32mp1 board and when running it as USB mass storage in U-Boot (ums 0 mmc 0), the USB driver is not detected nor by Linux nor by Windows. I am also attaching shematc comparison of eval-board VS my custom board. Also the USB-ORG is working in Engineering mode as DFU device - so I am guessing the soldering and USB pinouts are correct.Pic.1. Custom board schematics of USB-OTG2.Pic. Eval-board schematic of USB-OTG.
In previous releases of OpenSTLinux, u-boot used the NAND DFU backend to write to the NAND flash in the EV1 dev board. For UBI images, this required that the image was generated using the --space-fixup flag.To avoid this requirement, I submitted a patch to add a new DFU_NAND_TRIMFFS option to u-boot (link). When this option was used, the DFU NAND backend would correctly write UBI images to flash regardless of whether --space-fixup was used.With the latest release of OpenSTLinux, u-boot no longer uses the NAND DFU backend; it uses the MTD backend instead.Is there a way to tell the MTD backend to do the same (drop trailing all-0xff pages), so that UBI images generated without --space-fixup can be used?Thank you,Guillermo
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.