Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
I am using STM32N657 with USBX (MSC device).The function ux_device_stack_initialize() is returning UX_ERROR, and after debugging inside USBX I found that the failure occurs when USBX tries to allocate endpoint transfer buffers. The failing code inside USBX is: #if UX_DEVICE_ENDPOINT_BUFFER_OWNER == 0 /* Obtain some memory. */ endpoints_pool -> ux_slave_endpoint_transfer_request.ux_slave_transfer_request_data_pointer = _ux_utility_memory_allocate(UX_NO_ALIGN, UX_CACHE_SAFE_MEMORY, UX_SLAVE_REQUEST_DATA_MAX_LENGTH); /* Ensure we could allocate memory. */ if (endpoints_pool -> ux_slave_endpoint_transfer_request.ux_slave_transfer_request_data_pointer == UX_NULL) { status = UX_MEMORY_INSUFFICIENT; //0x12 break; } #endif So the device stack initialize fails because of UX_MEMORY_INSUFFICIENT. My current USBX memory setup: #define UX_APP_MEM_POOL_SIZE (128 * 1024) // 128 KB total pool#define USBX_DEVICE_MEMORY_STACK_SIZE (5 * 1024) // only 5 KB given to USBX I allocate memory f
I want to stop generating a PWM signal after 22 clock edges. It seems like the TIMx_RCR register (repetition counter register) should work for this. My code started from the CubeMX generated code but I have had to remove a lot of it for performance reasons. I am running an STM32H523 with a SYSCLK of 250MHz. The PWM is about 650 KHz so I need to disable the output about 33 us after I start it. That timing is a little tight to do with an interrupt counting down from 22 to zero; however, that seems to be exactly what the TIMx_RCR register does in hardware. My current code uses the HAL_TIM_PWM_PulseFinishedCallback() function but it seems that it is being called for every pulse, not every 22 pulses. Does anyone have some pointers or code examples for how to setup TIM1 on an STM32H523? I am using STM32CubeIDE v 1.19.0 (because 2.0.0 broke my build).
Hi everyone,I’m working with the STM32WB05KZ using the BLE RC Peripheral example from STM32CubeMX.I added a push button on PA1 and an LED on PA0.My goal:Read PA1 button stateTurn ON LED on PA0 when button is pressedSend BLE notification to the central deviceContinuously print PA1 state every 1 second on the serial monitorHere is the code snippet:APP_DBG_MSG("SW1 OK\n"); uint32_t lastPrint = 0; // Print every 1 second if ((HAL_GetTick() - lastPrint) >= 1000) { lastPrint = HAL_GetTick(); uint8_t state = HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_1); APP_DBG_MSG("PA1 State = %d\n", state); } while (1) { // Needed for BLE MX_APPE_Process(); } The output I get is:aci_gap_configure_filter_accept_and_resolving_list command ==>> End BLE_Init function Services and Characteristics creation Success: aci_gatt_srv_add_service command: RC_LR_Periph End of Services and Characteristics creation Success: aci_hal_set_radio_activity_mask command==>> Success: aci_gap_set_adver
HI all i have been working with LTDC to drive an external RGB parallel display . i made it working by placing the framebuffer inside internal RAM . i got output with good update speed. but when i try to incoperate FREERTOS with this project the output is gone . any one encountered such issues like this , any solution for this now? ;)
Hi,I'm trying to implement a simple tickless idle on my STM32H7 running on the CM7 core i use TIM1 for TimeBase.I followed the example from this video:https://www.youtube.com/watch?v=hVlpf1Rm4QoMy question is how it works, because the default implementation in FreeRTOSConfig.h is:Why is time to sleep set to __x__ = 0; ???#if configUSE_TICKLESS_IDLE == 1 #define configPRE_SLEEP_PROCESSING(__x__) \ do { \ __x__ = 0; \ PreSleepProcessing(__x__); \ }while(0) #define configPOST_SLEEP_PROCESSING PostSleepProcessingWith this implementation and my PreSleepProcessing and PostSleepProcessing functions I use an LPTIM to wake up (similar to the video):__weak void PreSleepProcessing(uint32_t ulExpectedIdleTime) { /* place for user code */ HAL_GPIO_WritePin(LED_1_GPIO_Port, LED_1_Pin, GPIO_PIN_SET); //HAL_TIM_Base_Stop_IT(&htim1); HAL_SuspendTick(); // suspend SysTick timer HAL_LPTIM_TimeOut_Start_IT(&hlptim1, 0xFFFF, ulExpectedIdleTime); // enable interrupt from low-power tim
Hello.I got a STM32U599J-DK engineering sample from the ST official warehouse (don't ask me how I get this cuz I don't know either).MB1829-U599 NJQ-B01A223400084I searched the st.com and was unable to locate its resources.(user manual, datasheet, data brief, OBD binary).I wonder if any ST employee got these resources and send them to me if you please as I wish to reuse this board to it's full extent.Or, are its resources compatible with the STM32U5A9J-DK's? If so, please send me an original OBD demo of the STM32U599J-DK if available.Thanks in advance.
In your middle-ware for the usbpd i can't find any of the definition for the functions in usbpd_core.h.https://github.com/STMicroelectronics/stm32-mw-usbpd-core Example* USBPD_PE_SVDM_RequestMode* USBPD_PE_SVDM_RequestModeEnter* USBPD_PE_SVDM_RequestModeExit Can't be found anywhere in the repo. It looks like you compiled them all down to assembly files. Is there a reason for this or am i missing something?
Hi Everyone,I already have IPv4 via DHCP working on STM32H753ZI with Azure RTOS (ThreadX + NetX Duo). I need help getting IPv6 via SLAAC (stateless autoconfiguration) working. Best Regards,Divya P
Hello, STM employees,I have bought the NUCLEO-N657X0 board with the intentions of using its USB on the go module. I have previous experience with USB with STM32f401, where I had to employ a single function CDC_Transmit(), and STM32CubeIde and Hal did the rest. It was simple and easy to implement. Currently Im struggling with doing the same with the N6 MCU, but proved impossible. I've tried all tutorials found on your site and community available ones, but could not find a single example that would send "Hello World!" to my PC. I'm sure my board works as I've run a basic blink sketch from the external ROM.Please, if you could add the same middleware for f401 to n657, that would be great.
Hi ST Team,I need to implement USB Host Printer support on STM32F767 using USBX.I'm trying to send PCL6 (HP LaserJet) print jobs via USB.Challenge: No Host Printer example exists in stm32-usbx-examples(only Device Printer and Host MSC/CDC).What I need:1. Is USBX Host Printer class available? Any code?2. How to send binary PCL6 data to printer (USB Bulk OUT)?3. CubeMX configuration for USB Host (FS/HS)?4. Printer enumeration and status read examples?5. Any complete working reference project?Current Setup:- STM32F767ZI + FreeRTOS + USBX- HP LaserJet printer (USB)- Using HP's jetlib for PCL6 generationPlease advise or point to relevant docs/code.Thanks,Madhu07
STM32CubeMX v6.5.0 STM32Cube FW_F4 V1.27.0USB_FS HOST CDCusbh_cdc.hfunction static void CDC_ProcessReception(USBH_HandleTypeDef *phost)line 767 if (((CDC_Handle->RxDataLength - length) > 0U) && (length > CDC_Handle->DataItf.InEpSize))fix: if (((CDC_Handle->RxDataLength - length) > 0U) && (CDC_Handle->RxDataLength > CDC_Handle->DataItf.InEpSize))
Hi all,I’m working on a custom bootloader for STM32F7, which performs OTA updates using TCP/IP (Ethernet and/or WINC3400 WiFi). The bootloader writes the new firmware to flash, then attempts to jump to the application using the standard sequence: cleaning and disabling caches, setting VTOR, setting MSP, and jumping to the application's reset handler.The Problem:If the application binary is small, everything works: the bootloader jumps and the app runs as expected.If the application binary is larger (for example, over X KB/MB), the bootloader appears to complete the OTA and jump, but the application does not start (no output, no main runs, or immediate lockup/hard fault).What I Have Tried:Verified that the full image is written to flash (checked total bytes and flash content matches binary).Cleaned and disabled D/I caches before jump.Set VTOR and MSP to the application address.Disabled all interrupts, deinitialized all peripherals, shut down the WINC3400, and reset all related GPIOs/SPI
Hello ST Team,I'm implementing robust Ethernet on STM32H743ZI. Need technical guidance on:PART 1: BANDWIDTH VERIFICATIONQuestion 1.1: How to verify link speed?How to check link speed (100 Mbps)?Question 1.2: Bandwidth testing methodology?Create a TCP socket, send a large file to the PC?Expected bandwidth on STM32H743?Network overhead (TCP/IP stack)?Optimal packet size for testing? Also, how can I debug this to check if I am using full bandwidth and if my link is down during transmission?
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code and a linker script content. Please read this post: How to insert source code. Hello, I am working on STM32H753ZI (NUCLEO-H753ZI board) with NetX Duo.I am trying to place all Ethernet DMA descriptors, RX/TX buffers, and NetX packet pool in D2 SRAM, but the system always ends up in a Hard Fault right after starting the Ethernet interface. I have already followed the ST AN4838 guidelines and forum suggestions, but the fault still occurs. 1. My linker script sections .NetXPoolSection (NOLOAD) : { . = ALIGN(32); KEEP(*(.NetXPoolSection)) } >RAM_D2 .RxDescripSection (NOLOAD) : { . = ALIGN(32); KEEP(*(.RxDescripSection)) } >RAM_D2 .TxDescripSection (NOLOAD) : { . = ALIGN(32); KEEP(*(.TxDescripSection)) } >RAM_D2 .RxBuffSection (NOLOAD) : { . = ALIGN(4); KEEP(*(.RxBuffSection)) } >RAM_D2 2. My variable placement ETH_DMADescType
I am working on a NUCLEO-H753ZI board and want to set up Ethernet 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 (TX/RX, MDC/MDIO, REF_CLK) LwIP middleware settings (heap size, pbuf pool, MEM_SIZE, etc.) Memory layout for D2 SRAM / AXI SRAM for LwIP heap, DMA descriptors, RX/TX buffers MPU region configuration for Ethernet and LwIP memory Generating code and linker settings Any tips to ensure that ping from PC works reliably Could someone provide a complete, detailed guide or example project showing how to configure CubeIDE and LwIP for NUCLEO-H753ZI?
STM32F429ZI Ethernet @180MHzRM0090 33.8.1 page 1197, ETH_MACMIIAR CR: max value is 100 150-168MHz HCLK/102Is this a print error (other micros in the family can only reach 168MHz) or the controller is not specified to work at 180MHz ?Thx
Hello ST Community,I'm currently developing a project on STM32H743 using TouchGFX 4.25.0 (RGB LTDC interface, framebuffer in external 16MB SDRAM) and LWIP + FreeRTOS (TCP client mode over Ethernet RMII). Everything works fine when TouchGFX is not included. However, after adding TouchGFX to the project, I'm facing strange Ethernet instability.:magnifying_glass_tilted_left: Observations:Without TouchGFX:TCP Client connects to the server reliably.No reconnection or data loss observed.Using recv() with flags = 0 works flawlessly for long durations.With TouchGFX + LTDC + DMA2D:Frequent TCP reconnections start occurring.Happens especially when using lwip_select() + recv() mechanism.If I skip lwip_select() and use direct recv() with flags = 0, reconnections stop, but after some time communication lags or stalls.:light_bulb: Hypothesis:I suspect the problem lies in AXI bus contention between:LTDC/DMA2D accessing external SDRAM (for framebuffer)Ethernet DMA accessing DTCM/SRAM or other AXI slav
Moved from this thread. Why does attempting to compile this example result in these errors? ../../USBX/Target/ux_stm32_config.h:29:10: fatal error: stm32h5xx_hal.h: No such file or directory 29 | #include "stm32h5xx_hal.h" | ^~~~~~~~~~~~~~~~~
Hi everybody,I'm trying to make a bootloader in my STM32F446. The aim if this one is the possibility to update the firmware but with keeping the previous one in case of issue. So, I'll have two slots for firmware.For now, I have the following sectors in my flash :BOOTLOADER : 0x0800 0000 -> 0x0800BFFF (it only uses sector 0 & 1 for code, so I use last word of sector 2 (0x0800 BFFE & 0x0800 BFFF) to write a "magic word" which gives me the information, if we're currently running on SLOT 1 or 2).SLOT 1 : 0x0800 C000 -> 0x0800 3FFFSLOT 2 : 0x0804 0000 -> 0x0807 FFFFMy FW is running on slot 1. It receives the order to update, so it restarts, checks on which slot the new FM must be copied, writes into the flash, and starts again on new slot (and this is done at each update, so FM is running on SLOT1/2 alternatively).Everything works well, except the last step, it always run on slot 1 (even if all the code has been written in the slot 2).In the two first 32 bytes (0x0800 0000
Hello everyone,I am working with the STM32F746G-Discovery board and trying to send ADC sensor data to a cloud server over Ethernet using LwIP (RMII mode). The goal is to send a JSON payload via HTTP POST.What I have implemented so farEnabled Ethernet (RMII) in CubeMXEnabled LwIP (static IP)Enabled ADC1 and UART6 for debuggingGenerated code using AC6/GCCAdded JSON formatting + http_post() callIssues I am facing1) HardFault during LwIP initializationThe system crashes right after:MX_LWIP_Init(); netif_set_up(&gnetif);A HardFault occurs before DHCP/static IP becomes active.2) DMA descriptor memory placement errorsThe compiler/linker shows errors such as:DMARxDscrTab memory out of rangeaggregate value used where integer expectedThe descriptors are currently placed like this:ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection")));I suspect the MPU configur
I have a password obk file:$ xxd PasswordObkFile.obk00000000: 0001 fd0f 6000 0000 0000 0000 5e9b d65f ....`.......^.._00000010: e48e a17e 40ae 126f 76e7 c101 3a73 bf35 ...~@..ov...:s.500000020: c95d 4897 5c5d 1575 a719 8442 184a a46d .]H.\].u...B.J.m00000030: 8134 1172 7da0 dc9e 6418 6bb9 9072 89b5 .4.r}...d.k..r..00000040: aab4 b320 d26f ff5e a45d 8e3d 7750 0000 ... .o.^.].=wP..00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................00000060: 0000 0000 0000 0000 0000 0000 ............I am running my application with Trustzone disabled (TZEN=C3).I have a C array:static uint32_t obk_data[] = { 0x60000000, 0x00000000, 0x5e9bd65f, 0xe48ea17e, 0x40ae126f, 0x76e7c101, 0x3a73bf35, 0xc95d4897, 0x5c5d1575, 0xa7198442, 0x184aa46d, 0x81341172, 0x7da0dc9e, 0x64186bb9, 0x907289b5, 0xaab4b320, 0xd26fff5e, 0xa45d8e3d, 0x77500000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 };Using a function like this I am writing the contents to the OBK area using functions like this
Good evening,I have been trying to get the ethernet port of my NUCLEO-H755ZI-Q to talk to my PC - and have been failing to do so now for a week.I found this manual, but it is for Cube IDE 1.9 - and even after following the described steps I fail to talk via ethernet.I did also find this github repo where I used STM32H7-LwIP-Examples/STM32H745_Nucleo_M7_ETH - and after adapting the IPs somewhat communication via UDP did work.So I am rather sure my hardware does work.But the code generated by CubeMX 2.0 does not.Can anyone provide me with eithera short manual how to configure CubeMX correctly,a ready-made example project using the current CubeMX 2.0,or any other input?The current problem with my CubeMX 2.0 generated project is that during reception I get an ETH_DMACSR_RBU /* Receive Buffer Unavailable */inside theHAL_ETH_ErrorCallback En- or disabling ICache, DCache and MPU did not have any effect. I did move the RX_POOL to 0x30040000 as per the article and adapt
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code and a linker script content. Please read this post: How to insert source code. Hi im using STM32H745 MCU, in this for cache coherency for using DMA with any peripherals and using Clean and Invalidate data cache Functions will solve the full problem. if suppose if both the cache and MPU settings are disabled during this time also cache coherency will occur? MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x00; MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER0; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0x87; MPU_InitStruct.DisableE
We use STM32H743 to develop a system that needs to display a 1920 * 1080(8-bit pixel depths) graphic on LCD(driven by FPGA)Now our design is that STM32 reads a picture from the SD card, then decodes and sends it to the FPGA through FMC.We tried the software decoder, but it takes almost 5 seconds to decode just one PNG picture. The required time is only 50ms(about 3 FPS for each graphic, so 3*16ms = 48ms). I just learned that STM32H743 has an internal JPEG hardware decoder, but it seems this JPEG hardware decoder does not support 1920 * 1080? So the only way is to use an external decode chip, am I right?
I've an STM32U5A9J-DK-FreeRTOS and I was looking to a way to stream audio from the PC to the board and vice-versa using the USB-C on board port.I've seen that there's a CUBE extension X-CUBE-USB-AUDIO but it feels it is specifically for the STM32F7Also, on the CubeMX, opening the .ioc file, the only USB option I'm seeing is USB_OTG_HSSo, my question is, the USB-C port on the STM32U5A9J-DK board supports it?I'm also seeing the X-CUBE-AUDIO-KIT but again it feels compatible only for STM32H series
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.