Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello, I'm using STM32CubeIDE 2.0.0 + STM32CubeMX 6.16.1 + FW_H7 V1.12.1 I have a problem with USBX RNDIS.The generated code on file ux_device_descriptor.h at line 308 is: #define USBD_RNDIS_EPINCMD_ADDR 0x81U In the exemple code of STM32H735-DK find on stm32-usbx-exemple repo I have this #define USBD_RNDIS_EPINCMD_ADDR 0x82U The USB device is well recognized be my computer (windows 11) only if the value is 0x82U. My questions: - why it doesn't work with 0x81 - is there is a tips to modify this value on Cube ? Actually I add an error at the end of the file if value is 0x81.. Thanks for help !
I am implementing a TCP Server on an STM32H563ZI (Nucleo-144) using NetXDuo. The software initialization part is working perfectly; the ThreadX kernel starts, and NetXDuo reports that the IP instance (192.168.2.55) and TCP are successfully enabled.The Implementation Logic:The system is designed to initialize the network interface, assign a static IP, and start listening on Port 80 for incoming commands. Physically, the link is established as the Ethernet LEDs are active.The Problem:Despite the stack reporting a "Ready" state:There is no ICMP (ping) response from the board.TCP connection attempts via Hercules or Telnet on Port 80 fail with a timeout.It feels like the MCU is either not receiving packets from the PHY or failing to transmit them back to the wire.I am looking for guidance on why the communication fails even though the software reports success. Is there a specific configuration for the H5 series regarding the RMII interface or internal memory management that could prevent pa
hello everybody I am programming 10 addressable Leds with PWM with DMA using the M7 cortex of an STM32H747 in a custom board.Characteristics:Clocks: SysClk 480 MHz, TIM kernel clock 240 MHzTimer: TIM3, Channel 4, internal clockPWM base frequency: ~770 kHz (period ≈ 1.3 µs).ARR: 312‑1 (312 ticks → 240 MHz/312 ≈ 769.23 kHz).DMA: Peripheral = TIM3_CCR4, Memory in RAM_D2, half‑word alignment (16‑bit duty), MemInc enabled, PeriphInc disabled, Mode = Normal.What worksIf I run the timer alone (fixed duty), the PWM is correct and stable.The problemWhen I enable PWM + DMA, the waveform becomes random/discontinuous. On the oscilloscope I see “splits” and gaps; the PWM is not continuous. For example, the first 8 bits might be high and the following 16 low (intended to represent RED), but the stream breaks unpredictably. The data buffer looks correct when inspected in the debugger.The configurationI am using channel 4 timer 3. with internal clock source.and DMA is configured as:where data wid
I am creating a program that jumps from the bootloader to the application program using the STM32F410.The bootloader uses 0x08000000 to 0x08003FFF.The application uses 0x08004000 to 0x08007FFF.The bootloader program jumps to the application program successfully,but after entering the application program, the USART interrupts do not function.The SPI in the application program continues to operate after the jump. I'm posting the jump-related program.Can you figure out what the cause might be? I'd appreciate your help.【Bootloader main.c】 void jump_main(){ __disable_irq(); // Clear all interrupt bits for (uint8_t i=0; i<8; i++) { NVIC->ICER[i] = 0xFFFFFFFF; NVIC->ICPR[i] = 0xFFFFFFFF; } int * address = (int *)0x08004004; __set_MSP(*(int*)0x08004000); *(int*)0xE000ED08 = 0x08004000; ((void (*)())(*address))(); } 【Application main.c】 int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration---------------------------------
LINK TO THE CODEHello everyone,I'm working on a data logging project using a NUCLEO-L432KC board and a standard Micro-SD card module.I have a very frustrating issue: Reading from the SD card works perfectly, but Writing fails immediately.Hardware Setup:MCU: STM32L432KC (Nucleo-32 board)SD Module: Generic MicroSD Card Module (with 5V to 3.3V regulator and level shifter).Power: Module is powered via the 5V rail from the Nucleo. I added a 1000µF / 25V electrolytic capacitor in parallel on the breadboard to prevent any power drops (brown-outs) during write operations.Pinout: * SCK: PB3MISO: PB4MOSI: PA7CS: PB6 (Software managed)Software / CubeMX Setup:Library: FatFS R0.12c (via STM32CubeIDE).FatFS Config: _FS_READONLY = 0 (Disabled), _FS_LOCK = 0.SPI Config: MSB First, CPOL Low, CPHA 1 Edge, Baud Rate 125.0 Kbits/s for init.GPIO: SPI pins are set to "High" output speed.The Problem:My code successfully initializes the SD card. f_mount returns FR_OK, and f_getfree correctly reports the total
Hello ST Community,We are working with STM32N6 (STM32N6570-DK) and an IMX335 camera sensor, and we would like to confirm whether our intended pipeline is supported and feasible on this platform.What we are trying to doOur goal is to enumerate the device as a standard USB UVC camera on a PC and stream live video:- IMX335 sensor outputs RAW10- STM32 ISP processes RAW10 (demosaic, color processing)- DCMIPP outputs RGB565- Firmware converts RGB565 → YUY2- USB Device enumerates as UVC (Uncompressed YUY2)- Live video displayed on Windows camera applicationThe USB device enumerates correctly and is detected as a UVC camera on Windows, but the live video stream currently appears black.Current Observations- USB descriptors and UVC configuration (Uncompressed format, payload handling, FID/EOF toggling) appear correct- DCMIPP and USB pipelines run without errors- The camera frame buffer contains all zeros, indicating that the ISP may not be producing valid RGB outputMain Questions1- Is live USB U
I am using below component tools MCU: STM32H750IBT6 IDE: STM32CubeIDE Version: 1.20.0 GUI: TouchGFX Version: 4.26.0 SDRAM: IS42S32400J-6TLI FLASH: MT25QL512ABB8ESF-0SIT (QUADSPI) QUADSPI With the following pin out: QUADSPI Configuration: Thank you in advance!
I'm currently using an STM32H7S78-DK, and I'm correctly able to run TouchGFX with FreeRTOS and everything. I also an error handler function that, in case of a crash of TouchGFX it writes directly to the framebuffer.Now, I would like to do a similar thing but on the boot code, so basically before the classic jump if (BOOT_OK != BOOT_Application())I have an external RAM mapped at the address 0x90000000 which works correctly in TouchGFX with .icf likedefine symbol __region_EXTRAM_start__ = 0x90000000; define symbol __region_EXTRAM_end__ = 0x91FFFFFF; define region EXTRAM_region = mem:[from __region_EXTRAM_start__ to __region_EXTRAM_end__]; place in EXTRAM_region { first section TouchGFX_Framebuffer , section Video_RGB_Buffer , section Nemagfx_Stencil_Buffer };I wanted to use the same section of memory in the Boot, accessing the framebuffer directly, so I edited the .icf of the boot withdefine symbol __region_EXTRAM_start__ = 0x90000000; define symbol __region_EXTRAM_end_
Hi,I just wanted to check if is it dangerous to move the isr_vector inside the text section like this:.text :{. = ALIGN(4);KEEP(*(.isr_vector)). = ALIGN(4);FILL(0x00000000);. = ALIGN(4);*(.text) /* .text sections (code) */*(.text*)*(.glue_7) /* glue arm to thumb code */*(.glue_7t) /* glue thumb to arm code */*(.eh_frame)KEEP (*(.init))KEEP (*(.fini)). = ALIGN(4);_etext = .; /* define a global symbols at end of code */} >FLASHI implemented a CRC32 integrity check and it doesn't work because the gap between the isr_vector and text section is always Fs when I debug with the CubeIDE, but if I download the .elf with CubeProgrammer, the gap is filled with 0s, and in that case it works.TY for your help.
Hi everyone,I am trying to get a USBX CDC ACM device running on an STM32F407ZGT6, using a project generated by STM32CubeMX. I'm basing my work on the example provided for the STM32F469 (DEVICE_CDC_ACM).Problem DescriptionThe device is partially working. When I plug it in, Windows Device Manager recognizes it and assigns a COM port. However, when I try to connect using any terminal software (Tera Term, PuTTY, etc.), the connection fails. The software cannot open the port.Debugging FindingsThrough debugging, I've identified a key issue in the initialization sequence:Instance Activator Not Called: The callback function I set for cdc_acm_parameter.ux_slave_class_cdc_acm_instance_activate(which is CDC_Init_FS) is never triggered. This prevents the proper initialization of my CDC ACM instance.Null Pointer in Thread: The usbx_cdc_acm_read_thread_entryfails because it encounters a null pointer. Specifically, the comparison ux_utility_memory_compare(data_interface->ux_slave_interface_class
Hallo everyone,Before I encountered a bug in an USB_OTG_FS library function (see previous post), I struggled to find out when the function 'CDC_Transmit_FS(uint8_t* Buf, uint16_t Len)' has finished, meaning the content of the 'Buf' argument is completely transmitted.After a thorough search through the various sources and the Reference manual RM068, I concluded the Register DOETMSK has a bit XFRCM that should fire an interrupt in case the the transmission has finished. I assume the common interrupt function ' HAL_PCD_IRQHandler(&hpcd_USB_OTG_FS)' will deduce that function 'CDC_TransmitCplt_FS(.......)' should be fired when the XFRCM creates an interrupt.Despite my efforts I could not find a way to: a) find out if my assumptions above are complete and/or correct b) how to handle the registers for the USB_OTG_FS device. In the SWF column of the debugger I saw 4 groups of OTG registers, but never found a way to access them in my code. And the complexity of
Hello,I have a issue with my STM32U5G9. It does not go into standby or shutdown mode. I want to achieve a wake-up by the power button of my device. The powerbutton is connected to PWR_WKUP6 (pin PB5). The button has a 100k pull-up. I verified the voltage levels with a scope (3.3V --> 0V).I checked with the examples in the STM32CubeU5 Github repo. This my code: void LowPower::EnterStandbyMode(void) { PrepareForLowPower(); __disable_irq(); for(int i = WWDG_IRQn; i <= JPEG_IRQn; i++) { NVIC_ClearPendingIRQ((IRQn_Type)i); } /* Enable WakeUp Pin PWR_WAKEUP_PIN6 connected to PB.5 */ HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN6_LOW_0); /* Clear all related wakeup flags*/ __HAL_PWR_CLEAR_FLAG(PWR_WAKEUP_FLAG6); HAL_DBGMCU_DisableDBGStandbyMode(); /* Enter the Standby mode */ HAL_PWR_EnterSTANDBYMode(); // If entry fails (e.g., if a debugger is attached), reset the system NVIC_SystemReset(); } I have a similar function for shutdown mode. I tried to clear all inte
Hello,Normally we use HAL_GetTick() in HAL driver.I want to use GetTick() in STM32 LL driver. How to get and use GetTick() in STM32 LL driver?
..
Hello there, I'm trying to create an external loader for my stm32h7s7-dk board via MCE.I followed this https://www.youtube.com/watch?v=JxhKmVUB2Ws&list=PLnMKNibPkDnFQXYK0ztHV9iMVS6EAtKpD&index=10 tutorial series and i check the github repo of this project. But the repo and the video series can be different. The instructor might add some new things. But the methodlogy cant work. Its really stupidly. The loader writes only 0x00 to flash for app size.Im adding my ss of the mem_copy, mem_write and mpu init codes here. Please help me.
Cube setting is OK!First run OK!if(HAL_OK != HAL_UART_Transmit(CO_INFO.channel, co_dma_tx_data, send_len, 0xFFFF)) { DEBUG_PRINT("CO MODULE SEND DATA ERROR!!\r\n"); } Then setting OK!if(HAL_OK==HAL_UART_AbortReceive(CO_INFO.channel))if(HAL_OK==HAL_UARTEx_ReceiveToIdle_DMA(CO_INFO.channel,(uint8_t*)CO_INFO.RX.data,CO_UART_BUF_LENGTH)) But second run Fail !!if(HAL_OK != HAL_UART_Transmit(CO_INFO.channel, co_dma_tx_data, send_len, 0xFFFF)) trace HAL_UART_Transmit() functionif (huart->gState == HAL_UART_STATE_READY) the huart->gState value always 0x33so always return HAL_BUSY
Hi there!I already configured LwIP package and make it work on a NUCLEO-H755ZIQ following @Adam BERLINGER gude in the Knowledge base section:https://community.st.com/t5/stm32-mcus/how-to-create-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308 Well, trying to move the LwIP heap memory to a larger memory location I experienced a n unexpected issue:When I locate the heap in the DTCMRAM of the M7 core, communication will no more work at all(no ping, no tcp connection...).Locating it in D1 (AXI RAM) or D3 RAM all work as expected.I checked also the MPU configurations ad all seems correct, it seems that in DTCMRAM there is a different behavior. Just for my comprehension, there is something wrong in locating such heap into the DTCMRAM?Thanks in advance! iTTy
ST moderator: updated the title with the MCU part number. I am working on an embedded web interface hosted on an STM32-based system using lwIP. The interface serves basic HTML pages along with multiple product images for browsing and preview.On pages that contain several high-resolution images, similar in structure to pages like this: I notice slower load times and occasional rendering delays when everything is served directly from the MCU web server.For those with experience building embedded web servers on STMicroelectronics platforms, what techniques have you found most effective for improving image delivery and overall page responsiveness?Examples could include compression approaches, external memory usage, filesystem choices, or caching strategies.Looking for practical guidance based on real implementations.
I have an STM32H563 running FreeRTOS and LwIP with the netcon interface.For the most part its working OK, however when I send a lot of data (around 250KB/s for a few seconds) it crashes with a HARD_FAULTIt looks like the memory (pbufs) are being corruptedThe driver (etherentif.c) is based on LwIP/LwIP_HTTP_Server_Socket_RTOS/Src/ethernetif.ctaken from the STM32H7 cubeIs there an updated driver for the STM32H5 or one with known reliability ?
Expected Log using UART :[BOOT] UART initialized successfully[BOOT] Starting ThreadX kernel[NET] NetX Duo initialization started[NET] IP stack and protocols enabled[TX] ThreadX kernel running[NET] NetX application thread running[NET] Network stack ready[NET] Static IP: 192.168.1.1But the it breaks at [NET] NetX application thread running and i have found the following error using debugger and stucked at the error, so need guidance on bring up of Ethernet and perfect log using the UART I want to send the data from the pc to the STM Board through the ethernet [using] TCP and store the data at some memory so initially i want to bring up the flow and stucked at the error. main.c/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2026 STMicroelec
Hi,I want to kick ADC1 IN5 with the Timer TIM2. I'm working with CubeIDE.I select:ADC1 -> ADC_Regular_Conversion_Mode -> External Trigger Conversion Source -> Timer 2 Trigger Out eventTIM2 -> Trigger Output (TRGO) Parameters -> Update EventBut ADC1 does not run, Data Register is constant.If I kick ADC1 by software everything is fine, I get some noisy numbers.TIM2 is running, the count register is counting.Why does TIM2 not kick ADC1 by the TRGO event?This setup used to work fine on STM32F303. What do I miss on the STM32F429?THX CheersDetlef
Hi,I am currently facing an issue while connecting to the STM32 board using STM32CubeProgrammer. The tool consistently shows the error: "Unable to read device ID from ROM table."I have already tried the following troubleshooting steps:Performed a hardware/software/core reset using the RESET buttonVerified that all required supply voltages are correctChecked the hardware connectionsDespite this, the programmer is still unable to establish communication with the M7 core via ST-Link. It appears that the device is not being detected properly, and at the moment the board has become unusable.Could you please guide me on possible causes or additional steps I can take to resolve this issue? I would be happy to provide any further information if required.Thank you for your support.Best regards,Prathiksha
I am using the ST Host library version 3.54 on an STM32F769 device, supporting HID devices. I am using the internal Full Speed phys.I have a USB mouse connected and all works fine, however I would like to save power when the mouse is not being used by putting it into suspend. I cannot see any support for this in the ST middleware, so I asked Ai and got this:USBH_StatusTypeDef USBH_LL_Suspend(USBH_HandleTypeDef *phost) { HCD_HandleTypeDef *hhcd = phost->pData; USB_OTG_GlobalTypeDef *USBx = hhcd->Instance; uint32_t USBx_BASE = (uint32_t)USBx; USBx->GINTMSK |= USB_OTG_GINTMSK_WUIM; /* Suspend the port */ USBx_HPRT0 |= USB_OTG_HPRT_PSUSP; return USBH_OK; }This works fine - the mouse powers down and there is a useful drop in power consumption.However, I cannot get the port out of standby. This is the code Ai gave me for the Host to awake the port:USBH_StatusTypeDef USBH_LL_Resume(USBH_HandleTypeDef *phost) { HCD_HandleTypeDef *hhcd = phost->pData; U
Hello, I wonder that examples could apply Nucleo-H753ZI board... There are some examples about H743 or another one but no example for Nucleo-H753ZI board. I understand 48k-2channel-16bit can be implemented easily, But I wonder that Nucleo-H753ZI can make 44.1kHz sampling or, 24bit input or, 4 ~ 6 channel input. I can't solve just 48kHz-24bit-2Channel input's buffer underrun problem, 44.1kHz-16bit-2Channel buffer underrun, and recognizing USB3300 ULPI to Nucleo-H753ZI. Is it can be done by this board? Or, Is there any spec making limits? edit: related thread <Nucleo - H753ZI> + <USB3300 ULPI> connecting to P... - STMicroelectronics Community
Hello everyone,I’m working with the STM32U5G9J-DK2 and trying to implement a Bootloader + XIP (Execute-In-Place) application architecture using the external flash.Target setup:A minimal bootloader running from internal flashThe main application linked to and executing from external flash (memory-mapped at 0x90000000)The main motivation is to free internal flash and validate this approach for a future MCU with very limited internal flash.What I’m specifically looking for help withProper CubeMX / .ioc configuration for the bootloaderWhich peripherals must be enabled (RCC, PWR, ICACHE, OSPI, etc.)Which peripherals should not be enabled to avoid conflicts with the XIP appAny STM32U5-specific gotchas when initializing OSPI for XIPProper configuration of the application projectRecommended changes to the application .iocWhat initialization should be removed from the app (HAL_Init, clock, OSPI, FLASH, etc.)Reference samplesSTM32Cube examples that demonstrate a full bootloader + XIP app flow on
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.