Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi,how am I supposed so handle the reinsertion event while using the FileX with an SD card? All the examples I saw assume the SD card cannot be ejected while in use which is obviously unrealistic.I tried to do it according to the official docs and when the ejection is detected I call the fx_media_abort and fx_stm32_sd_deinit. But during the reinsertion when I call the fx_media_open again I get the FX_IO_ERROR. At this point the driver should be in an uninitialized state and the fx_media_open should call the fx_stm32_sd_init function.Can anyone relate to this problem? Here is the code example. The FX_STM32_SD_INIT macro is defined. if(card_insertion_flag.Get(0x03, EventGroup::Access::bit_or_clear, TX_WAIT_FOREVER,flag)) { if(flag & 0x01) { //Card inserted uint8_t cntr = 0; do { status = fx_media_open(&this->sdio_disk, (char* )"SD card", fx_stm32_sd_driver, 0, (VOID *) media_memory, this->media_memory_size); HAL_Delay(50); } while(cntr++ &
in HS, HAL_PCD_Init fails with timeout in USB_CoreReset Hello everyone,I am working with an STM32H7S78-DK and I’m trying to use USBX in standalone mode for a composite USB device (CDC ACM + PIMA) over USB_HS at 480 Mbit/s.At the moment, I have only implemented the CDC ACM class. PIMA will be added later.Situation:If I configure USB as Full Speed, the peripheral initializes correctly.If I switch to High Speed, initialization fails at:MX_USBX_Init() -> MX_USBX_Device_Init() -> MX_USB_OTG_HS_PCD_Init() -> HAL_PCD_Init(&hpcd_USB_OTG_HS)The error occurs at:if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK) { ... }Because inside USB_CoreInit, in USB_CoreReset, a HAL_TIMEOUT is returned while waiting for the CSRST bit in GRSTCTL to clear:Core Soft Reset (CSRST) is writtenThe bit never clears and eventually times outTechnical summary:FS works, HS does notThe timeout occurs right after PHY selection and USB core resetThe issue seems related to clock/PHY/HS con
I have looked https://community.st.com/t5/stm32-mcus/implementing-uart-receive-and-transmit-functions-on-an-stm32/ta-p/694926 and https://wiki.st.com/stm32mcu/wiki/Getting_started_with_UART#Configure_UART_Interrupt and tested sending tx data with a Salae Logic analyzer. And I am able to see the data sending. However, I cannot for the life of me get an rx interrupt to trigger. It seems like my code is correct, but something is off. /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2026 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****
Hello, I am using HAL2 and wrote the basic code below: while (1) { HAL_GPIO_TogglePin(LD1_PORT, LD1_PIN); HAL_Delay(1); } I looked at the pin with an oscilloscope and I see that the signal stays 2ms low and 2ms high. If I change the code to HAL_Delay(0) I get a signal that stays low 1ms and high 1ms. It's as if the delay is actually the HAL_Delay parameter plus 1ms. Any explanation?-Gil
Hello, I used STM32CubeMX2 to configure a timer (timer 2, channel 4) for input capture. I'm starting the timer and then applying the signal on the timer input pin. Since I configured the TIM interrupt, the interrupt callbacks do occur. void HAL_TIM_InputCaptureCallback(hal_tim_handle_t *htim, hal_tim_channel_t channel) { if (htim == mx_tim2_gethandle() && channel == HAL_TIM_CHANNEL_4) { uint32_t value = HAL_TIM_IC_ReadChannelCapturedValue(htim, HAL_TIM_CHANNEL_4); #ifdef DEBUG SWD_printf("ICTIM: %d\n", value); #endif } } The problem that I am having is that HAL_TIM_IC_ReadChannelCapturedValue always returns 0. The number of callbacks is actually correct (it matches the number of positive and negative edges of the signal). The timer frequency is 10,000Hz (the period is 0.1ms) and the signal pulses are between 2ms and 9ms so the timer is not overflowing. I would expect timer readings to be between 20 and 90. I attached the timer configura
Hello,I am working on USB device CDC ACM for STM32N655L0. I found an example about "Ux_Device_CDC_ACM" for NUCLEO-N657X0-Q. Can I use this example for my mcu? How can I find ioc configuration of this example?I also tried to implement this example to my project but when I change some configuration from ioc, new code is not match with this example. On the other hand, I did everything as inside of example but I am getting error during clock initalization.Best Regards,Basri KAYA
e.g. select I2S with "Master transmit" which should only use I2S_CK, I2S_WS and I2S_SDO, yet the I2S_SDI pin is also muxed and blocked for other use (and both DMA directions are available)
Hi Team,We are planning to use an STM32 camera interface over USB using the UVC protocol in our upcoming design. We would like to understand if there are any evaluation or development boards available that can be used for initial testing.Our key requirements are as follows:Image size: up to 5 MB per captureCapture interval: one image every 30 seconds (worst case)Video streaming is not required; we only need still image capture and transferUSB-based camera interface preferredWe would like to know:Whether UVC is suitable for this type of non-streaming, low-frame-rate image transferIf anyone has implemented a simpler or similar design successfullyWhich STM32 controller models support this use caseAvailability of any development or evaluation boards for testing the camera over USBPlease share your recommendations, reference designs, or documentation links if available.Looking forward to your guidance.Regards,Sathiya
Hi I have a project with STM32F446RET6 which has custom bootloader and application in user defined location. This project does UART Bootloader for firmware upgrade - issue faced is if the device loses power while in between the firmware upgrade then the device is neither in UART bootloader/DFU mode nor has a valid firmware. The solution which i want to implement is keeping two image of the application in two slot A and B. Normal working in Slot A and backup in Slot B. Firmware upgrade happens in Slot A and if fails copy the firmware from Slot B otherwise copy Slot A to Slot B. can anyone provide a simple logic which can be implemented to check if the firmware upgrade is completed and successful in SlotA. I would not like to add CRC check.
Hi all, I've noticed that a DHCP client can not get an IP address from the server if both mDNS server and DHCP client are enabled. The reason seems to be in ST Ethernet driver (nx_stm32_eth_driver.c): static UINT _nx_driver_hardware_initialize(NX_IP_DRIVER *driver_req_ptr) { ... FilterConfig.BroadcastFilter = ENABLE; ... } static UINT _nx_driver_hardware_multicast_join(NX_IP_DRIVER *driver_req_ptr) { /* Increase the multicast count. */ nx_driver_information.nx_driver_information_multicast_count++; /* Enable multicast frame reception. */ FilterConfig.PassAllMulticast = ENABLE; HAL_ETH_SetMACFilterConfig(&eth_handle, &FilterConfig); /* Return success. */ return(NX_SUCCESS); } In _nx_driver_hardware_initialize() FilterConfig is just prepared, there is no HAL_ETH_SetMACFilterConfig() call. That's why DHCP works OK if mDNS is not used. If mDNS is active, it calls _nx_driver_hardware_multicast_join() and applies a prepared 
I am using the STM32H733 controller along with the NetXDuo networking stack. The issue started after updating the HAL drivers in my project from version v1.11.0 to v1.16.0 (released on February 24, 2026).After this update, I observed that when the device boots up and no network activity occurs for a certain period (for example, no ping requests are sent to the device or device sending any UDP packet), the Ethernet connection is eventually lost permanently. Once this happens, the device becomes unreachable over Ethernet, and neither a soft reset nor a hard reset restores the connection.However, if the device receives a ping immediately after booting, or if it sends a UDP packet shortly after startup from the device, the Ethernet connection remains stable. In this case, normal operation continues without any issues until the device is reset again and no network activity is observed for a certain period as well.This problem only appeared after updating the HAL drivers to version v1.16.0 a
(I've opened an issue on GitHub on this matter already, but I was asked to post it here again...)Hey there,I'm currently developing an audio application based on the STM32N657 MCU. I have already implemented a working version of this application on an STM32U5A5 MCU, but now I need to port it to the N6.The application receives a PDM audio stream from a MEMS microphone via SAI. The audio data is then converted to PCM using the PDM2PCM library. On the STM32U5A5 MCU, the application uses the CM33 variant of this library (libPDMFilter_CM33_GCC_wc32.a), but I cannot find a variant of this library for the CM55 of the STM32N6 in any of the STM32Cube firmware packages.I would be very grateful for any advice or help on this matter!Thanks in advance and best regards,Jens
Hi everyone,I’m working on the STM32N6570-DK and trying to run a NetXDuo Web HTTP server as part of a secure application executing in XIP (external flash).I started from the available examples (which run from internal RAM / FSBL), but after moving the application to XIP, I’m facing instability issues (intermittent crashing issues, no ping response, etc.).From initial debugging, this seems related to:Execution latency from XIPPossible cache / MPU configuration or memory placement issuesMy questions:Is there any official or reference example for:STM32N6570-DKNetXDuo (HTTP Web server)Running in XIP mode (external flash)Within a secure application contextAre there recommended guidelines for:Placing NetXDuo and ETH driver code (RAM vs XIP)?MPU/cache configuration when using XIP with networking?Memory regions for packet pools and DMA buffers?Has anyone successfully run NetX Duo HTTP server reliably in XIP on STM32N6?
Hello everyone,I want to develop an IoT application based on STM32L496 and I am working with the BG96 modem that is embedded on P-L496-CELL02 board. The exchange of AT commands with the modem is succesfull, but, even though i insert a plastic microsim (I have actually tried two of them), i keep getting an error message "Sim Not inserted". I have enabled the simselect0 (PC2) and simselect1 (PI3) pins in CubeMX, as it is indicated by the manual (set to 0 and 1, respectively) and verify their value with my code. The board is powered with an external supply source, through Arduino Vin. The BG96 firmware version is BG96MAR02A08M1G. I have inspected soldering, short-circuits between the sim socket and contacts and everything seems to be alright. I cannot understand what could possibly be the problem, does anyone have a clue? I would be grateful.Here is my code. All AT commands return OK and seem to work. int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU C
Hi Everyone, I am working on a NUCLEO-H753ZI board and want to set up Ethernet RMII communication using LwIP in STM32CubeIDE. I am looking for step-by-step guidance from the IOC file configuration to the generated code, including: Pinout configuration for RMII. LwIP middleware settings. MPU region configuration for Ethernet and LwIP memory Generating code and linker settings Any tips to ensure that ping from PC works reliably Could provide a complete, detailed guide. how to configure CubeIDE and LwIP for NUCLEO-H753ZI. Thanks in advance.
Hi, for an old project of mine I need the STM32CubeF4 v1.21.0 + HAL v1.5.7 but I can't find the download links to that version anymore. It seems like they got deleted from GitHub? Can someone supply me with the old version of the STM32CubeF4 including the HAL? Cheers!
Hi Is there an example using a STM32C5 as a USB host controller connecting a USB HID (mouse/keyboard) as input device?
We are developing a safety-related application based on an STM32 microcontroller and aligning our design with IEC 60730 Class B requirements. In our application, we implement fault detection mechanisms for analog and digital signals (e.g., sensor inputs, voltage monitoring, heater control). Due to noise and transient conditions, we are considering adding a software debounce/filtering time before declaring a fault. We would like clarification on the following points: Does IEC 60730 Class B explicitly require or prohibit the use of debounce time for fault detection? Is it acceptable to introduce a software debounce (e.g., 100 MSto a few seconds) to avoid false fault triggering? Are there any recommended guidelines from ST for implementing debounce while still complying with Class B requirements? Does the STM32 IEC 60730 Class B self-test library include any reference implementation or best practices for handling such debounce scenarios?
Config:stm32h743iiT6SDRAM 32mb model w9825g6khFLASH 32mb QSPI 1 bank 4 lines w25q256jv2Screen 7 inch 24bit rgb888I am really stuck on stm32 jpeg hardware vs libjpeg working 1 Decoding 1024x600 stored in qspi flash with jpeg harware stuck with the jpeg markers === FINDING JPEG IN QSPI === Found JPEG at offset 0x069000 (address 0x90069000) :triangular_ruler: Found SOF0 at offset 484: 160x94 Dimensions: 160 x 94 Found JPEG at offset 0x089000 (address 0x90089000) :triangular_ruler: Found SOF0 at offset 552: 160x93 Dimensions: 160 x 93the image is really 1024x600 stored has standard in photoshop to avoid progressive stuff.... Offset 7252: SOI (start) - Offset 7418: SOF for 160x94 thumbnail - Offset 11289: EOI for thumbnail - Offset 15044: SOF for 1024x600 main image ← Your real image! - Offset ???: EOI for main image Is there any body witch have faced those problems to hardware jpeg decode can you share your experience .....
Hello, I am testing SPI5 TX by GPDMA on an STM32N6 device and I found behavior that seems inconsistent with the reference manual. MCU / Environment MCU: STM32N647X0H Toolchain: STM32CubeIDE 2.1.1 CubeMX / CubeN6 version: STM32Cube_FW_N6_V1.3.0 Issue summaryI configured SPI5 as: Master Simplex TX-only Software NSS SSI set high I configured GPDMA1 Channel0 as: Memory-to-peripheral Source = TX buffer Destination = SPI5->TXDR Transfer length = 8 bytes TX pattern = A5 5A A5 5A A5 5A A5 5A Observed behavior If I write data directly to SPI5->TXDR by CPU, MOSI outputs correctly. If I use GPDMA for SPI5 TX, SCK may appear, but MOSI stays low / no valid TX data is output. I reduced the project to a minimal LL test case and the behavior is reproducible. What I already verified Same SPI5 pin configuration is used in both tests. CPU TX path works with the same SPI configuration. TX buffer content is correct in memory (A5 5A ...). DMA source addres
Hi community.TLV230adc5140 - SAI 4CH(TDM) - STM32 - USB_FS_ 4CHmic - Window(LInux RP5) I reuse partly code from memsmic1 project to create 4 microfone audio device. Everything look well for channel 1 and 2 I got some trouble whit CH3 and CH4. Please help whit wrong channel mapping for channel 3 and 4. It is mapped on channel 1 and 2 on usb interface. One can see it on attached picture. Here is TLV switched off, SAI(DMA call back) reused for 4 sin generator 1,2,3,4 kHz for every supposed channel. Here you see the picture.Where i am wrong?
Hi everyone, I am working on a dual-core project using the STM32H747XI. I am implementing a custom Tickless Idle mode in FreeRTOS on the Cortex-M7 (CM7) core using LPTIM1 as the wakeup source. I’m facing a specific issue regarding the interaction between D1 and D2 domains: The Scenario: CM4 is running a continuous task (intended to stay active). CM7 enters low-power mode via vPortSuppressTicksAndSleep. If I use HAL_PWR_EnterSLEEPMode(), everything works perfectly—CM4 keeps running, and CM7 wakes up as expected. If I switch to HAL_PWREx_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI, PWR_D1_DOMAIN), the CM4 core seems to "die" or freeze as soon as CM7 enters the DStop state. Is it physically possible for CM4 to continue executing code if the D1 domain is in DStop (CM4 is using only LPTIM1 on D3 and timers on D2)? Code snippet used on CM7: _weak void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime) { // Generated when configUSE_TICKLESS_IDLE == 2. // Functio
Hello, I can't cope with interrupt transactions. (I need it later for composite device).For tests I generated HID device example. When device is connected to host it appears correctly in the system.For interrupt endpoint configured 0x81.I need to answer for interrupt transactions, but which callback is responsible for this?I start debugging from very deep. Breakpoints were set in HAL_PCD_IRQHandler(). As I understand in this functions all usb transactions starts, but I see only interrupts from ZERO endpoint. Dumping by WireShark I see host sends requests to my device x.xx.1 and responses.Why I don't see interrupts for 0x81 (also I check 0x01) in HAL_PCD_IRQHandler()?What I do wrong?
Hello ST Community,I am working on a USB Video Class (UVC) application using STM32H7S3L8 (NUCLEO-H7S3L8) in USB HS device mode.Requirement:Streaming 640×480 30fps (YUY2, uncompressed), requiring ~18.4 MB/s bandwidth.With the STM32 HAL, I can only achieve:~8.2 MB/s (1024 bytes × 1 transaction per microframe)This limits performance to ~13 fps at 640×480.USB 2.0 specification allows up to 3 transactions per microframe for high-speed isochronous endpoints.However in STM32 HAL:ep->maxpacket = ep_mps & 0x7FFU masks transaction bitsNo MC (multi-count) handling in DIEPCTLEndpoint structure has no field for multiple transactionsHAL does not configure high-bandwidth isochronous mode Does STM32H7 USB OTG HS support high-bandwidth isochronous transfers (2x/3x transactions per microframe) in device mode?If supported:Is there any register-level guidance to configure this?Any example or application note available?
Hi I configured the DFSDM1 on the STM32H753VIT6 for a MEMS Mic.I got the problem that the DMA Callback on (Half)/Full buffer never gets called. I used AN5027 as guideline and the DFSDM Audio ExampleD-Cache disabled and set the Audio Sampling Frequency low (4kHz) to debug over UART. Main (snippets):DFSDM_Filter_HandleTypeDef hdfsdm1_filter0; DFSDM_Channel_HandleTypeDef hdfsdm1_channel4; DMA_HandleTypeDef hdma_dfsdm1_flt0; . . . . int32_t LeftRecBuff[1024]; void HAL_DFSDM_FilterRegConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) { /*Never Reached*/ } int main(void) { HAL_Init(); SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_DMA_Init(); MX_DFSDM1_Init(); /* USER CODE BEGIN 2 */ // imu_init(&hspi4, GPIOE, GPIO_PIN_4 /* IIM-42652 CS */); HAL_DFSDM_FilterRegularStart_DMA(&hdfsdm1_filter0, LeftRecBuff, 1024); while (1) {} }Config (CubeMX)/** * @brief DFSDM1 Initialization Function * @PAram None *
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.