Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
We are trying to do a firmware upgrade via UART to the N6 from another MCU, and having trouble getting it working. We do not have a USB host stack on that MCU so we're unable to use USB DFU.I've successfully been able to transfer and start the FSBL to the N6, but am unable to transfer the app image. Another detail is that our app image is ~540KB, so a bit too big to fit in the RAM buffer. Even a smaller sample image isn't able to work.Before I try a different bootloader or custom option, I just wanted to see if anyone else has had success doing this or if there is something I'm missing. Thanks.
I'm currently developing an external loader on STM32H563ZIT6 development board.I'm facing an issue on programming with cube programmer in the image belowThe problem I think might be linked to interrupt handler of systick. I've attached the Loader_src.c file where I had developed the functions used by Cube Programmer; also attached the linker used. The low level functions linked to XSPI communication are properly working, because I had tested in debug erasing and writing sectors. I need help to figure out the problem.
hello,I encountered a problem while developing for stm32u585. When the stm32 wakes up from standby mode, the HAL_RCC_OscConfig() function occasionally fails, "Wait till LSI is disabled" timeout in HAL_RCC_OscConfig() (this project uses IWDG)The specific process is as follows:1. start boot HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_ICACHE_Init(); MX_UART4_Init(); boot to other address(app) 2. app init HAL_Init(); SystemClock_Config(); RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_LSI |RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.LSEState = RCC_LSE_ON_RTC_ONLY; RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; RCC_OscInitStruct.LSIState = RCC_LSI_ON; RCC_OscInitStruct.LSIDiv = RCC_LSI_DIV128; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLMBOOST = RCC_PLLMBOOST_DIV1; RCC_OscInitStruct.PLL.PLLM = 1
Hi I am trying to gain knowledge on TouchGFX and GUI, with STM32 controller. can you provide me with the document or example from where i can start my learning to use TOUCHGFX and use multiple screen.
If the user uses "-Wundef" the header "stm32u3xx_hal_def.h" creates a lot of warnings due to a missing check if a preprocessor macro is defined before evaluating it.The warning gets emmited by the following #ifs used in STM32Cube FW_U3 V1.3.0 inside "stm32u3xx_hal_def.h":#if defined ( __CC_ARM ) || ((__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )e.g. in line 142This is how it was correctly checked in e.g. the STM32Cube FW_G0 V1.6.3 in the hal def header for the stm32g0 hal:#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) Best Regards
Environment:Board: STM32H7S78-DKMCU: STM32H7S7L8H6Stack: AzureRTOS USBX (PIMA MTP + CDC ACM) + FileX.Storage: microSD Card.Host OS: Windows 11 Preliminary Note:A significant portion of this code is adapted from the official ST example:stm32-usbx-examples/Projects/STM32H735G-DK/Applications/USBX/Ux_Device_PIMA_MTP at main · STMicroelectronics/stm32-usbx-examples Current Status:I have successfully implemented the MTP class. The device is correctly recognized by Windows, the storage is mounted, and I can view and modify files located in the root directory.To manage MTP objects, I use a custom function SD_Scan, which traverses the FileX filesystem and builds a local object handle table (ObjectHandleTypeDef).VOID SD_Scan(VOID) { /* Estructura estática para no usar el STACK */ static FolderList_t folder_list[SD_MAX_HANDLES]; /* Variables de control de la cola con nombres claros */ UINT NextFolderToScan = 0; UINT TotalFoldersInList = 0; /* Variables de es
Hello everyone,I am working on a custom bootloader for an STM32H743-based TouchGFX project and facing a very strange issue specifically with the TouchGFX application after jumping from bootloader.STM32H743 Bootloader Successfully Jumps to Simple App but TouchGFX Application Shows Black Screen After Bootloader Jump.I would appreciate any guidance from people who have experience with STM32H7 + TouchGFX + bootloader integration.Hardware / Project DetailsMCU:STM32H743IIT6Frameworks:STM32CubeIDETouchGFXFreeRTOSPeripherals Used in TouchGFX App:FMC SDRAMLTDCDMA2DQSPII2CTIM2External Memories:SDRAM framebuffer at 0xD0000000QSPI assets at 0x90000000Bootloader FunctionalityThe bootloader:Initializes USB Host + FATFSDetects pendriveReads image.bin and extflash.binPrograms internal flash and external QSPI successfullyUses APPLICATION_ADDRESS = 0x08040000After flashing, bootloader jumps to applicationImportant:Simple LED blinking application works correctly through the same jump functionOnly TouchGF
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
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....
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 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
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.
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 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
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
I am a beginner in electronics. I recently designed a board using the STM32F407VGT6 and DP83848, but after assembly and testing, I encountered a problem. The board can be programmed and it runs, but the Ethernet section does not work properly. It does not obtain an IP address. When I ping any IP address in network range, the Ethernet LED(pin 26) turns on and off, but the Ethernet connection is not actually established. I would appreciate it if you could guide me regarding the schematic and circuit so I can solve this issue.I attach my pcb schematic and board
I am working with the STM32H723ZG and trying to implement Ethernet communication without using an RTOS using LWIP(TCP/IP) Setup Details: Board: NUCLEO-H723ZG IDE: STM32CubeIDE v1.19.0 Ethernet stack: LwIP PHY interface: RMII Flashing tool: ST-LINK (onboard) Test performed: Ping test from PC Observed behavior: The Ethernet port LEDs (orange and green) remain solid ON after connecting the Ethernet cable. Ping is failing continuously, I got (Destination host unreachable) error. Troubleshoot taken: Checked with multiple Ethernet cables to ensure cable isn't a problem. I'm using static Ip and checked the Ip is correct in lwip.c while flashing the board. Rebuilt and reflashed the project multiple times. After all this still I can't ping the board. Assistance required : is there is any problem in cache coherency in the code? Kindly check with the MPU unit configuration and let me know is there is any issue? I'm
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.