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 am enabling SPI1 controller and selecting PLL3Q as its kernel clock source on CubeMX. But automatic code is not generated for it.It looks like #DEFINES for SPI1 do not exist in stm32mp1-clksrc.h, while they do exist for other SPI controllers.
Hi All.I want to use the battery to power the RETRAM so that the contents of the RETRAM can be preserved even if the board is not powered.To do this, I connected the battery to the VBAT pin and set the "PWR_CR2_RREN" value to the "PWR_CR2" register of the M4 core firmware.However, when booting from Linux, the value set in the "PWR_CR2" register disappears.When booting in "Engineering Mode" and running only with the firmware of the M4 core, the setting value of the "PWR_CR2" register does not disappear even when the main power is turned off.Is there anything I need to add when I create the "dts" file to enable that feature?Please give me a lot of advice.ThanksRegardsMachilus
I have a problem to get the ethernet to work with the PHY AR8035 (Atheros). The board is from MYiR (MYC-YA157C-V2), but they are only providing yocto based image and I'm doing my work with buildroot. I'm using the bootlin buildroot branch: st/2021.02 https://github.com/bootlin/buildroot.gitThe kernel can't find MDIO: mdio_bus stmmac-0: MDIO device at address 6 is missing.The funny thing is, if I first boot the board from eMMC where the original image from MYiR is flashed, and afterwards, without switching power off, I start my image from the sdcard, the ethernet works. I guess this means that some register value is wrong, but I don't know where to start look. This also means that address 6 for the MDIO is also correct.On TF-A I have CLK_ETH_DISABLED, because the 125MHz is coming from the PHY.Below is the device tree for the kernel (CONFIG_AT803X_PHY=y is set):&ethernet0 { interrupts-extended = <&intc GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>, <&intc GIC_SPI 62 IRQ_TYP
Hello, I'm trying to PWM some pins using the sysfs interface on the openSTLinux but unfortunately, it's not working.I've been changing the device tree files in order to get it working, but still without success.I'm trying to follow this wiki but when I run the:ls /sys/class/pwmI get nothing.What could be the issue? PWM is enabled on the kernel.I've attached the modified device tree files.Best regards,Fernando Fontes
We are trying to use circular DMA to transfer data from ADC1 into a buffer in MCU SRAM using CubeMX-generated code to configure the ADC and DMA. The DMA stream encounters a transfer error on transferring the first item. I have tried clearing the DMA error flags before starting the transfer with HAL_ADC_Start_DMA but that did not help.The device is an STM32MP157C running in Production mode. ADC1 and DMA2 are assigned to the M4 core.Using a debugger it can be seen that the peripheral address and memory address are configured correctly for the DMA stream. However, the DMA_HWCFGR1 register for DMA2 shows that all streams are in double-buffer mode despite the DBM bit being cleared in the stream configuration register, is this normal?CubeMX-generated code:static void MX_ADC1_Init(void){ /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ ADC_MultiModeTypeDef multimode = {0}; ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC1_Init 1 */ /*
The RTC clock is on motherboard and usesthis driver (M41T62). I obtained source code from your website. I try to compile this driver as a linux module (debian). I have learnt that this driver is not supported.
Hi, I downloaded the image file required by STM32MP157-EV1 from Yocto, but this error occurred when I used ST32CubeProgrammer. Does anyone know how to solve it?Error:Yocto image information:
I tried setting the i2c frequency to less than 20KHz but I got the following error:[ 1.788573] stm32f7-i2c 40012000.i2c: no solution at all[ 1.792517] stm32f7-i2c 40012000.i2c: failed to compute I2C timings.[ 1.798793] stm32f7-i2c 40012000.i2c: Impossible to compute I2C timings.[ 1.805717] stm32f7-i2c: probe of 40012000.i2c failed with error -1This is the device tree change:&i2c1{ pinctrl-names = "default", "sleep"; pinctrl-0 = <&i2c1_pins_mx>; pinctrl-1 = <&i2c1_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN i2c1 */ clock-frequency = <10000>; /* USER CODE END i2c1 */ };
Hi,we are working on a sensor data reading application based on your logic analyzer example project. But in our use case the data are sampled on a FPGA connected via QSPI. We have hard realtime requirements (far below 1ms) of reading the data and transferring them to the DDR RAM, so that we cannot use the A7 & Linux (we tried already).I am now trying to get the QSPI working together with the MDMA controller from the M4 to transfer the data to the DDR RAM (or the internal SRAM as 2nd option). But I could not find any example source code. Could you provide an example project or code snippet which shows how to set this thing up? Or is it generally not intended or possible to setup MDMA transfers from the M4?Thanks in advance!Best regards,Karsten
Creating openstlinux-5.4-dunfell-mp1-20-06-24 distribution installation,with bitbake st-image-weston, error rises:(..layers/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb:do_compile) failed with exit code '1'Need help
Hi, I am using my custom SOM board based on STM32MP157CAC3 chip. The DDR, SDMMC1, UART4, I2C4 & PMIC configuration is same as of stm32mp157c-DK2 board. even I have used the same pin configuration in my hardware. For USB OTG, I have left USB ID and USB VBUS pin unconnected.I am using USB B Type Micro Connector to use the board as device only. My <board>-u-boot.dtsi file is as below, &usbotg_hs{ u-boot,dm-pre-reloc; u-boot,force-b-session-valid; hnp-srp-disable; dr_mode = "peripheral"; }; &usbh_ehci { u-boot,dm-pre-reloc; }; &usbh_ohci{ u-boot,dm-pre-reloc; }; &usbphyc { u-boot,dm-pre-reloc; }; &usbphyc_port0 { u-boot,dm-pre-reloc; }; &usbphyc_port1 { u-boot,dm-pre-reloc; }; /* USER CODE BEGIN addons */ &pmic { u-boot,dm-pre-reloc; }; /* USER CODE END addons */ my <baord>.dts file is as below,&usbh_ehci { phys = <&usbphyc_port0>; phy-names = "usb"; status = "okay"; }; &n
Hi,I am working on a custom board based on STM32MP157F and I am having some issues with USB and EHCI driver in U-Boot as well as with USB and OTG controller in U-Boot and TF-A.Once Linux is booted USB with EHCI driver works fine, but in u-boot it doesn't work properly.When EHCI is enabled in u-boot it will usually detect a connected USB drive at first, but while trying to access it, I randomly get the following timeout messages:“EHCI timed out on TD - token=0x80008d80�?It doesn’t seem to be a signal integrity issue though. In Linux it still works without setting any “phy-tuning�? parameter in the device tree. However, when using the OHCI driver in U-Boot it is possible to access the usb drives just fine.Another issue that might be related to this is that DFU with USB-OTG is not working properly on the device.The ROM code is able to load the TF-A image via USB-OTG and run it, but after that the USB-OTG connection stops working.The last message from TF-A is:“INFO: DFU U
hi,i would like to know if there is an API for configuring, starting and stopping the timers (TIM1, TIM2, etc.) i'm interested in setting up a timer as a PWM device. i've come across documentation that talks about functions that can be used to set up a timer as a PWM device (e.g., pwm_apply_state, pwm_config, pwm_enable, etc.) but i can't find any documentation that describes these functions, the name of the library they are in or the header file to include. no can i find examples on how to use the API. i found examples on adding nodes to a device tree and how to use the sysfs interface. but, i would prefer to use a library if it exists.thank you,vincent j. buonassisi
I would like to configure USB_OTG_HS port as Virtual COM Port(VCP) on stm32mp157f-DK2 board. The board is running STLinux and the host is windows 10. I can see the debug usb port as COM6 on my windows-10 device manager - that works fine. I would like the USB_OTG port work similar as the debug port. Please any help will be appreciated.
I am Korean and a developer with less than a year of experience. Please understand the immaturity of inquiring in the official English language. I am using STM32MP157C-EV1 board. The board has the following settings according to the blog link I referenced. The blog link address is : " http://www.emsyslabs.com/how-to-compile-linux-using-yocto-for-stm32mp1/ ". As you can see, the settings are as follows.STM32MP157C-EV1*Linux Image : OpenSTLinux -> st-example-image-qt*DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.shAs you see the anothe address link : https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_distribution"Image : st-example-image-qt is ST example of image based on QT framework "That's right. I'm doing some development to test a Qt example on that STM32MP157C-EV1 Board. Luckily, referring to the blog link, I was able to test the qt example for the target board, including the toolchain." http://www.emsyslabs.com/how-to-compile-linux-using-yocto-for-
Hello,we are working on the ST32MP1. The SPI3 works fine with the CubeMX software combining the DMA2 and FIFO when the board works in engineering mode. But if I perform the same software loaded by Linux (rproc start), the DMA2 SPI stream stops working, if I use the function HAL_SPI_Transmit_DMA() instead of using HAL_SPI_TransmitReceive_DMA(). If for example the amount of bytes to be tranferred is larger than 33, the DMA stops with this number of bytes in NDTR DMA register. In engineering mode, this works fine with the same setting. I tested a lot (linker, stack, memory, FIFO on/off...) without any idea, why on M4 only mode, all is working fine. Furthermore, if I take 30 bytes, the first amount of data is transmitted by DMA and then the SPI_ISR is inoved around 15 times to send the rest of the data ... With 40 bytes, the DMA IRQ comes ones but after around 15 bytes and the SPI IRQ is not invoked.Somehow curious but actually, I have no idea what is going wrong using tranmit only in prod
I ran into a warning for one section of code that I did not for a different section of code. So I simplified it into two function. I don't see why I get a warning for one and not the other.void test32(uint32_t *data) { uint32_t src_addr = (uint32_t) data; } void test16(uint16_t *data) { uint16_t src_addr = (uint16_t) data; }The compiler complains (also about unused variables, but I removed those)../Core/Src/main.c: In function 'test16': ../Core/Src/main.c:161:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 161 | uint16_t src_addr = (uint16_t) data; | ^ The compiler appears to be based on gcc 9.3.1.If I put these two functions in a simple C file and build it on straight Linux (gcc 9.3.0) the warning exists for both instances.main.c: In function ‘test16’: main.c:15:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 15 | uint16_t src_addr = (uint16_t) data; | ^ main.c: In function ‘test32’: main.c:20:2
Hello, I am working with STM32MP157C-DK2 board and trying to pass messages between the CM4 and the CPU (main processor) using the OpenAMP framework over the com ports ttyRPMSG0 and ttyRPMSG1. On the CPU I have the openstlinux-weston image, and a C program for reading and sending messages through ttyRPMSG ports. In this program for interacting with the ports, I pretty much followed this example. Here is my communication setup: CPU sends msgs --> ttyRPMSG0 --> CP4 Receives msgs CM4 sends msgs --> ttyRPMSG1 --> CPU Receives msgsThe CM4 firmware setups and configure OpenAMP and VIRT_UARTs very much as in the OpenAMP_TTY_echo. Here is the issue that I want to resolve.- The CM4 receives the messages sent from CPU. - However, on the CPU side, receiving messages only works if in a terminal I run echo 'some text' > /dev/ttyRPMSG1 This is quite annoying. Encapsulating this command in a shell script and launching a systemd service does not work (in t
Hi there,I am struggling to understand and achieve a USB gadget with Mass Storage + Serial(cdc-acm) + 1 custom interface with one bulk in and one bulk out though functionfs. Every interface works fine when runs separately. Issue starts when i try to make a composite device because of the fifo configuration.I understand there is total of 4KB Fifo as described in reference manual and is configurable for each endpoint as needed.I believe in my case :MSG = I need 1 BULK IN + 1 BULK OUTCUSTOM = I need 1 BULK IN and 1 BULK OUTCDC ACM = needs 1 BULK IN and i BULK OUT + 1 interrupt endpointso my requirement is only for np-tx-fifo, is this correct?But alwasy in composite mode it fails with :dwc2 49000000.usb-otg: dwc2_hsotg_ep_enable: No suitable fifo found.. <<from stm32mp151.dtsi>> – and total of entries can be 952 dwords.g-rx-fifo-size = <128>;g-np-tx-fifo-size = <512>;g-tx-fifo-size = <128 128 64 64 64 64 32 32>;Can somebody please explain how to configure it p
This part uses 354LFBGA package that does not bring out PG4 or PG5 where RGMII clocks are brought out. This would not allow connection to the RGMII_GTX_CLK or RGMII_CLK125 signals.
Anyone attempted to build a distro with the libs that support a dot net core run time ?Could a WinUI application work correctly on a strong stm32mp157 + gpu ?I need to have a complete crossplateform software suite on Android/IOs/linux/windows and my stm32mp1 board. UNO framework could be a solution. thx.
how to use vbat in dtsi configuration for RTC back up, i had checked in evk and dk1 and dk2 dtsi, no reference available. any one please share you thoughts
I am able to flash and debug code on the M4 core for STM32MP1using IAR in the engineering mode.Can you please help me with a similar procedure for Production mode?
Hi all,I am trying assign DMA to USART3 channel on STM32MP1.I assigned it appropriately in the CubeMX but it looks like it was not able to auto-generate any code regarding the DMA assignment to the USART3.The device-tree bindings look pretty confusing to me. How can I assign it correctly? I checked option use MDMA in the CubeMX and I can see a mdma block generated which is empty. So any directions on how to assign dma to USART3 will be really helpful and appreicated.Thanks.
Hi all,Referring to previous discussion I had.I just want understand what are the PWM limits for STM32MP1.I can't seem to generate PWM signal below 100ms. Any inputs will be appreciated.My target frequency is 1KHz.https://community.st.com/s/question/0D53W000014y9ZzSAI/maximum-value-of-pwm-period
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.