Get ready for the STM32 Summit 2026 | Online, November 3
Ask questions and find answers on STM32 microprocessors software development tools.
Most recent activity
Hi, I just approach to STM32MP1 and want to port some project from STM32F4/L4 to M4 Core in STM32MP1. To start, I'm just trying use engineering mode fisrt. I have a STM32MP157C-DK2 board and a new project is generated by STM32CubeMX, all configurations is default and I'm using STM32CubeMP1 v1.3.0. Unfortunately, I always reach an issue when HAL_RCC_OscConfig always returns HAL_ERROR each time called from SystemClock_Config. Specifically, the following if condition in stm32mp1xx_hal_rcc.c is reached and my program stucks in an infinite loop. if (IS_HSE_IN_USE()) { if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState != RCC_HSE_ON)) { return HAL_ERROR; } } Am I missing something or I must write my own HAL_RCC_OscConfig? Again, all configurations is kept as default of STM32MP157C-DK2 board. Thanks, Bao Son.
I'm updating a .tsv file, used by the CubeProgramer to program a STM32MP DK1. The file I'm looking at contains:#Opt Id Name Type IP Offset Binary - 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157a-dk1-serialboot.stm32 - 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157a-dk1-trusted.stm32 P 0x04 fsbl1 Binary mmc0 0x00004400 arm-trusted-firmware/tf-a-stm32mp157a-dk1-trusted.stm32 P 0x05 fsbl2 Binary mmc0 0x00044400 arm-trusted-firmware/tf-a-stm32mp157a-dk1-trusted.stm32 PD 0x06 ssbl Binary mmc0 0x00084400 bootloader/u-boot-stm32mp157a-dk1-trusted.stm32 P 0x21 boot System mmc0 0x00284400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4 P 0x22 vendorfs FileSystem mmc0 0x04284400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4 P 0x23 rootfs FileSystem mmc0 0x05284400 st-image-weston-openstlinux-weston-stm32mp1.ext4 P 0x24 userfs FileSystem mmc0 0x33C84400 st-image-userfs-openstlinux-weston-stm32mp1.ext4I'm trying to understand the file's contents and how to
I am using STM32CubeIDE v1.4.2 on Ubuntu 18.04.05 with an STM32MP157C-DK2. The board is running the V2 Starter Kit image. If I set the boot switches to 'Reserved' (Boot 0 = 0, Boot2 = 1) I can program the M4 and step through the code. However, if I set the switches to 'Engineering Mode' (Boot0 = 0, Boot2 = 0) as ST suggests I cannot.Does anyone have any idea why I cannot run M4 code in 'Engineering Mode'? The issue seems to be 'external reset detected'. After this message there are timeout messages. This is the console output when I attempt to load and debug M4 code in 'Engineering Mode':Open On-Chip Debugger 0.10.0+dev-g30d1303 (2020-06-18-09:11)Licensed under GNU GPL v2For bug reports, read http://openocd.org/doc/doxygen/bugs.htmlsrst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srstInfo : Listening on port 6666 for tcl connectionsInfo : Listening on port 4444 for telnet connectionsInfo : STLINK V2J37M26 (API v2) VID:PID 0483:3752Info : Target voltage: 3.2199
Hi supporter,I use STM32Cube v1.10 on macos(Mojave) and linux(debian 9). The debug dialog has load mode option to choose production or engineering mode in stm32cubeide on linux system. But that dialog hasn't the load mode on macos.Below picture is debug dialog on macos.Does any thing I am missing to setup for stm32cubeide?
I want to know the role of the m4_***(for example m4_adc, m4_timers1) node in Cortex-A7 Device tree.When I generate device tree from CubeMX, the m4_*** node are described even if that peripherals are used only on Cortex-M4 FW.Do I need to set status = "okay" in Cortex-A7 device tree even if that peripherals are used only on Cortex-M4 FW?for example, When I use timer6 only on Cortex-M4 FW, Do I need to describe that status = "okay" in m4_timers6 node in device tree?Best regards,H. Masuda
Hi,Im working with STM32MP157A-DK1 board. Im working on the linux side, need to write C/C++ code for saving data into a SD card. I need to use SPI to get data from RF transceiver. I built linux and kernel as in this link:https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Modify,_rebuild_and_reload_the_Linux%C2%AE_kernelThen i looked for articles on SPI, these ones especially :https://wiki.st.com/stm32mpu/wiki/SPI_overview#Kernel_configurationhttps://wiki.st.com/stm32mpu/wiki/How_to_use_SPI_from_Linux_userland_with_spidev#pnl-glhvfb87rihttps://wiki.st.com/stm32mpu/wiki/SPI_device_tree_configuration#How_to_configure_the_DT_using_STM32CubeMXhttps://wiki.st.com/stm32mpu/wiki/How_to_build_Linux_kernel_user_space_toolshttps://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_PackageAnd to be fair these are really good materials but i cant manage to be able to run spidev_test example.i did rebuilt kernel , mod
Hi, I have 10 DK2's in a server rack for development and testing. STM32CubeIDE (1.5.0) debugging wants me to specify a serial port and an IP address for debugging. This is IMHO redundant, why? Moreover, the serial ports /dev/ttyACM* are to be selected from a drop-down list. But, those assignments are not persistent. After a reboot of the server or a reconnect of the boards, the ttyACM* changed. I would prefer using the persistent names available at /dev/serial/by-id/usb-STMicroelectronics_STM32_STLink*, but cannot select those in the Debuggger tab.Finally, the IDE asks me for my credentials several times per debug session. Is there a log which I can inspect to see what's going on behind the windows?RegardsKnarfB
I have a custom built buildroot image on my STM32MP157C-DK2. Used STM32CubeIDE 1.5.0 to create a M4 blinky project. Can download and run the .elf manually on the board, LED blinks okay. Engineering Mode works too. In Production Mode, I can download the .elf from IDE. Have to enter my credentials and see the download progress and the resulting .elf on the board.But, after download, I have to enter the same credentials again and .. finally get:Error in final launch sequence: Failed to execute MI command: target remote 192.168.2.44:3333 Error message from debugger back end: 192.168.2.44:3333: Connection timed out. Failed to execute MI command: target remote 192.168.2.44:3333 Error message from debugger back end: 192.168.2.44:3333: Connection timed out. 192.168.2.44:3333: Connection timed out.There serial connection says:[ 2174.385112] remoteproc remoteproc0: stopped remote processor m4 [ 2179.484162] remoteproc remoteproc0: powering up m4 [ 2179.493251] remotep
Hi, We have a custom board with onboard eMMC which is connected on SDMMC2 lines: SDMMC2_D0 - PB14 SDMMC2_D1 - PB15 SDMMC2_D2 - PB3 SDMMC2_D3 - PB4 SDMMC2_D4 - PB8 SDMMC2_D5 - PB9 SDMMC2_D6 - PC6 SDMMC2_D7 - PC7 SDMMC2_CMD - PG6 SDMMC2_CLK - PE3 These pins are not all default pins for SDMMC2 so I'm interested if there is a way to program this eMMC using DFU mode with Cube Programmer. Is there a way to change pins which are used for programming? Best regards, Nenad
Hi, i just started working/learning STM cards as an intern. I want to run C/C++ codes on STM32MP157A-DK1 ARM Cortex-A7.I did the getting started tutorials at wiki, and im using environmet version 2.1.0 release I followed these posts:https://community.st.com/s/question/0D53W00000M9GphSAF/using-stm32cubeide-for-developing-linux-user-space-applicationshttps://wiki.st.com/stm32mpu/wiki/How_to_manage_OpenSTLinux_project_in_STM32CubeIDEThen I wrote an the most basic hello world code. just want to get an build, deploy and see if its working properly then i will start working on the task that i given.#include <stdio.h> int main() { printf("hello world\n"); return 0; }The problem is when i press : Run as -> STM33 Cortex-A Linux deployment it gives an error and says : " Activation DeviceTree... failed" I really dont know anything about this kind of work, i worked as a programmer but with visual studio, unity engine and unreal engine so this kind of environment is compl
i am not able to flash the image in stm32mp157c-dk2
STM32MP157c-EV1 is connected with two QSPI NOR flash chips.When programming NOR flash using the CubeProgrammer using tsv file, it automatically programs the two NOR flash in Dual-Flash QSPI mode.My requirement is to program just the Single Flash chip connected to BK1.how can I tell the CubeProgrammer to do this?
Hi,Im pretty new here, to be exact it is 2 weeks that i started learning/working with STM32MP157A-DK1, i did all the getting started tutorials on the wiki, now im looking at the CubeIDE, i dont know where to go.Basically i want to learn about writing data into SD card (wthich data comes from ethernet) using DMA but dont know where to start, if there is a place for me that i can find some examples for IDE that could be great. I have average knowledge on c++ i can read every useful piece of code or paper, right now im really lost and dont know what to do.The other topic is can i add aditional libraries in to the IDE and how do i i do that, in C# i can basically do it with nuget packages, but i never used CubeIDE, i also want to learn thatEverything helps,i will be waiting for some guidance.
Hello,I need to flash a custom STM32MP1 board which only has JTAG (no USB port available). Additionally, I build the image using Yocto meaning the output are separate binaries (e.g. U-Boot) and .tsv files.The STM32CubeProgrammer detects the CPU with the ST-LINK/V2 in-circuit debugger. However trying to flash the device comes with the error:```Error: TSV files are not supported with JTAG/SWD debug interface```Could someone give me more info on how I could flash over JTAG and by using the STM32CubeProgrammer? Or how I could flash in any other way (dont forget that Yocto generates separate binaries and the .tsv files).
Hi,I'm having an issue while trying to debug the OpenAMP_TTY_ECHO_CM4 example described in gettin' started guide for stm32mp157a-DK1 (here link) using Cude IDE 1.4.2 on windows 10 machine. I configure the debug session as describe in the guide section 7, but when I started it, I got the following messages:Open On-Chip Debugger 0.10.0+dev-g30d1303 (2020-06-18-09:13)Licensed under GNU GPL v2For bug reports, read http://openocd.org/doc/doxygen/bugs.htmlsrst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srstInfo : Listening on port 6666 for tcl connectionsInfo : Listening on port 4444 for telnet connectionsInfo : STLINK V2J37M26 (API v2) VID:PID 0483:3752Info : Target voltage: 3.220093Info : Unable to match requested speed 8000 kHz, using 4000 kHzInfo : Unable to match requested speed 8000 kHz, using 4000 kHzInfo : clock speed 4000 kHzInfo : stlink_dap_op_connect(connect)Info : SWD DPIDR 0x6ba02477Info : stlink_dap_op_connect(connect)Info : SWD DPID
I'm following the tutorials on the wiki about developing for the cortex-m4 on the DK2 kit. I'm facing trouble when I need to connect to the serial console, see image:The chars shown on the error message are random. Things already tried:Update ST-link firmwareSet COM port number to COM1 instead of com24Reconnect ST-linkRe-flash clean starter package on DK2 boardReinstall cubeIDE to a fresh 1.4.0Any idea how to resolve this error? I also got access to MDK-ARM, is there a tutorial or wiki page on how to use the M4 with MDK-ARM?
As long as this 0x23 file is larger than 200M, it will fail to burn. I use version 2.5
I cant seem to get the STM32CubeIDE to work with the STM32MP157C-DK2 board. It builds the examples and then when I go to load and debug i get the following:Open On-Chip Debugger 0.10.0+dev-01193-g5ce997d (2020-02-20-10:57) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html cortex_a interrupt mask on cortex_a interrupt mask on cortex_a domain access control fixup on cortex_a domain access control fixup on none separate adapter speed: 8000 kHz adapter_nsrst_assert_width: 200 adapter_nsrst_delay: 200 none srst_pulls_trst srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : STLINK V2J36S26 (API v2) VID:PID 0483:3752 Info : using stlink api v2 Info : Target voltage: 3.231496 Info : Unable to match requested speed 8000 kHz, using 4000 kHz Info : Unable to match requested speed 8000 kHz, using 4000 kHz Info : clock spee
Why does it fail reading the file, which seems to be the biggest one also ?Log:12:20:36 : STM32CubeProgrammer API v2.1.012:20:38 : USB speed : High Speed (480MBit/s)12:20:38 : Manuf. ID : STMicroelectronics12:20:38 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x000012:20:38 : SN : 00420020333851053438333012:20:38 : FW version : 0x011012:20:38 : Device ID : 0x050012:20:46 : Read TSV File: C:\stm32mp1-openstlinux-4.19-thud-mp1-19-02-20\images\stm32mp1\flashlayout_st-image-weston\FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv12:20:46 : Number of partitions: 912:21:08 : Start Embedded Flashing service12:21:08 : Error: The file activePartitions.tsv does not exist, please check the file's path12:21:08 : Error: TSV flashing service failed12:21:14 : Start Embedded Flashing service12:21:14 : Error: The file activePartitions.tsv does not exist, please check the file's path12:21:14 : Error: TSV flashing service failed12:21:19 : Start Embedded Flashing service12:21:19 : Error: Th
Hi, All. In the wiki, the process to program the PKH into the OTP is done with stm32key tool in u-boot. Also, PKH file must be available in a filesystem partition. All these tasks need to be done manually...Is it possible to do this same process from sysfs? My idea is to be able to automate this task in a script.
Pin MODE for peripherals are set incorrectly with RSVD instead of correct alternate function definition (AF13).When building uboot it failed because pin Mode "RSVD" is incorrectly defined.e.g code from device tree m4_dcmi_pins_mx: m4_dcmi_mx-0 { pins { pinmux = <STM32_PINMUX('A', 6, RSVD)>, /* DCMI_PIXCLK */ <STM32_PINMUX('E', 0, RSVD)>, /* DCMI_D2 */ <STM32_PINMUX('E', 1, RSVD)>, /* DCMI_D3 */ <STM32_PINMUX('F', 11, RSVD)>, /* DCMI_D12 */  
I'm trying to connect the MP157c-DK2 board in Engineering board. The st link is connected on the CN11 connector.On the st link utility it says detection failed and does not recognize the device.
..
Hi, All.Program fuses values is a delicate task. I would like to confirm that it is possible to program PKH(Public Key Hash) using STM32_Programmer_CLI.The PKH is stored in OTP WORD 24 to 31For example: Set the value 0x9ffd3d2f into the word 24 (0x18) [pkh0]STM32_Programmer_CLI -c port=usb1 -otp program wordID=0x18 value=0x9ffd3d2fIs this right?Is there a specific command to close the device from STM32_Programmer_CLI?Thanks!
I am trying to boot U-boot as SSBL on a simple board with an eMMC flash.I flash the partitions using the embedded DFU ROMboot with STM32CubeProgrammer using the following Flash Layout#Opt Id Name Type IP Offset Binary- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-dk2.stm32- 0x03 ssbl-boot Binary none 0x0 u-boot.stm32P 0x02 fsbl1 Binary mmc0 boot1 tf-a-stm32mp157c-dk2.stm32P 0x04 fsbl2 Binary mmc0 boot2 tf-a-stm32mp157c-dk2.stm32P 0x03 ssbl Binary mmc0 0x00080000 u-boot.stm32The partitions are written successfully and when I run 'mmc part' in the U-boot DFU I see the partition as follows
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.