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 try to spi communication between my board with STM32MP157AACx microprocessor and STM32F429 disco board. I write code using bare metal for master side(my board), using HAL library for slave board(STM32F429). My problem is that I can't receive data from master side. There is my sample code piece from master side below:int enable = 1; uint8_t data; uint8_t someval = 0x40; void spi_init(void) { RCC->MC_AHB4ENSETR |= (1 << 1); //GPIOB peripheral clocks enable RCC->MC_AHB4ENSETR |= (1 << 8); //GPIOI peripheral clocks enable RCC->MC_APB1ENSETR |= (1<<11); //spi2 peripheral clocks enable GPIOI->MODER &= ~(1<<2); GPIOI->MODER |= (1<<3); //PI1 Alternate function GPIOI->PUPDR &= ~(1<<2); GPIOI->PUPDR &= ~(1<<3); //PI1 no pull up no pull down GPIOI->MODER &= ~(1<<4); GPIOI->MODER |= (1<<5); //PI2 Alternate function GPIOI->PUPDR &= ~(1<<4); GPIOI->PUPDR
Hi,I am doing "4.Adding an external out-of-tree Linux kernel module" at the below link.https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Distribution_PackageI am suffering from a module building problem and got the message below. I don't have much knowledge about Linux so it looks pretty hard to fix the issue by myself. Could you kind help me how to solve this issue? Thanks!| DEBUG: Python function extend_recipe_sysroot finished| DEBUG: Executing shell function do_install| install: cannot stat '/home/ckim/STM32MPU_workspace/STM32MP1-Ecosystem-v4.0.0/Distribution-Package/build-openstlinuxweston-stm32mp15-disco/kernel_module_example/kernel_module_example.ko': No such file or directory| WARNING: exit code 1 from a shell command.ERROR: Task (/home/ckim/STM32MPU_workspace/STM32MP1-Ecosystem-v4.0.0/Distribution-Package/build-openstlinuxweston-stm32mp15-disco/workspace/recipes/mymodule/mymodule.bb:do_install) failed with exit code '1'
Hi,We are using stm32mp157a-dk1 board. In this board USB hub is connected to usb_dm1,usb_dp1 pins of controller. It is working fine Hub is detecting and ports are also detecting in user space.Here is my problem. We are using stm32mp157a processor in my custom board. In this board USB_DM2 USB_DP2 pins are connected to USB_HUB. So i followed the below page in st wikihttps://wiki.st.com/stm32mpu/wiki/USBPHYC_device_tree_configuration As per above link i changed &usbh_ehci node in dts file.&usbh_ehci {// phys = <&usbphyc_port0>; phys = <&usbphyc_port0>,<&usbphyc_port1 1>; phy-names = "usb"; status = "okay";};But Hub is not detecting. I am for configuring Usb Port2 for usb host configuration. For this i am configuring the usb port 2 in correct way or not?Please help us in this Regards.
Hi all ~I'm trying to control GPIO input in own application. and I refered to below wiki. https://wiki.st.com/stm32mpu/wiki/How_to_control_a_GPIO_in_userspacethis is my code. gint gpiochip_fd, ret; gchar gpiochip_path[20]; struct gpioevent_request in_req; struct gpiohandle_request out_req; // IN1 PB12 gpiochip1 // IN2 PB5 gpiochip1 // IN3 PH6 gpiochip7 // IN4 PD15 gpiochip3 // IN5 PD14 gpiochip3 // IN6 PD11 gpiochip3 // IN7 PE7 gpiochip4 // IN8 PE9 gpiochip4 // IN9 PE8 gpiochip4 // IN10 PG9 gpiochip6 // IN11 PE10 gpiochip4 // IN12 PD12 gpiochip3 gint idx; gint in_gpio_chipno[NO_INPUT] = {1, 1, 7, 3, 3, 3, 4, 4, 4, 6, 4, 3}; gint in_gpio_lineoffset[NO_INPUT] = {12, 5, 6, 15, 14, 11, 7, 9, 8, 9, 10, 12}; for (idx=0; idx<NO_INPUT; idx++) { g_sprintf(gpiochip_path, "/dev/gpiochip%d", in_gpio_chipno[idx]); gpiochip_fd = open (gpiochip_path, O_RDWR); if (gpiochip_fd == -1) fprintf(stderr, "Failed to open %s\n", gpiochip_path); else { in_req.lineoffset =
Hi team,I'm developing a PCB that implements STM32MP151AAA3.I think VBAT is a backup power supply for RTC, so I'm planning to supply power to VBAT from a button battery.Will the RTC be reset when this button battery is changed?If it is so, is there any way to avoid resetting, such as connecting a capacitor on the VBAT input terminal?Best regards,
While setting up my STM32MP157F-DK2 discovery kit, I followed the steps through the Populate the SDCard section and the flashing process failed with the following message when attempting to flash with the FlashLayout_sdcard_stm32mp157f-dk2-optee.tsv binary.After failing with the expected flash file I tried flashing again with the FlashLayout_sdcard_stm32mp157c-dk2-optee.tsv binary and the flash process succeeded. Is this expected? I confirmed that my board is a rev F DK-2 and not rev C. I'm not sure what differences there are between the two revisions and if there is any missing functionality with the rev C binary.16:09:26 : STM32CubeProgrammer API v2.12.0 | Linux-64Bits 16:09:37 : USB speed : High Speed (480MBit/s)16:09:37 : Manuf. ID : STMicroelectronics16:09:37 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x000016:09:37 : SN : 003F0033343851143638323816:09:37 : DFU protocol: 1.116:09:37
Hi, Last couple of weeks I am trying to debug a rendering issue between eglfs and what I believe to be a VSYNC/Tearing issue. For testing I am using a bootlin demo build-root image with elgfs support. The image has Qt5.15, EGLFS and EGL support (more detailed description of the image specifications under: st_stm32mp135f_dk_demo.) Most of the QT examples have apparent vsync (tearing) issues like the one in this video. Weirdly enough, the pure opengl examples like hellowindow work perfectly fine. I attempted to gather more information about the issue in a few ways:Experimenting with the QT environment variables:I tried to set QT_QPA_EGLFS_ALWAYS_SET_MODE=1, QT_QPA_EGLFS_KMS_ATOMIC=1 with no results. I also created a KMS config file. What seemed weird to me is that the FORCEVSYNC and SWAPINTERVAL variables they do not seem affect the image, even though I can see on the EGLFS_DEBUG that the the variables have been applied.Testing different displays:I tested 4 different displays with DSI, a
bord: STM32MP157-EV1I want the LCD to display messages received by UART communication.However, when I run GTK with the command below, I get an error because I can't access the device file.su -l weston -c "/usr/local/xxxx"What should I do?
I am trying to remove unused services before build in yocto.can you please help me?
..
Hello, I have dual core STM32MP157F-EV evaluation kit. I can connect via ST-link and install an application (This is installing on M4). And when I press the reset button, the application is deleted because the M4 core is RAM. I want it to work again every time I reset it. How can I do that ? How can I create an application-specific yocto project?
Building the yocto image for honister release for STM32MP157F-DK2 board.
HiWe are using SEEED studio 102110318 module which uses STM32MP157CAC3 processor. We want to know if there is any way we can keep processor pin PD13 pin to low state in suspend state. We want the pin to maintain low state while in sleep mode. We have added pullup on this pin in Hardware which is affecting one of our peripheral operation in sleep mode. For this reason we want this pin to be set low which will solve the issue. We do not have any other option to remove pullup in hardware as our device production is completedPD13 is used as PWM to control LCD backlight, Is there any possibility to maintain PD13 as its runtime state during suspend mode, basically i dont want to control this pin during suspend modeI tried in sysfs, to control autosuspend_delay_ms but im getting IO error please find below imageis there any way to control it from suspend mode?Is there any other drivers that will support this feature?RegardsSrini
Hi,we are using a coin cell to supply the internal RTC of an STM32MP157 when our system is unpowered.This works as expected - as long as the external supply is off. As soon as the system is powered on, the battery is discharged with >20µA.Observing the register ADC_CCR shows that VBATEN is permanently set, connecting VBAT to the ADC input and a resistor devider (as stated in Fig. 248 in the reference manual).[Edit: removed misleading reference to ADC driver]In my understanding VBATEN is supposed to be set only while (and shortly before) VBAT is actually sampled. Otherwise the switch as seen in Fig. 248 does not make much sense to me.
Hi Everybody,I would like to completely boot kernel 5.10-dunfell (last year) from a 64MB dataflash (nor0). No mmc0 or nand0. Compiled the correct DTS with TF-A, U-Boot and kernel, I would like to use the following TSV for STM32CubeProgrammer:#Opt Id Name Type IP Offset Binary - 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp151a-***-mx-usb.stm32 - 0x03 fip-boot Binary none 0x0 fip-stm32mp151a-***-mx-trusted.bin P 0x04 fsbl1 Binary nor0 0x00000000 tf-a-stm32mp151a-***-mx-nor.stm32 P 0x05 fsbl2 Binary nor0 0x00040000 tf-a-stm32mp151a-***-mx-nor.stm32 P 0x06 fip Binary nor0 0x00080000 fip-stm32mp151a-***-mx-trusted.bin PDE 0x07 u-boot-env Binary nor0 0x00480000 none P 0x10 UBI Binary nor0 0x00500000 rootfs.binwhere *** is my project code (obfuscated).Once started, U-Boot fails to proceed to load rootfs.bin, which contains the kernel, modules and filesystem as a UBI partition. This was produced by Buildroot and it is valid; I checked loop-mounting it with mtdram. The type for UBI is Binary s
Custom PCB, STM32MP157C chip. Linux 5.7.10. Buildroot build. No issues - Linux boots to console prompt without trouble, no errors. I can view device registers and all memory regions using Segger Jlink via SWD in both SPL and UBoot. Once Linux starts - I can only view memory from 0xC0000000 to 0xCFFFFFFF, i.e. the DRAM. Any attempt to read internal RAM or device registers via SWD fails with "cannot read memory". JLink connected to CPU 0 (A7). If connected to M4 all I get is 0x23000000 regardless of what address I try to read (but the M4 is still in reset so that may be the reason).I am not certain if SWD read goes through A7 virtual memory mapping or not - but anybody know what needs to change so I can access internal RAM space and device registers from SWD once Linux is running ?
Hallo in our company we use for a large Project a STM32 MP153a microprocessor. Currently I'm trying to write a Device Driver for the TDK ICM42688P Mems Gyro. We have connected the Gyro trough I2C with the Cortex M4 core within the MPU. Both devices are located on a custom PCB and the Gyro is routed to the I2C2 Interface of the MPU (I2C2_SCL = PZ6, I2C2_SDA = PZ7). The Gyro is the only Device on this Interface (I2C2). We use a I2C Voltage of 1.8V and both devices support these voltage. The I2C2 Interface is in the Polling Mode.For my driver I have to read multiple registers of the Gyro therefore I use the HAL_I2C_MEM_READ function of the STM32 HAL which is in the HAL generated from CubeMX. I noticed that I get random Communication Errors so I have written a simple testcase in which I only read the Device ID of the Gyro in a while loop. Here is the pseudo code of this testcase so you have an idea how it works:while(1){ retVal_e = icm42688pReadRegister(ICM42688P_BANK_0_WHO_AM_I, &regV
Hi @Community member , Is there any common Linux image available for accelerating STM32MP1 based SoM, irrespective of eMMC (JEDEC Version 5.0/5.1 Complying) & DDR3 manufacturer.
root@stm32mp1:~# uname -a Linux stm32mp1 5.15.24 #1 SMP PREEMPT Wed Feb 16 11:56:41 UTC 2022 armv7l armv7l armv7l GNU/Linux root@stm32mp1:~# pacmd list-sinks-inputs No PulseAudio daemon running, or not running as session daemon. root@stm32mp1:~# alsamixer ALSA lib ../../alsa-plugins-1.2.6/pulse/pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Access denied cannot open mixer: Connection refused root@stm32mp1:~# root@stm32mp1:~# aplay /usr/local/demo/media/ST12266_269_full_technology-freaks_0160.ogg ALSA lib ../../alsa-plugins-1.2.6/pulse/pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Access denied aplay: main:831: audio open error: Connection refusedMy board is STM32MP157F-DK2. As expected I can't hear anything, but in SDK V3.X.X everything works fine.Please fix the bug as soon as possible.
hi, i'm stuck starting usbh_hs2 from u-booti can already start usbh_hs1 at boot, in order to load kernel and fs from an usb mass storage. i wish to do the same with usb_hs2, is that possible? is one configuration from DTS or from U-boot source code? ps. i'm starting u-boot from mmc, then detect usb mass storage and start alla the system from there thank you !!!
Hello All,forgive me if this as an obvious mistake but I'm completely new to TouchGFX. I'm using STM32 MPU, with Cube, FreeRTOS and TouchGFXI have created a page in TouchGFX using the digital clock object, I have created a TickEvent to update the clock.The Tick even is being called and if I put literal numbers into setTime24Hour, they are displayed correctly and can even be updated. The RTC is used throughout the rest of the code and is working fine, the code complies without any warnings.When I use the code (below) I only get 00:00:00 on the displayAny ideas?All the bestDren*****************************extern RTC_HandleTypeDef hrtc;void PageView::handleTickEvent(){ RTC_TimeTypeDef sTime; if ( HAL_RTC_GetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK ) Fatal_Error(); digitalClock1.setTime24Hour(sTime.Hours, sTime.Minutes, sTime.Seconds);}
I have LCD COG with ST7586 Controller but my device must by drive this LCD by FMC ( backward compatibility ) How can I Drive this LCD from Linux ? I found driver stm32mp1-fmc2-nfc for using FMC by Micrel ETH but i'm not have any idea for use it for LCD.
Hello,I created a new project in STM32CubeIDE for my STM32MP157A by using STM32CubeMX. In it I enabled UART and FreeRTOS on CMSIS-RTOSv2 and that's all. I use the auto generated code.Then I wanted to use TraceAlyzer on top of FreeRTOS however, upon including#include "trcRecorder.h"In the FreeRTOSConfig.h I got a strange error:/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.c:154: multiple definition of `SysTick_Handler'; ./Core/Src/stm32mp1xx_it.o: ./CM4/Core/Src/stm32mp1xx_it.c:160: first defined hereThe SysTick_Handler is defined in both files, here are the implementations if it may help:in cmsis_os2.c :/* SysTick handler implementation that also clears overflow flag. */ void SysTick_Handler (void) { /* Clear overflow flag */ SysTick->CTRL; if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) { /* Call tick handler */ xPortSysTickHandler(); } } #endif /* SysTick */In stm32mp1xx_it.c :/** * @brief This function handles System tick timer
I'm testing the Developer Package for STM32MP157c-dk2 demo board. Starter Pack is installed. When I compile the kernel as described in the Dev. Package's "README_HOW_TO.txt" file and update the kernel, The "Cube" example ceases running. It only says "No GCNANO GPU STACK capabilities to run 3D GPU demo. What I'm missing here ?The boot log says something about galcore time out.
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.