Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello, I connected an ILI9488 480x320 display on a STM32U5 using FMC in 16-bit mode.I transfer the framebuffer to the display using GPDMA in 2D mode, and all works fine.But only as long as I transfer the entire framebuffer or a rectangular region that takes the full width of the screent, where rect_y >= 0 and rect_height < =DISPLAY_SIZE_Y and rect_x = 0 and rect_width = DISPLAY_SIZE_X. This way one line in the frambuffer follows the next line, an easy task for the GPDMA, where 2D mode is inrelevant.Things don’t work out well when I want rect_x > 0 and rect_width < DISPLAY_SIZE_X, so a random rectangle somewhere from the framebuffer. This way for each new line the GPDMA needs to skip (DISPLAY_SIZE_X - rect_width) pixels to arrive at the next data in the framebuffer. I haven’t been able to configure that. The output image gets extremely slanted and extremely resduced in vertical size if if I make the rectangle 4 pixels more narrow than the display horizontal resolution.I hope
Using the latest CubeMXIDE, CubeIDE, and drivers.Custom hardware driving an ILI9341 through SPI1 Driver (attached) writes column and page registers, writes RAMWRITE command, and then transfers in one of three methods: blocking, IRQ, and DMA.blocking works fine, so the hardware and commands are proper.IRQ and DMA do not work. Working specifically on DMA at the moment.Software for the driver next: case ROTATE_180:{// checked valid// new design driver, landscape mode, draws left to right// note: DISPLAY IS IN native landscape MODE// range is 0-319 and 0-239// reverse X if not commented out// data.x0 = 319-data.x0;// data.x1 = 319-data.x1;// reverse Y if not commented out// data.y0 = 239-data.y0;// data.y1 = 239-data.y1;minmax (data.x0, 0, 319);minmax (data.x1, 0, 319);minmax (data.y0, 0, 239);minmax (data.y1, 0, 239);if (data.x1 < data.x0) swap(data.x0,data.x1);if (data.y1 < data.y0) swap(data.y0,data.y1);#ifdef _LVGL// com_addr[0] = ILI9341_PASET;// com_data[0] = (319-data.x1) &
I’m starting to work with the STM32F411E‑Discovery board and I’d like to use it for real‑time audio filtering. I’m using the onboard MEMS microphone together with the mini‑jack audio output.I’m currently struggling with configuring the clock settings correctly — I’m observing a variable timing drift between the microphone input and the audio output.Could you advise on the proper clock configuration for this setup, or point me to an existing project or example that demonstrates real‑time audio processing on the STM32F411E‑Discovery?
MCU: STM32H753IITxPeripherals: FDCAN1 and FDCAN2Baud: Nominal 1 Mbps, Data 2 Mbps (FDCAN_FRAME_FD_BRS) Question:Can FDCAN RX/TX use DMA on STM32H7 (like UART/SPI), or is Message RAM + interrupt/polling the only supported path?What I understand so far:- FDCAN stores frames in shared Message RAM (RX FIFO0/FIFO1 / TX FIFO)- CPU reads with HAL_FDCAN_GetRxMessage() after interrupt or by polling- I do not see HAL_FDCAN_Receive_DMA() / Transmit_DMA() in the H7 HAL What I need:1) Official confirmation: DMA for FDCAN frame RX/TX on H753 — supported or not?2) If not supported, recommended approach for higher load (40 slaves, periodic SCAN):- interrupt + FreeRTOS queue, or- polling in a task, or- something else?3) If any DMA/MDMA trick is possible for Message RAM copy, is it recommended by ST? Thank you.
Dear ST Support Team,I am developing a custom bootloader for the STM32L071CBY6TR (128 Kbyte, dual-bank Flash) and I have a question regarding the exact behavior of the Flash controller that I could not fully clarify from RM0367.Context:- My bootloader occupies the first 32 Kbytes (0x08000000 - 0x08007FFF), entirely within Bank 1.- My application occupies 96 Kbytes starting at 0x08008000, which means it spans across the Bank1/Bank2 boundary at 0x08010000: the last 32 Kbytes of Bank 1, and roughly 64 Kbytes of Bank 2.RM0367 states that read operations from one bank can be performed while write or erase operations are performed on the other bank (cross-bank read-while-write). However, I could not find documentation describing the behavior when a write/erase operation is performed on one bank while code execution (instruction fetch) continues from a *different page within the same bank* — which is exactly my bootloader's situation when it needs to erase/program the tail portion of Bank 1 t
I need to transfer files from my hardware (STM32H723 based) and a PC, using an USB port, just like an USB disk; my hardware uses a FT234XD USB interface chip (UART connection) and an EEPROM where I save the data.Anyone may help me to understand how to do it ? Thank you
In STM32H7 MCU FW, i am implementing the GPDMA transfer to XSPI in indirect mode, updating DR Register from FW with DMA. I have a custom x8 SPI DDR Slave as target. The issue is i am getting Data transfer error during the HAL_DMA_Transmit_IT function. I have refered the app note for GPDMA - AN5593 where it is mentioned as - on page 38. I am using SW based trigger to dma since there is no GPDMA req signal for xspi for STM32H7. I want to knowhow to implement software-based trigger if gpdma req signal is not present. I have mentioned the code below. IF there is any workaround to fix the HW DMA req signal issue from xspi? If not then on what other STM device having min of 2 - x8 spi support proper GPDMA transfer with HW DMA req implementation. Code used in my application is mentioned below - static void MX_GPDMA1_XSPI2_TX_Init(void){ __HAL_RCC_GPDMA1_CLK_ENABLE(); hdma_xspi2_tx.Instance = GPDMA1_Channel0; // use typed instance macro hdma_xspi2_tx.Init.Request =
Setup:I have a CubeMX/CubeIDE-generated STM32G474RET6 project (ThreadX) that I build as a static archive rather than a flashable executable, meant to be linked into a separate top-level consumer application. The consumer supplies main(), calls into this library's init function, and never defines its own vector table, interrupt handlers, or MSP callbacks — this library owns all of that. Problem:A static archive only pulls in the .o members something already-linked actually references (need-driven extraction). That interacts badly with two CubeMX-generated weak-symbol patterns: Vector table vs. stm32g4xx_it.c: startup_stm32g474retx.s gives every handler a .weak/.thumb_set XXX,Default_Handler fallback, satisfied locally from the always-linked startup object. Since nothing else references handlers like NMI_Handler or a peripheral's IRQHandler, the linker never has a reason to pull stm32g4xx_it.c.o out of the archive — the real handlers in it are silently dropped in favor of Default_Handler
I am using the STM32F051C8T6 MCU for TIG welding project, but PWM is not being generated on my custom TIG control board. Can anyone help me so
Connected an USB microphone to an H743 as host and it streams mic audio perfectly at 48 KHz for around 5 seconds then the data freezes.SOF is still being called as is AudioHost_IsoDataReadyISR() from the STM IRQ driver, DMA is running (its set to use DMA, I tried without but same behaviour), but the same 96 bytes are transfered every uS: I can clear the receive buffer but it gets refilled with the same data. Attempts to re-init the pipes etc etc fail to restore streaming.Also, any pause in the servicing of the call to AudioHost_IsoDataReadyISR() results in exactly the same repeat data arriving.This is my own code based on STM’s examples, as I said it runs perfectly for many seconds, if I unplug the microphone it runs again when plugged back in for the same good few seconds.Is there an approved way to restore audio streaming without a full reset when there is an occasional timing glitch in servicing the AudioHost_IsoDataReadyISR() call?
Hello,I’m using the ADC with DMA for my application where I read the values from a Pot. The DMA is configured to generate interrupts when the DMA buffer is half full and completely full. The readings obtained seem to be correct apart from the fact that there seems to be random 0’s in the buffer. I’m not sure why this happens. Below are the relevant portions of my code: vInit() { /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ LL_ADC_InitTypeDef ADC_InitStruct = {0}; LL_ADC_REG_InitTypeDef ADC_REG_InitStruct = {0}; LL_ADC_CommonInitTypeDef ADC_CommonInitStruct = {0}; LL_GPIO_InitTypeDef GPIO_InitStruct = {0}; LL_RCC_SetADCClockSource(SPEED_CONTROL_POT_ADC_CLOCK_SOURCE); /* Peripheral clock enable */ LL_AHB2_GRP1_EnableClock(SPEED_CONTROL_POT_ADC_PERIPH_CLOCK); LL_AHB2_GRP1_EnableClock(SPEED_CONTROL_POT_GPIO_PERIPH_CLOCK); /**ADC1 GPIO Configuration PA0 ------> ADC1_IN1 */ GPIO_InitStruct.
Hello ST Team, I developed a custom USB DFU HOST class on an STM32F446ZE. I soldered a USB-C cable directly to the D+/D-, 5V and GND pins. The Problem: The stack works correctly for transfers up to 128 bytes. However, when I set phost->Control.setup.b.wLength.w > 128 (e.g., 192 bytes) and call USBH_CtlReq, the code enters an infinite loop inside USB_WritePacket. I have traced the execution line-by-line, monitoring the HCTSIZ register values: size (Transfer Size) and cnt (Packet Count). Below is the detailed trace comparing a working 128-byte transfer vs. a failing 192-byte transfer. 1. Successful Scenario: Transferring 128 Bytes Initial State: size = 128, cnt = 2. Loop Iteration 1: i=15: USBx_DFIFO written. Register updates: size = 64, cnt = 2. i=31: USBx_DFIFO written. Register updates: size = 64, cnt = 1. Loop Iteration 2: Initial State: size = 128, cnt = 2. i=15: USBx_DFIFO written. Register updates: size = 64, cnt = 1. i=31: USBx_DFIFO written. Re
Hi Team,We are developing a custom board based on STM32N657X0H3Q and would like to interface a 2-lane MIPI CSI-2 camera.We have seen the examples provided with the STM32N6, but they are limited to a few camera sensors. We would like to integrate other MIPI cameras such as GC2083, OV2312, IMX290 etcCould you please clarify:Does STM32N657 support any standard 2-lane MIPI CSI-2 camera, or only the sensors provided in the BSP? Please share the supported camera sensor details. Is there any application note or guide for bringing up a new MIPI camera driver? Which parts of the existing camera driver (e.g., IMX335) can be reused for integrating a different sensor? Has ST validated any other MIPI CSI-2 camera sensors with STM32N657?Any guidance or reference examples would be greatly appreciated. Regards,Ajnas C
Hello! Recently I discovered that my program (STM32 TCP client) gets stuck in netconn_connect() function for about 5 minutes if server to which I want to connect to is not available when this function is called. Only after that time program would go intoif ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) {statement (which is present in tcp_slowtmr() function). Once it happens, the debugger shows that:TCP PCB shown in debuggerIt's the tcp_rexmit_rto_prepare(pcb) condition that allows program to go into the if statement. Also, as debugger shows, nrtx is equal to 0, which means there were no retransmissions in the last 5 minutes (rtime=575, which is 287 seconds).Interesting thing is it's possible to "unfreeze" the program way sooner by pinging the client device or by replugging Ethernet cable. netconn_connect() would finally finish and device could try to connect to server once again. By the way, the netconn I used was
/* USER CODE BEGIN Header *//** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * <h2><center>© Copyright (c) 2022 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under BSD 3-Clause license, * the "License"; You may not use this file except in compliance with the * License. You may obtain a copy of the License at: * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** *//* USER CODE END Header *//* Includes ------------------------------------------------------------------*/#include "main.h"#include "seven_seg.h"#include "timer.h"#include "74HC595.h"#include "led.h"#include "welding_mode.h"#include "adc.h"#include "led_
Hi,I am trying to perform injected conversion of two channels in ADC1 (STM32G431x), and I wish to trigger them in discontinuous mode. The ScanConvMode is enabled and the discontinuous mode for injected measurement is also set (injectedDiscontinuousConvMode = ENABLE). However, the conversion still happens continuously. I had to hard set the bit (SET_BIT(ADC1->CFGR, ADC_CFGR_JDISCEN)) to make it work in discontinuous mode.Any help here will be appreciated! Thanks.
Hello ST Community,I am considering using the High-Resolution Timer (HRTIM) on the STM32G4 series (specifically STM32G4x4 / G474) and would like to ask a few technical questions regarding its Input Capture functionality:1. Is my understanding correct that the 184 ps high-resolution feature applies mainly to PWM generation (using DLL), while the Input Capture function operates at the base HRTIM clock frequency (up to 170 MHz, giving ~5.88 ns resolution)?2. Is it possible to capture the timer counter values using the HRTIM capture units (CPT1 / CPT2) triggered by External Events (EEV) or internal signals (such as comparator outputs)?3. If Q2 is yes, does capturing via internal signals (e.g., comparator) yield the same measurement resolution (~5.88 ns based on 170 MHz) as capturing via external pins?Any clarification would be greatly appreciated. Thank you in advance!
STM32CubeIDEI have Project Directory (Fully populated from an earlier version of the IDE on a different machine)that I bundled up and then unwrapped on my new build machine.However, when I point my newly installed (up to date) IDE to my unwrapped Project directory,it “sees” the Project is there...but when I click “Finish” to bring it into my IDE, the IDE showsthe project (with the correct name) but devoid of any project properties...and no Source Code Tree(where I normally--and previously--could navigate all the source files). I can see all the expected source code files in my Project DirectoryWhat is the disconnect?Do I need to manually edit the PROJECT.ioc or .project file (or .cproject or .settings or *something*) ?Is there a known issue with transferring a Project from an earlier version of the IDE?Guidance Appreciated!Paul++
Hello,I am trying to create an FSBL XIP project for the NUCLEO-N657X0-Q with the following structure: FSBL running from internal SRAM Application executing in place from the external XSPI flash ThreadX and NetX Duo running in the Application context Ethernet using the onboard LAN8742 PHY External Memory Loader project The STM32CubeN6 firmware package contains two relevant examples: Projects/NUCLEO-N657X0-Q/Templates/Template_FSBL_XIP Projects/NUCLEO-N657X0-Q/Applications/NetXDuo/Nx_UDP_Echo_Client However, the two examples use different project structures.Template_FSBL_XIP provides the required FSBL, XIP Application, and External Memory Loader structure, but it does not contain the ThreadX, NetX Duo, and Ethernet application configuration.Nx_UDP_Echo_Client, on the other hand, contains the required ThreadX, NetX Duo, Ethernet, LAN8742, and UDP configuration, but the complete application is assigned to the FSBL context instead of being built as a separate XIP Application.Copyi
Hi everybody,I’m struggling with the lwip stack in order to get it working with freertos.I had succesfully achieved to bring up the connection and optain an ip in dhcp mode and ping the board in bare metal mode, now I switched to freertos and I’m no longer able to send discovery packets on the network.I followed the instructions stated here stm32-hotspot/STM32H7-LwIP-Examples: Ethernet examples using LwIP + FreeRTOS for STM32H7 Discovery and Nucleo boards and tried to copy .ioc configuration from H745 example but I still have the same problem, the phy connection goes up but I cannot obtain the IP address from dhcp server. I’m monitoring the network activity with wireshark but there is nothing coming from the board mac address (in bare metal mode I was able to see dhcp negotiations).Please find the attached files in order to check what happens and addres the possible issue.My configuration: STM32CubeIDE Version: 2.2.0STM32CubeMX Version: 6.17.0STM32Cube FW_H7 V1.13.0PS: please note that
What is the correct way to implement multiple ADC channels? I have tried various tutorials on YouTube, but none of them work correctly. I am using two potentiometers. The ADC readings are random and cannot be controlled by the potentiometers. At one point, I managed to get it working, but only one potentiometer responded. The second potentiometer did not work, and the value of Channel 2 followed the value of Channel 1, even though Channel 2 should be controlled independently by the second potentiometer.
Hi ST community I'm working on a simple application to get USB Device CDC ACM up and running. My goal is to make my STM32N6 Nucleo board detectable by my laptop so that it appears as a Virtual COM Port under Windows Device Manager.Here are my STM32CubeIDE settings:Step#1: Clock Configuration. Step#2: Set SYS clock : HSE -? DIGBYPASS Clock Source Step#3: Select TIM6, check off : Application Step#4: Select TIM6 as Timebase Source, check off : Application Step#5: Select USB1_OTG_HS, and select Internal HS Phy: Device, check off : Application Step#6: Select Threadx and check off Core and Mode: Application Step#7: Select USBx with the following setting :1. Mode: Application mode 2. Check off Core system3. UX Device: Device CoreStack HS and Controllers HS4. Device Class HS: CDC_ACM And here is my main.c file : Here is my project folder structure.To program the board, I've set the boot switches to DEV mode and compiled only the application code. I don't build or progr
Embedded veteran here, been involved in all manner of MCUs and MPUs professionally (especially safety-critical) but for personal use most of my prior experience has been with PIC16F and 18F (to save money obviously), of course those are only 8-bitters. I’m very interested in learning STM32 MCUs (gee they look ALMOST like DSPs except it’s single-cycle multiply not MAC and no simultaneous pointer adjustments etc.). Thing is my PIC experience has given me a pretty decent collection of chip initialization routines that I can adapt as necessary for small differences with peripheral features and such. My “inherent bias” is bare metal, no FreeRTOS, I understand I may be “going against the grain” a little but I want to get my hands on every nanosecond I may have coming. I don’t necessarily need this in C language, but I would like to get my hands on at least a very detailed list of all the HW registers that COULD need to be set, and the EXACT order in which this is “most safely accomplished”.
Hello, I'm working on a project using the STM32F401RE board to perform real-time fault diagnosis on machinery.The board receives vibration data in real-time via a USB-type accelerometer (Digiducer 333D01), and a lightweight deep learning model running on the MCU determines whether the signal indicates a normal or faulty condition.All of this is running under FreeRTOS and must meet real-time constraints. The accelerometer is connected through a USB breakout board (YwRobot ELB050209), and the STM32 board is configured to operate as a USB Host with Audio Class support.The USB connection and device enumeration process (including descriptor parsing) have been completed successfully. Interestingly, the Digidecer 333D01 is recognized as a USB Audio Class device, specifically as a microphone-type interface.The device presents itself with an Audio Control interface and an Audio Streaming interface (Isochronous IN), similar to a standard USB microphone.Although the data represents vibration (acc
Hello everyone,I am experiencing a strange issue with the Ethernet interface on my STM32F207VC.Problem DescriptionAfter programming the firmware using STM32CubeProgrammer v2.12.0 with an ST-LINK debugger, the application works perfectly:- The board responds to ping.- My PC client communicates successfully with the TCP server running on the STM32.- Ethernet communication is fully functional.However, after performing a power cycle, the Ethernet stops working:- The board no longer responds to ping.- TCP communication fails.- The application itself appears to be running, but the Ethernet interface is non-functional.Hardware Details- MCU: STM32F207VC- Ethernet interface: RMII- Default STM32 RMII pins are used.- Programming/Debugging: SWD (ST-LINK)- The board has an external 8 MHz crystal, but in STM32CubeMX the MCU is configured to use the internal HSI clock (HSE is not enabled).- The Ethernet PHY has its own 25 MHz crystal and provides the required 50 MHz RMII REF_CLK to the STM32.The exac
ST Community highlights – April to June 2026
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.