Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
I am using STM32CubeIde, No RTOS, USART1, RX DMA (Circular), TX DMA in normal mode with DMA_IT_HT disabled.I’ve got main loop periodically outputting a simple message on the USART. System appears to hang when commanded to change baud. I’ve tried perhaps dozens of variations that have been recommended by “STM32 Sidekick” and Google AI. Most work with the debugger connected. None work without the debugger which is making this difficult to troubleshoot. Sidekick example shown below. // 1. Wait for any ongoing transmissions to finish safely // This prevents splitting a character mid-air. while (__HAL_UART_GET_FLAG(huart, UART_FLAG_TC) == RESET) { // Optional: Implement a timeout mechanism here } // 2. Temporarily de-initialize the UART peripheral // This turns off the UART but keeps your GPIO and DMA settings intact. if (HAL_UART_DeInit(huart) != HAL_OK) { return; //H
How can stm32f407 reset and run in vscodeide ?
Hello Team,I am working with an STM32C552RET6 and an NVIDIA Jetson Orin Nano EVK. I would like to flash the STM32C552RET6 firmware over the UART interface directly from the Jetson using a Linux utility.I have the following questions: 1. UART flashing from Jetson Linux:What is the recommended method/utility to flash an STM32C552RET6 over UART from a Linux-based system such as the NVIDIA Jetson Orin Nano? Is STM32CubeProgrammer CLI supported for this use case, or is there another recommended Linux utility for the STM32C5 UART bootloader? 2. STM32C552RET6 bootloader connections:What physical connections/signals are required between the Jetson and STM32C552RET6 to enter the system bootloader and perform firmware flashing over UART?3. BOOT configuration:Which STM32C552RET6 boot-related pin(s) need to be controlled to select the system-memory bootloader? Can these be controlled directly from the Jetson GPIOs? 4. NRST control:Is it necessary to control the NRST pin from the Jetson to reliably
Hi ST Community team,Our STM32F103‑based project uses FreeRTOS integrated by STM32CubeMX, currently kernel version is V10.3.1.Questions:1. Does ST have any official roadmap / plan to update the bundled FreeRTOS kernel inside CubeMX STM32F1 software pack to a newer FreeRTOS kernel release (e.g. V10.6.x)?2. What is ST’s official recommended solution for users who want a newer FreeRTOS kernel, given CubeMX will overwrite custom‑replaced kernel sources on code regeneration?3. Are there any known compatibility constraints when manually replacing underlying FreeRTOS kernel while keeping ST’s CMSIS‑RTOS v1 wrapper unchanged?Our context:‑ Application uses almost exclusively CMSIS‑RTOS v2 APIs, very few direct native FreeRTOS calls.‑ No FreeRTOS+TCP network stack, no network‑facing interfaces.‑ Concern comes from CRA / component long‑term maintainability requirement.Thanks & best regardsAllen
Hi,The project was created in stm32mx from the example project cortexm_sysk.It was generated as a CMake project and developed using VS Code.The "USB Device Middleware Library MCU Software Component" library, version "V2.11.4 / 11-April-2025", was manually added.CDC alone OKUVC alone OKCDC/HID OKCDC/UVC NOT OKSee file in attachment.I noticed the file descriptor is large (239 bytes). Is that a problem?Is there another setting I need to change?Regards,Sébastien
Hi,I am using the STM32H563ZI with the MB1404C board and running the “I3C_Controller_HotJoin_IT” example from the following repository: https://github.com/STMicroelectronics/STM32CubeH5/tree/main/Projects/NUCLEO-H563ZI/Examples/I3C/I3C_Controller_HotJoin_IT.The target device is a different board, not another STM32H563ZI - for example, the “I3C Protocol Analyzer and Exerciser” from Prodigy Technovations.After initializing the I3C controller and connecting the I3C target device to the bus, the SCL line of the I3C controller continuously toggles.Using STM32 Sidekick, I identified the following errata:Errata: Constant SCL Ticking with I3C Controller on STM32H563ZI1. Known Issue DescriptionWhen using the STM32H563ZI in I3C controller mode (such as with the I3C_Controller_HotJoin_IT example), there is a documented errata where, after initialization, the controller may incorrectly detect the SDA line as low, interpret it as a start request, and activate the SCL clock. This results in the cont
Hi everyone,I'm currently working on a project using an STM32H533RET6, and I am running a bit short on available pins. I am considering reconfiguring PA13 (SWDIO) and PA14 (SWCLK) to use them as standard general-purpose I/Os for my application.My main concern is about the flashing process. If I reconfigure these pins as regular GPIOs in my firmware, the SWD interface will be disabled as soon as the code starts executing.My questions are: Is it generally possible to use PA13 and PA14 as regular GPIOs and still be able to flash new firmware onto the MCU? If yes, what is the best practice to avoid permanently locking myself out? Do I strictly need to connect the hardware NRST pin to my programmer (ST-LINK) and use "Connect under reset"? Are there any software tricks (like adding a delay before GPIO initialization) that you would recommend? Obviously, I know that live debugging won't be possible once the pins are remapped, but I just need to make sure I can still update the flash relia
Hello,I followed your reference and completed all the steps you mentioned before the screenshots. How to display an image stored in external flash on the STM32H7S78-DK using the LTDC controller However, I have two issues:Could you please provide a clear, high-resolution screenshot of Tools → Memory Management? The previous screenshot was not clear enough for me to read the settings. I am unable to flash the Appli project onto my STM32H7S78-DK. This is what I did:Initially, I cleaned both the Boot and Appli projects. I built only the Boot project and flashed it onto the STM32H7S78-DK successfully. Then, I built the Appli project. When I try to flash the Appli project, I am unable to flash it onto the board. Could you please explain step by step how I should flash both the Boot and Appli projects on the STM32H7S78-DK?Could you please provide a clear, high-resolution screenshot of Tools → Memory Management?
I am attempting to use the Nucleo-H723ZG with Ethernet and LWIP but without FreeRTOS.I am currently using STM32CubeMX 6.18.0 and STM32CubeIDE 2.2.0.I have spent weeks attempting to get this working following the various youtube videos and topics on here.I am currently attempting a simple UDP message that can be viewed on wireshark along the lines o “H723ZG with an incrementing counter”. I am unable to get any ARP or UDP currently.Any help is greatly appreciated - thanks.
Hello ST Community,We are optimizing background listener stability and remote webhook payload handling when integrating embedded telemetry data into enterprise management pipelines.Technical Setup: Our integration architecture at Frontline Sales Consultancy (flsc.co.uk) triggers automated B2B notifications and REST API syncs over HTTPS (TLS 1.3). The Issue We're Facing: Under heavy concurrent load spikes, background POST webhook listener sockets occasionally report HTTP 504 gateway timeout responses before acknowledging payload completion. Direct REST API requests to the same remote host resolve normally under 150ms thresholds. Are there recommended TCP keep-alive settings or queue worker retries to prevent connection drops during high-volume sensor/telemetry data syncs? Any advice on managing asynchronous background worker threads would be appreciated!Thanks!
Hi there, I am trying to to set up IEEE 1588 PTP time synchronisation with the Netx Duo IP-Stack. I want to port the STM32N6 example (https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/NUCLEO-N657X0-Q/Applications/NetXDuo/Nx_PTP_Client) to my STM32H563 / Nucleo-H563ZI.To my understanding, the H5 Series support PTP and should be able to run the example. The programm runs and prints out the MAC-clock, but the time does not increment and stays always on the same value of 0 seconds and 0 nanoseconds.I also tried to examine the PPS Signal on PG8 with an oscilloscope but as there is no running MAC clock, I get no PPS Signal.To fix this issue I tried different clock increments, thread-priorities. My guess is that the PTP clock in the MAC and the PPS output have to be activated seperately, but I wonder how? Thanks
Hello everyone,I am currently evaluating the STM32H563 (using the NUCLEO-H563ZI board) with an application that sends a continuous UDP packet stream via 100 Mbps Ethernet.I've noticed that right after startup (or after flashing the board), the MAC drops a number of packets. Upon closer analysis, the MAC's TX buffer fills up completely, causing all subsequent packets to be dropped. After about 1 second, the MAC seems to stabilize, adjusts to the continuous packet flow, and begins sending all packets without loss.My questions: Why does this behavior occur? My suspicion is that the MAC might be operating in a low-power or standby mode initially, and takes a moment to ramp up to a continuous flow. Is this assumption correct? Is there a way to configure the MAC so that it operates at full speed right from initialization? Thank you for your insights!Best regards,Engineer 0815
Hi,I am using an STM32G474 DAC with DMA and TIM6 trigger.My sine table is:uint16_t sine_table[SINE_SAMPLES] ={ 2047, 2248, 2446, 2641, 2831, 3012, 3185, 3346, 3495, 3630, 3749, 3853, 3939, 4006, 4055, 4085, 4095, 4085, 4055, 4006, 3939, 3853, 3749, 3630, 3495, 3346, 3185, 3012, 2831, 2641, 2446, 2248, 2047, 1846, 1648, 1453, 1263, 1082, 909, 748, 599, 464, 345, 241, 155, 88, 39, 9, 0, 9, 39, 88, 155, 241, 345, 464, 599, 748, 909, 1082, 1263, 1453, 1648, 1846};I found that this configuration works:Memory data alignment: Half WordPeripheral data alignment: WordBut this does not work:Memory data alignment: Half WordPeripheral data alignment: Half WordWhy does the DAC require Word (32-bit) peripheral alignment even though the DAC data is only 12 bits?Also, how do I know which peripheral requires Byte, Half Word, or Word DMA data alignment?Is there a general rule or a specific register description I should look for in the reference manual?
Hi,I am working on a custom board using STM32H745XI MCU.I am facing an issue on one particular board.The same source code works correctly on our other boards with the same MCU and hardware. On the problematic board: The firmware can be programmed successfully using STM32CubeProgrammer. After programming, the firmware runs normally. But when I debug the same firmware from STM32CubeIDE using ST-LINK, execution reaches Reset_Handler and then main(). HAL_Init() is entered, but it does not return. After debugging HAL_Init(), I found that execution is actually hanging at: HAL_Delay(1000);inside HAL_Init().The relevant flow is:Reset_Handler ↓ main() ↓ HAL_Init() ↓ HAL_InitTick() ↓ HAL_MspInit() ↓ HAL_Delay(1000) ↓ HANG ↓SystemClock_Config() ← never reachedMy understanding of the problemHAL_Delay() depends on the HAL tick counter (uwTick) being incremented periodically by the SysTick interrupt.Normally the flow should be:SysTick interrupt
I’m running into a ‘Heisenbug’ crash (just adding or moving a bit of general code between builds makes it either crash or work), and when it crashes, the STLINK-V3MINI can’t attach, or if already attached, it fails to halt the processor.Any tips or advice about catching it in the act or theories as to the cause?
Greetings,We have a new HW design based on the STM32H573ZI. We are using the USB port and have itgoing to a 4-pin micro-USB connector with VBUS, D-, D+, and GND. I would like to run an H5 Example application to verify that the HW is functional, something like the Ux_Device_HID example.However the Ux_Device_HID examples I see seem to only support USB-C with USBPD (Power Delivery). Are there any simple Device Only examples which natively support micro-USB, or USB-A? ThanksKen CarlsonDraeger Medical Systems
ProblemI am working on an STM32H743 and I have implemented a custom bootloader that should be able to jump to the STM32 internal system memory USB DFU bootloader.The application can request a firmware update by setting a flag (in the BKPRAM) and performing a system reset. After the reset, my custom bootloader detects the flag and tries to jump directly to the STM32 system memory DFU bootloader.The relevant part of my bootloader is:int main(void){ if (Bootloader_IsUpdateRequested()) //check if update is requested { Bootloader_ClearUpdateRequest(); EnterUpdateMode(); //go dfu mode } HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_USART3_UART_Init(); HAL_Delay(100); int err = Bootloader_is_app_valid(&crc); //check if app is valid if (err != 0) { // ... Bootloader_SetUpdateRequest(); NVIC_SystemReset(); } JumpToApplication(); //start application while (1) { }}The function used to ju
Hi, I’m having trouble getting valid ciphertext and tag from the AES peripheral in AES GCM mode using the HAL. I know that some HALs for other chips have resolved the tag mismatch issue (e.g., STM32H7xx - AES GCM Invalid Tag Generation after Decryption). It appears that issue was resolved by accounting for the data swapping when zero padding a final block inferior to 128 bits. I applied a version of the fix to my code (based on both reference manuals the interface to the AES is nearly identical) but I’m still having tag issues. I noticed that before and after this fix zero padded words were being written to the AES input register last. Figure 73 on p369 in the RM0511 Reference Manual seems to imply that zero padded words should be written BEFORE the valid words of the block. Am I misinterpreting the figure?Tag and padding aside, I’m not even able to produce valid ciphertext compared to another implementation of AES GCM (python cryptography library). I use the same 128-bit key, the same
I designed a board with a layout that I was very happy with, but this meant remapping FDCAN1_TX to PC14, which CubeMX dutifully created code for... However, the code wouldn't compile. I needed to get my board order in that day so I simply adjusted the pin arrangement and modified the layout, but it looks for all the world as though there are some missing defines. I say this because the datasheet quite clearly states this as a valid remapping. Just thought I'd put this out there. Maybe the fix is as simple as:-#define GPIO_AF13_FDCAN1 13 I may revisit this in the near future and I am aware there are some other remapping issues others have tripped up on. I guess it's because this is a relatively new part. It only came out in Feb 2025. Does anybody else know anything about this issue?
Hello, I cloned the repository https://github.com/STMicroelectronics/STM32CubeF3.git but importing the project ...STM32F3-DiscoveryExamplesBSP some code is missing in particular the code to manage the BSP device on the STM32F3DISCOVERY BOARD. What I am missing? Thanks in advance Adriano
I am using the STM32H7B3I-EVAL board. I checked STM32CubeH7. Since the board supports camera (DCMI) . Any camera demo project for testing LCD preview Availability of prebuilt binaries (.hex / .bin / .elf) for quick hardware testing Goal: quick validation of camera Please share any working example or reference.
I am using a STM32G071CB MCU on a device that connects to a battery that supports USB PD and I would like to get a battery status periodically. Code generated by STM32CubeMX that includes trace and GUI code works as expected when using STM32CubeMonitor-UCPD. However, the return path of a battery status reply message does not go through usbpd_dpm_user.c, but through GUI code instead. I would like my application to use usbpd_dpm_user.c as the interface using STM32Cube_FW_G0_V1.6.3, but information on how to do that is incomplete and examples are outdated. There seems to be more required than just selecting appropriate usbpd PE options and adding code to USBPD_DPM_SetDataInfo().Currently, USBPD_DPM_RequestGetBatteryStatus() returns USBPD_ERROR, but a request is send to the battery anyway. However, the battery status reply message does not trigger a call to USBPD_DPM_SetDataInfo() or USBPD_DPM_ExtendedMessageReceived(). What am I missing? Is there any documentation other than usbpd basics?
Hi,I am in the middle of migrating a project from STM32F767 to STM32H743. Both MCUs being compatible helped a lot.But there have been still a few road blocks, the last of which seems to be SPI. We use SPI3 to interface with a RA8875 based LCD. With DMA, we were able to get good results on F767, but so far not so much on H743. After connecting MOSI/MISO/CLK/CS lines to a logic analyzer, I noticed there both MOSI and CLK lines idle about the half of the time. Please see the screenshot below. During a supposedly active session of data transmission, either through DMA, or blocking write, there are several gaps. The measured during of those gaps are about either 5ms or 6ms.My question is: when would a SPI instance go into idle state? waiting for TX data to be ready (related to the famous D-cache issue on H7)? Please advise. Thanks in advance.ZL
Hello,On an STM32H725, changing RDP from Level 0 to Level 1 causes the firmware to stop running. In my device, the LED and FDCAN stop responding, even without a debugger connected. During debug session, this occurs in “HAL_FLASH_OB_Launch()”, more specifically after “SET_BIT(FLASH->OPTCR, FLASH_OPTCR_OPTSTART);”. After a manual power cycle, the firmware runs normally and RDP Level 1 is successfully applied.Is this expected behavior? Is a reset required after changing RDP from Level 0 to Level 1,Thanks!
Hello dear ST Community,I am not sure I can get help here as this topic is related to a WeAct Studio STM32F412 board and not a Nucleo or Discovery board from ST. If not that is fine , no problem.So, back to my issue : For this particular type of project, in the past we used STM32F411 boards but this time we had to change to a board with more RAM's ...The rest of the code in the MCU works as expected.When we connect the USB cable to PC in the Device Manager we get this error :"Unknown USB Device ( Device descriptor Request failed )"We using CubeMX and STM32Cube in VSCodeIn CubeMX I setup now just the basic USB_OTG_FS : Device onlyMiddleware : USB Device as Human Interface device class (HID)** We can share code or ioc file if needed …What I did :- USB Clock is set 48MHz- I tried HSI and HSE for the clock - there is said for the USB to work it requires HSE- I changed the USB cable- I revert to just basic HID and the default report ( but anyway Windows didn’t asked for it yet … )Could you
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.