Join discussions in the Product Forums. Ask questions, learn from your peers, and share insights on ST solutions to accelerate your design journey.
Most recent activity
I am a user of the NUCLEO-N657X0-Q board.I would like to use Keil MDK RTX5 RTOS together with Root of Trust.My development environment is as follows:1> Development tool: Keil uVision V5.422> Example source: STM32Cube\Repository\STM32Cube_FW_N6_V1.2.0\Projects\NUCLEO-N657X0-Q\Applications\ROT\OEMuROT_Appli3> Development board: NUCLEO-N657X0-Q4> Manage Run-Time Environment Setting I have added the osKernelInitialize() function to the main function as shown below.int main(void) { #ifdef PRINT_BOOT_TIME /* Get boot cycles */ end = DWT->CYCCNT; #endif /* Reset of all peripherals, Initializes the Flash interface and the systick. */ HAL_Init(); #ifdef PRINT_BOOT_TIME /* Get Boot Time */ time = ((uint64_t)(end) * 1000U / SystemCoreClock); #endif /* Register SecureFault callback defined in non-secure and to be called by secure handler */ SECURE_RegisterCallback(SECURE_FAULT_CB_ID, (void *)SecureFault_Callback); /* Register SecureError callback defined in non-sec
#include <stdint.h> #if !defined(__SOFT_FP__) && defined(__ARM_FP) #warning "FPU is not initialized, but the project is compiling for an FPU. Please initialize the FPU before use." #endif int main(void) { /* Loop forever */ for(;;); }Hi Im trying to generate new project with CUBE IDE 1.13 which was working fine this morning but somehow its not generating .ioc file anymore when i searched it says FPU not initialized & generates only files which are present in the second pictureplz help me on this
Hi everyone, We are encountering a XSPI Deadlock on our STM32H7S7-Discovery board (STM32H7S78-DK).To provide some context, our system is configured as follows: External FLASH: Connected to XSPI1. Swapped through XSPIM to port 2 and operates in memory mapped mode. MCE1 is activated across the entire address range using the AES-STREAM Cipher. External PSRAM: Connected to XSPI2. Swapped through XSPIM to port 1 and operates in memory mapped mode. MCE2 is activated across the entire address range using the NOEKEON-BLOCK Cipher. The issue occurs when running an LZO decompression algorithm. The algorithm reads compressed data from the PSRAM and writes the decompressed output back to the PSRAM, while the code is being executed on External FLASH. At some point during decompression, the core completely freezes, no HardFault or BusFault is triggered, and the debugger permanently loses its connection to the core. We have tried multiple approaches to resolve, including the offic
Is there a prize for the most trivial post? Opened up a new Nucleo-L476RG board (finally worked my way through the 10+ boards I bought a number of years ago) - it comes in a cardboard box now, nice. The Leds (LD1, LD3) were so bright, I couldn't probe anywhere around the micro or connectors without squinting. So I replaced the resistors for these Leds (1K, 100?) with 22K, things are much more mellow now. Most people are using these boards indoors, the Leds only have to be bright enough for people to notice - not beaming out like the Eye of Sauron. Anyway, something for you to think about. Meanwhile, there's a few annoying clouds outside I need to shout at....
Hello,I am a French engineering student working on a startup project as part of my MBA. We are developing an interactive musical box for children aged 3 to 7 years old.The core feature of the product relies on RFID detection: small figurines shaped like musical instruments are placed on a circular rotating tray (15 cm diameter). Each figurine has an RFID tag under its base. When a figurine is placed on the tray, the reader must detect it and trigger the corresponding audio track.Here are our technical constraints:- The reader will be fixed under the tray, at a very short vertical distance (1 to 2 cm at most)- The detection zone must cover the full surface of the tray, meaning a lateral radius of 7.5 cm- The tags will be in slow rotational movement- The reader must be connectable to a PC via USB for prototyping purposes, so we can retrieve detected tag UIDs in real time via a Python or JavaScript script- Budget constraint: under 100€After research, we identified the ST25R3911B-DISCO eva
Hi, I'm new to yocto project, I'm trying to bitbake core-image-minimal image in yocto in stm32mp157d-dk1(scarthgap) ,by editing the bblayers.conf and local.conf in image, its successfully build and flashed into SD card , but I'm trying to boot device then it failed. I found in bootfs sector there was no files in it. I tried to build with kirkstone branch and it worked well, and then I tried to bitbake with scarthgap again and again. I used Ubuntu 24.04 and Linux mint 22.03, but scarthgap branch had the same problems.I wanna know the reason. BIG THX.
Hi there, I have firmware that uses UART1 and UART2 of the STM32G4 series. Both are intended to run on interrupts, but as soon as any signal is received by the MCU, an error occurs, causing HAL_UART_AbortCpltCallback to be called. Therafter, the interrupt no longer works. Are there any known issues with the interrupt on these STMs? Based on previous forums, people were limited by stack size and prefetch. However, different to those cases, my code doesnt enter a hard fault, rather it just hits the function: HAL_UART_AbortCpltCallback.The error that comes up during debug starts here in the hal code:/* Enable the UART Error Interrupt: (Frame error, noise error, overrun error) */ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_EIE); /* Configure Rx interrupt processing */if ((huart->FifoMode == UART_FIFOMODE_ENABLE) && (Size >= huart->NbRxDataToProcess))Then returns a page saying <signal handler called> () at 0xfffffff9.
About EVSTSPIN32G4, I started the code generated by MotorControl Workbench 5. Y.3 normally.If you transplant the IIC configuration of the pre drive and enable PWM output, the VDS will report an error.After carefully reading the generated code, it is found that before PWM complementary output, the lower tube is opened for charging, and the output PWM pre drive or VDS protection is written. Is there a routine for STSPIN32G4 IIC to configure PWM output?
Hi,I'm using brand-new, unmodified st32mp257f-dk dev board.When using starter package (https://www.st.com/en/embedded-software/stm32mp2starter.html#get-software) flashed onto sdcard according to https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command, system boots-up fine, see 'downloaded_no_panic.log'. Version is openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11.When using image built on my own - distribution package (openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11) according to https://wiki.st.com/stm32mpu/wiki/STM32MPU_Distribution_Package, using docker, I get following:[ 8.296788] usb 1-1: new high-speed USB device number 2 using ehci-platform [ OK ] Found device /dev/hwrng. [ OK ] Found device /dev/tee0. [ 9.041963] hub 1-1:1.0: USB hub found E/TC:0 0 Panic at /usr/src/debug/optee-os-stm32mp/4.0.0-stm32mp-r2/core/drivers/clk/clk-stm32mp25.c:2000 <clk_stm32_pll_init> [ 9.142742] hub 1-1:1.0: 2 ports detected E/TC:0 0 TEE load ad
Hi STM Forum,I'm integrating a custom QSPI display controller with TouchGFX and ThreadX. I need to convert the TouchGFX framebuffer into RGB666 (6 bits per color) for a custom display interface that runs over SPI/QSPI.Here is my IOC. As you can see, I currently have only the QSPI and the clock connected. I believe the framebuffer is defined in TouchGFXGeneratedHAL.cpp as:LOCATION_PRAGMA_NOLOAD("TouchGFX_Framebuffer")uint32_t frameBuf[(320 * 240 * 2 + 3) / 4 * 2] LOCATION_ATTRIBUTE_NOLOAD("TouchGFX_Framebuffer")My target app currently runs on an STM32F7. I also have a GFX01M2 display on a Nucleo H503, but the SPI display example is of limited use because it appears to use many more GPIOs than I have available in my application (I only have QSPI).I have the following questions that will help me integrate TouchGFX into this project:How do I invoke a screen switch from code?When and in which method should I capture the framebuffer, manipulate it, convert it, and pass it to
Hello, I’m trying to use an X-NUCLEO-IHM03A1 board with a STM32F401RE Nucleo 64 board and a small NEMA 17 motor. My goal is just to learn how to drive steppers with the POWERSTEP01 for various projects and I just can’t make it work. I first tried to port the Ponoor library for arduino to STM32 by adapting and rewriting most of it but it didn’t work. I also tried to look at the ST Library from the X-CUBE-SPN3 software but it doesn’t seem to use the HAL so I haven’t been able to understand much of it. SPI is configured correctly, I’ve watched all the ST videos and read the entire datasheet but somehow I can’t make it work.I checked the entire ST Community forum, I also tried to find code on github or google but I can’t find a single usable piece of code written for STM32. Could anyone who has worked with this component post his C / C++ code. Even a valid SendParameter SPI function and getstatus function would help.Kind regards, Adeline
Hello,I have designed a custom board with stm32wb55. I used the reference schematic and checked everything but I cannot program the board from my cubeide. I have tried different configuration settings in Cube IDE but always got "No device on target" error. I connecte SWDIO, SWCLK, GND and NRST pin to my stlink. These did not work so I tried different configurations with OpenOCD too but they also failed with these symptomsSymptoms (Multiple attempts with OpenOCD at 100 kHz):SWD-DP responds reliably: chip identified as Cortex-M4 r0p1Examination usually succeeds: shows correct breakpoint and watchpoint countsHalt always fails with "Fail reading CTRL/STAT register" → "Not halted"Roughly 1 in 4 attempts fail to even initialize, but when init succeeds, halt always failsManual NRST-to-GND-then-release tried, same resultAlready reflowed the WB55 once with gel flux, no change in behaviorTried:Multiple OpenOCD reset modes including connect-under-resetSpeeds from 480 kHz down to 100 kHzForcing a
Hi: My goal is to perform full-duplex I2S using the STM32F722RET6 part. To achieve this using the pins available on the package it looks like I need to use SAI2 (sub-block B) as the master/TX and SAI1 (sub-block A) as a slave/RX synchronized to SIA2.The configuration of SIA2 in CubeMX works fine. However, when I attempt to configure the slave side (SAI1-A) the I2S option is greyed out (see below). Can anyone help me to debug this? Many thanks, Bruce.
We’re happy to announce that STM32CubeMX2 v1.0.1 has been released and is now available. This patch release includes updates and improvements aimed at enhancing the user experience and supporting your development workflow with STM32. What’s new: Supports installing multiple versions of STM32CubeMX2 side by side on the same PC. Supports a graphical uninstaller for easier removal, available on all three supported operating systems: Windows, macOS, and Linux. Prevents certain user files from being overwritten during Project Export. Improves the Pack Update feature for new packs with minor changes that previously did not work as expected. Includes several other bug fixes. Get it here: Download STM32CubeMX2 from the here. Please note: STM32CubeMX2 cannot currently be updated in place from an existing installation. To use this version, please download it and install it as a new instance. Learn more: For full details, refer to the official STM32CubeMX2 documentation. A
Section 36.6.1, Bit 18 (ITAMP3E) indicates that LSE frequency monitoring can be enabled. It appears that the hardware automatically detects when the LSE frequency goes above or below the defined thresholds and sets the ITAMP3F flag in the TAMP_SR register when an LSE failure occurs. When the LSE fails, ITAMP3 is triggered, which asserts the tamp_erase signal, and the backup registers are then automatically erased? Edit: This discussion is related to Can backup registers persist when VBAT drops enoug... - STMicroelectronics Community
Hello,I want to generate an arbitrary waveform by a timer using DMA. The waveform is using different pulse widths and also varying periods in multiples of 25µs.By reading AN4776 and HAL documentation I figured out it should be possible with HAL_TIM_DMABurst_MultiWriteStart() function. Unfortunately I don't get an output signal except after reset where a short pulse can be seen. I assume this pulse is due to port configuration during initialization. After that pulse, the signal stays high.My setup (CubeMX):Nucleo32-L432, core clock 80MHzUsed timer is Tim16Prescaler is set to 399 => 80 MHz / 400 = 5µs resolutionARR and CCR preload enabledARR and CCR set to 0 (initialized in source code)DMA enablednormal modememory to peripheralWord / Wordincrement address on memoryinterrupt enabledFor a first run I want to use fixed pulse widths and varying periods, so all my code does is the following:/* USER CODE BEGIN 2 */ htim16.Instance->ARR = 39; //40 * 5µs = 200µs period htim16.Instance
Here is the config:mcu stm32h743iit6flash 4 lines 1 bank 32mb W25Q256JVsdram 32mb W9825G6KHhere is the flow 1 read image background from qspi 2 decode image with axi sram at #define JPEG_WORKSPACE_BASE 0x24040000 // AXI SRAM (fast) #define JPEG_WORKSPACE_SIZE (256 * 1024) // 512KB (up from 256KB)3 copy buffer to external sdram4 dma2d copy and display image . scenario1 is ok LIBJPEG_DecodeToBuffer((uint32_t)IMG_NEW6, IMG_NEW6_SIZE, (uint32_t*)DECODE_BUFFER1); uint32_t decode_time = HAL_GetTick() - start; printf("✅ JPEG decode: %lu ms\n", decode_time); // Test 3: Display the image start = HAL_GetTick(); //Display_ImageAt_Fast((uint32_t*)DECODE_BUFFER1, 1024, 600, 0, 0); Display_ImageAt((uint32_t*)DECODE_BUFFER1, 1024, 600, 0, 0); HAL_Delay(4000); Clear_SDRAM(); LIBJPEG_DecodeToBuffer((uint32_t)IMG_NEW8, IMG_NEW8_SIZE, (uint32_t*)DECODE_BUFFER3); // uint32_t decode_time = HAL_GetTick() - start; printf("✅ JPEG decode: %lu ms\n", decode_tim
Hello,I am currently working on a simple USB Power Delivery test project using the STM32G071C8.The system has two USB Type-C ports.I need to detect PDO information and eMarker capabilities in order to determine the appropriate power delivery behavior. However, eMarker detection requires VDM-related functionality, and I could not find any relevant examples or documentation on the official website to continue development.The usbpd_vdm_user files generated by STM32CubeMX are essentially empty, and I could not find any useful reference information in either STM32CubeG0 v1.6.3 or X-CUBE-TCPP.Could you please provide any related example code, application notes, or documentation that demonstrates:VDM handlingDiscover Identity floweMarker cable detectionSOP'/cable communicationAny reference material would be greatly appreciated and would help me continue development.Thank you.
I tried multiple times to generate code on Arch Linux with CubeMX version 6.17.0 and Import in CubeIDE version 2.1.1. I made a video with process. And I don't know why this not working. I tried last and previos version of packages for STM32F0. And I don't know but CubeMX copied files very very slow.I choosed CubeIDE toolchain in CubeMX.
Hello. STM32H5I'm used to cache operations using memory barriers (ISB/DSB), but looking at a function like HAL_ICACHE_Invalidate() or HAL_DCACHE_Invalidate() I can't find any. Are memory barriers not needed with STM32 ICACHE/DCACHE?
I am using the STM32U575CGU3 MCU in my project, where I transmit data using two CAN frames on the bus. I have configured a CAN transmission cycle time of 250 ms in my software. However, on a few PCB assemblies, I am observing inconsistencies in the transmission cycle time. On few boards, the cycle time appears to fluctuate (e.g., around 0.5–0.6 ms deviation), while on other boards, it works well. Could you please help me understand what might be causing this variation across different PCBAs? Any guidance on potential root causes or debugging approaches would be highly appreciated.
Hello ST Community,I am currently developing a coin recognition vision model (MobileNetV4) to be deployed on the NUCLEO-N657X0-Q (STM32N657X0H3Q) board. I am trying to fully utilize the integrated NPU using STM32Cube.AI.[My Approach] To maximize feature extraction of the coin's engraved patterns, I am using a Photometric Stereo-like approach. I capture 4 grayscale images using a global shutter camera with 4 directional lights (Top, Bottom, Left, Right). My goal is to stack these 4 images into a single 4-channel tensor (H x W x 4) and feed it directly into the NPU. I have already modified the first Conv2d layer of my PyTorch model to accept in_chans=4 and trained it successfully.[The Issue] When trying to validate and deploy this model, I encountered the following constraints regarding the Neural Network Input:"Only RGB888 format is tested for Neural Network Input.""Only UINT8 format is supported."The UINT8 constraint is perfectly fine for our quantization pipeline. However, the RGB888
Hello ST Community, I am working with an STM32U585 custom board and I would like to clarify the supported and recommended workflow for flashing TrustZone‑enabled firmware with SBSFU using USB DFU via STM32CubeProgrammer. Hardware / Software Setup MCU: STM32U585 Custom hardware board Tool: STM32CubeProgrammer v2.19.0 Interface tested: ST‑LINK (SWD) USB DFU Security configuration: TrustZone enabled (TZEN = 1) SBSFU (Secure Boot & Secure Firmware Update) used What works (via ST‑LINK / SWD) Using STM32CubeProgrammer CLI with ST‑LINK, I am able to successfully flash all components: SBSFU bootloader File: SBSFU.bin Address: 0x0C004000 Initial SBSFU application image File: sbsfu_app_init.bin Size: ~1.80 MB (0x1c000) Address: 0x0C030000 The script erases the correct flash sectors, programs the binaries, verifies them successfully, and the board boots correctly. So SWD flashing works as expected for: TrustZone‑enabled device SBSFU bootloader SBSFU appli
Dear ST team,In the ST87MXX AT Command User Manual, I can find that I can retrieve the data received on a socket withAT#IPREAD:AT#IPREAD=<context_id>,<socket_id>#IPREAD: <context_id>,<socket_id>,<data_length><data>OKBut I cannot find the max length of the <data> field that can be returned by the modem. Where could I find this information ?Best RegardsThierry
I am having an issue while trying to setup an I2C driver on my STM32F767ZI Nucleo board interfacing with an SHT31 and SGP40 I2C sensors. The code I am running first initializes the SHT31 with a write and read and then initializes the SGP40 with a write and read. The issue I am running into is whenever I send the next message (read on whichever sensor I decide to try to configure first), the I2C peripheral sends a start bit and address as expected but adds a null byte immediately after the address. See attached example where I would expect the address of 0xB2, and the two byte message of 0x36 and 0x82 to be sent instead I see the address of 0xB2, then data of 0x00 and 0x36. It runs through the first write cycle without an issue. Edited to elaborate on the logic analyzer captures. I2C_LA._Expected captures the moment after stepping through setting the start bit in the CR2 register. It shows the address being transmitted and then SDA returns high and SCL is set low w
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.