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 guys, I’m using lwip libray with netconn api on stm32h7, I want to enable the receive timeout using netconn_set_recvtimeout method. In order to do that LWIP_SO_RECVTIMEO macro should be set to 1 (default value is 0). There is no LWIP_SO_RECVTIMEO macro in the LWIP section of the .ioc file.How can I configure it ? Shoudl I set another macro in the .ioc or should I change LWIP_SO_RECVTIMEO value in the header file ?
custom board, The USB D+ and D− lines are connected directly from the MCU to the USB Type-B connector, with no intermediate components. There is no pull-up resistor on the D+ line, as I understand that the MCU provides the pull-up internallyAs far as I know, the stm32u595 supports USB High-Speed using its internal PHY.CubeMX Version: 6.18.0Reference project:https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U5G9J-DK2/Applications/USBX/Ux_Device_CDC_ACMI configured my .ioc file to match the reference project as closely as possible. UART is not used.Issue:I implemented a simple CDC ACM echo function to verify USB communication.In Full-Speed (FS) mode, the echo function works correctly. The PC recognizes the device, and both transmit and receive operate normally. In High-Speed (HS) mode, however, the PC does not recognize the USB device at all (it reports an unknown or unrecognized USB device), so communication cannot be established.What could I be missing, or what
I'm trying to disconnect a ethernet cable after flashing a code Then I'm getting [00:01:50.522,000] <err> net_tcp: net_send_data()[00:01:52.200,000] <wrn> net_if: iface 1 is down[00:01:52.200,000] <err> net_tcp: net_send_data()[00:01:52.480,000] <wrn> net_if: iface 1 is down[00:01:52.480,000] <err> net_tcp: net_send_data()[00:01:52.900,000] <wrn> net_if: iface 1 is down[00:01:52.900,000] <err> net_tcp: net_send_data()[00:01:53.530,000] <wrn> net_if: iface 1 is down[00:01:53.530,000] <err> net_tcp: net_send_data()[00:01:54.475,000] <wrn> net_if: iface 1 is downThis is expected since trying to connect it backWhen I reconnect ethernet cable Im getting an below error [00:01:54.475,000] <wrn> net_if: iface 1 is down[00:01:54.475,000] <err> net_tcp: net_send_data()[00:01:55.282,000] <inf> phy_mii: PHY (0) Link speed 100 Mb, full duplex[00:01:56.212,000] <err> os: ***** USAGE FAULT *****[00
Hello, I may be missing something, I cant generate the SPI_init() method within main() (also pins are yellow ?)…I have generated; HAL_Init(); /* Configure the system clock */ SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(); Cheers
Hello,I have completed this guide successfully:How to integrate TouchGFX and camera middleware on an STM32N6570-DK However, I am running into an issue when I try to add SDMMC2 or ETH in the .ioc. After I generate code then build in the IDE, I get the below error: C://TouchGFXProjects/VisionControlboard2/FSBL/Core/Src/main.c:334:(.text.startup.main+0x12c): undefined reference to `HAL_SD_Init'C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (HAL_SD_Init): Unknown destination type (ARM/Thumb) in ./Application/User/Core/main.oC://TouchGFXProjects/VisionControlboard2/FSBL/Core/Src/main.c:334:(.text.startup.main+0x12c): dangerous relocation: unsupported relocationProject in link below:https://app.box.com/s/bdbyzi5eqvqhgib90klxgehmhs8pkynsWhat is the best method to get this resolved? I am using STM32CubeIDE Version 2.1.1
Hi.I’m working on a custom board with a C551VET6 and trained on a NUCLEO_C562RE with ADC. I attempted the conversion in polling mode in several ways (mode=single + discountinuous=disabled / mode=continuous + discountinuous=3ranks) by varying the implementation of the FOR loop (including or excluding the calls to HAL_ADC_REG_StartConv and HAL_ADC_REG_PollForConv according to the selected mode); no matter what I did, as soon as I needed to convert 3 or more channels, only the first two showed distinct values, while all the other channels in the sequencer returned a value identical to that of the second channel.I found no example using more than 2 channels in a basic regular sequencer. Have you tried it at ST ?By the way, I’m working with a CTN temperature sensor and two HDC3120 giving both temperature and humidity, thus 5 channels in my case.Do I need to lower the resolution or something when the number of channel increases ?I’m not familiar with ST community mechanisms, shall I open a
Hello,I am working with an STM32N6570-DK board and facing an issue while setting up the SD card. I created a project using TouchGFX Designer, generated the code, and opened the .ioc file. In there, I enabled SDMMC2 with 4-bit Wide mode and enabled global interrupt:After checking the schematics, I noticed that the CK pin was incorrect, so I assigned the correct pin (PC2:(I made the following additional configurations:Changed all SDMMC2 pins to pull-up and set Max output speed to Very HighEnabled PWR_SD_EN (PQ7) as output level high with context FreeChanged clock from HCLK to IC4 (should not affect anything)Enabled SD_DETECT (PN12) to detect when the SD card is inserted or removedEnabled EXTI Line4 and EXTI Line12 for interruptsEnabled FileX with mostly default settings, except for increased memory and FX driver initialization:After this setup, I attempted to initialize the SD card with the following call:fx_media_open(&sdio_disk, "SDIO_DISK", fx_stm32_sd_driver, NULL, fx_sd_media_me
Hi,I am using the STM32N657-DK and running the NetX Duo WebServer example provided by STM32Cube. The application works correctly when the Ethernet link is negotiated at 100 Mbps and 1 Gbps. However, when the link speed is 10 Mbps, the web server is not reachable and communication fails.SetupBoard: STM32N657-DK Software: STM32CubeIDE / STM32Cube firmware NetX Duo WebServer example PHY: (RTL8211F-CG, if applicable) Interface: RGMIIObservations1 Gbps: Works correctly. 100 Mbps: Works correctly. 10 Mbps: Link appears to come up, but the web server cannot be accessed and network communication fails.QuestionsDoes the STM32N657-DK NetX Duo Ethernet driver fully support operation at 10 Mbps? Is there any additional MAC or PHY configuration required when the negotiated speed is 10 Mbps? Are there any known limitations or issues with the NetX Duo Ethernet driver or HAL Ethernet driver when operating at 10 Mbps? Has anyone successfully run the NetX Duo WebServer example at 10 Mbps on the STM32N65
Cannot wake from Stop mode using LPTIM1Board: STM32N6570-DK (STM32N657X0, Cortex-M55)RTOS: Zephyr 4.4.0Goal: Enter Stop mode and wake periodically via LPTIM1 auto-reload interrupt (~200ms)What works:Sleep mode (WFI without SLEEPDEEP) — enters and wakes correctly from GPIO EXTI and LPTIMLPTIM1 initialization — confirmed running, ISR fires (verified via counter incrementing in HAL_LPTIM_AutoReloadMatchCallback)LPTIM1 EXTI line 52 enabled — EXTI->IMR2 |= EXTI_IMR2_IM52 via __HAL_LPTIM_LPTIM1_EXTI_ENABLE_IT()NVIC LPTIM1_IRQn enabled — interrupt registered and working in normal (non-Stop) operationClock restore after Stop — SystemClock_Restore() re-enables HSE, PLLs (PLL1/2/3), IC muxes back to 800 MHzWhat does NOT work:Stop mode entry → CPU never wakes. After HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI), the MCU halts permanently. No interrupt wakes it.LPTIM1 configuration:__HAL_RCC_LPTIM1_CLK_ENABLE();// Clock: LSI (~32 kHz)RCC_PeriphCLKInitTypeDef pclk = {0};pclk.Per
I have made a bootloader for STM32F4 with dual bank and single bank structure. I have done so rudimentary testing with it and written test logs in a md file. Here is the link:-https://github.com/Tank4676/stm32-dualslot_bootloader
Hi, I use STM32H7 with STCUBE 11.1.I use RNDIS module usbd_cdc_rndis.h to communicate with a PC.Sometimes when the PC sends a frame the STM32 replies with NAK, here is the sequence that repeats:SYNCPID OUTAddressCRCEOPSYNCPID DATA0data 30 bytesCRCEOPSYNCPID NAKEOPWhat might be the issue? Can I change the USB interval (CDC_RNDIS_FS_BINTERVAL)?BRJonas
Good day,We are using a composite USBX device class combining CDC and MSC over USB Full Speed, built on X_CUBE_AZRTOS-H7 version 3.3.0 (USBX 6.4). During testing we discovered that a certain Windows PC sends a MODE SELECT(10) command (opcode 0x55) and causes an endpoint stall.After a rather long debugging session, it was found that the USBX source _ux_device_class_storage_mode_select() is explicitly not implemented — it stalls the OUT endpoint, UX_FUNCTION_NOT_SUPPORTED (which is not checked in the thread) and never recovers:The MODE SELECT(6) SCSI command is not even implemented and the storage thread falls through to the default case, also triggering a endpoint stall. So:- Are there any plans to implement these MODE SELECT(6/10) commands properly in a future USBX release?- Does anyone already have a workaround for this?- Wouldn't it be cleaner to reply with an ILLEGAL REQUEST instead of stalling the endpoint?System details:- MCU: STM32H7- USBX version: 6.4 (X_CUBE_AZRTOS-H7 3.3.
I am working with an STM32 microcontroller and a VL53L0X sensor. The sensor readings are transmitted over UART1 at 115200 baud, 8N1.I have verified: UART initialized at 115200 baud, 8N1, no parity XCTU terminal set to ASCII mode (Hide Hex enabled) Line endings set to \r\n Any suggestions for reliable output?Numeric values are printed correctly, but the text parts like "Distance" and "mm" are missing or appear as dots in XCTU’s terminal. For example, instead of:CodeDistance: 25 mmI see:CodeD..ta..e: 25 mm
Dear ST Team,I am using the STM32H5 Nucleo-64 board (MB1814) to develop a CAN communication-based application. In my implementation, I am using the TX Queue for message transmission and RX FIFO0 for message reception, both operating through interrupts.While reviewing the HAL library, I observed that the Message RAM allocation for the RX FIFOs and TX Queue is defined using static, hardcoded macros, as shown below:#define SRAMCAN_FLS_NBR (28U) /* Max. Filter List Standard Number */#define SRAMCAN_FLE_NBR ( 8U) /* Max. Filter List Extended Number */#define SRAMCAN_RF0_NBR ( 3U) /* RX FIFO 0 Elements Number */#define SRAMCAN_RF1_NBR ( 3U) /* RX FIFO 1 Elements Number */#define SRAMCAN_TEF_NBR ( 3U) /* TX Event FIFO Elements Number */#define SRAMCAN_TFQ_NBR ( 3U) /* TX FIFO/Queue Elements Number */Since my application uses only TX Queue and RX FIFO0, I would like to know whether it is possible to reallocate the Message RAM to increase the number of elements for these two resources while set
I’m using SDIO + DMA on an STM32F407 and I need a “transfer complete” callback for SD writes/reads. What is the correct way to attach a user callback for SDIO + DMA completion when using the CubeMX‑generated SD/FATFS drivers?Thank you!
/* * Stl_Scheduler.c * * Created on: Jun 25, 2026 * Author: User */#include <stl_user_api.h>#include "stl_scheduler.h"#include "main.h"#include "app_threadx.h"#include "APP_Log.h"extern TIM_HandleTypeDef htim15;/* RAM & FLASH Tests definitions */#define FLASH_SECTION_SIZE 1024U#define RAM_SECTION_SIZE 128U#ifdef STL_DISABLE_RAM_BCKUP_BUF#define RAM_BACKUP_BUFFER_SIZE 0#else#define RAM_BACKUP_BUFFER_SIZE 32#endif// STM32H523#define TEST_RAM_START_ADDR (0x20000000U + RAM_BACKUP_BUFFER_SIZE)#define TEST_ROM_START_ADDR 0x08000000U//#define TEST_ROM_END_ADDR 0x0801A3FF//#define TEST_ROM_END_ADDR 0x0801A00FU#define TEST_ROM_END_ADDR 0x0801A3FFU//#define TEST_ROM_END_ADDR 0x0807F7FFU/*#if (defined (__GNUC__) && !defined (__CC_ARM) && !defined (__ARMCC_VERSION))extern void *_edata_load;#define TEST_ROM_END_ADDR ( (uint32_t)&_edata_load + 3)#endif*/// Runtime RAM test: 8 sections x 128 bytes = 1024 bytes#define TEST_RAM_SECTION_NB_RUN 8 /* only 8 RAM
Is there any doco or app note on how to save/restore a STM32H7 CRC calculation (e.g. breaking up long CRC calculation into separate segments that requires re-initialization of CRC HW between segments)?
Thank you for taking the time to review my question.I migrated the Ux_Device_Audio_2.0_Standalone of STM32WBA6 to STM32H503 and successfully enumerated using USB FS. However, out of 1000 entries into the USBD_AUDIO_PlaybackStreamFrameDone function per second, half are 4 bytes long and half are 384 bytes (audio stream). I monitored the data using USBlyzer and did not see any upload data (EP IN) from STM32H503. I don't know where these 4 bytes come from, and this issue has been bothering me for several days.VOID USBD_AUDIO_PlaybackStreamFrameDone(UX_DEVICE_CLASS_AUDIO_STREAM *audio_play_stream, ULONG length){ /* USER CODE BEGIN USBD_AUDIO_PlaybackStreamFrameDone */ UCHAR *frame_buffer; ULONG frame_length; int32_t ret; UNUSED(ret); /* Get access to first audio input frame. */ ux_device_class_audio_read_frame_get(audio_play_stream, &frame_buffer, &frame_length); if (length) { HAL_GPIO_TogglePin(GPIOA, GPIO_PI
Hello, I have connected a sensor to my nucleo board to send data when sensor detects movement.I have introduced an ISR for that.void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin){ if (GPIO_Pin == GPIO_PIN_0) { pirDetected = true; }} unfortunatelly with that approach everytime the sensor was triggered ( I was able to measure 3.3v on the OUT pin using voltmeter) my stm32 is kind a freezing. I have introduced some testcode,extern "C" int main(void){ /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); while (1) { if(HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0)) { HAL_GPIO_Write
I am working on an STM32 based IoT project where I want to fetch original quality media files from public Instagram post URLs and display them on a connected TFT screen. The concept is similar to how browser based tools like snapinsta.ink work where a public post URL is parsed to extract the direct media file URL which is then fetched as raw image data. My current implementation uses the STM32 HAL HTTP client library to send a GET request to the public post URL and parse the JSON response to extract the highest resolution media node before downloading the file to external flash storage. The main challenge I am running into is that the response payload size exceeds the STM32 heap allocation when trying to buffer the full response in memory before parsing. Has anyone implemented a similar HTTP response streaming and parsing workflow on STM32 and found a reliable way to handle large JSON payloads without loading the entire response into SRAM.
I'm implementing getQuat() for the BNO055 on both STM32 and Arduino and getting very different times. On STM32H7 (HAL, 400kHz I2C) my equivalent code measures ~394µs typical with frequent spikes up to ~2573µs (mean ~912µs), but on Arduino with the Adafruit library getQuat() I get ~2ms. Is my STM32 HAL code below a fair equivalent of the Adafruit getQuat(), so that the times are actually comparable?adfruit bno055 offical library /* 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. * ****************
I am working on the STM32N6570-DK and would like to implement FOTA (Firmware Update) through Ethernet.We are planning to perform the firmware update over a wired Ethernet connection, not through wireless or OTA.Could you please suggest which protocol is better for firmware image update:UDP TCP HTTPKindly let me know the recommended approach for reliable firmware updates over Ethernet.Also, if there are any example projects or reference code available for implementing firmware update over Ethernet on STM32N6570-DK, please share them. It will be very helpful for our development.
Hiya. I’m working on a project that writes to a microSD card over SPI using an RTOS (ThreadX in this case). I’ve had a bit of trouble implementing it over the weekend since I’ve seen little/no support for SPI on FileX and I’ve had issues porting over FatFs SPI code over to this project. Looking for some help and guidance with this! I’m not experienced with FileX or FatFs, so the solution could be pretty simple.With FileX, I can initialise but cannot mount the drive (memory pool allocations has been large enough). I used this custom library for the SPI implementation: With FatFs, I was also able to initialise but could not mount the drive. Again, I am pretty new to this stuff, so a series of steps to implement and identify the problems would be greatly appreciated. I can figure out the rest of the code (like writing and reading), I’m just struggling with initialising and mounting.
Summary On a NUCLEO-N657X0-Q I have a custom (non-CubeMX-template) FSBL that copies an "LRUN" application image from external XSPI flash into AXISRAM and jumps to it. The byte-identical signed FSBL runs completely when I stage it with the debugger in Development boot (monitor reset → load → jump Reset_Handler) — the app runs end to end. But in true ROM flash-boot (BOOT pins set for boot-from-flash, power-cycle, no debugger), the FSBL reaches main() (user LEDs light) and then locks up before its first clock-configuration step. The lock-up is invisible to SWD, UART, and even fault handlers, which points at a processor LOCKUP tied to the state the boot ROM leaves at the FSBL entry in flash-boot (security / RIF / clock), which differs from the debugger path. I would like to understand what minimal init my FSBL must do at entry in flash-boot. Hardware / tools - Board: NUCLEO-N657X0-Q (MB1940), STM32N657X0H, Cortex-M55 + Neural-ART. Device ID 0x486, Rev Z. Lifecycle state: OPEN (SWD attac
Board: STM32N6 (Custom board with USB OTG HS)I am trying to create a USB composite device with: - CDC ACM Instance 0 (LOG port) - Interfaces 0, 1 - CDC ACM Instance 1 (DATA port for GenICam/GenCP) - Interfaces 2, 3 - UVC VIDEO class - Interfaces 4, 5Dual CDC works perfectly. However, when I add CLASS_TYPE_VIDEO to UserClassInstance[], the device fails to enumerate entirely (not visible in lsusb). --- Working Configuration (Dual CDC Only) // ux_device_descriptors.c uint8_t UserClassInstance[USBD_MAX_CLASS_INTERFACES] = { CLASS_TYPE_CDC_ACM, // CDC0 - interfaces 0,1 - endpoints 0x81,0x82,0x03 CLASS_TYPE_CDC_ACM, // CDC1 - interfaces 2,3 - endpoints 0x84,0x85,0x06 }; Result: Device enumerates as 0483:5710, two /dev/ttyACM ports appear, communication works. --- Failing Configuration (Dual CDC + VIDEO) uint8_t UserClassInstance[USBD_MAX_CLASS_INTERFACES] = { CLASS_TYPE_CDC_ACM, // CDC0 - interfaces 0,1 CLASS_TYPE_CDC_ACM, // CDC1 - interfaces 2,3 CLASS_TYP
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.