Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello,I am working on a UVC (USB Video Class) project using a Nucleo-H755ZI-Q board and Azure RTOS USBX.I have successfully tested the ux_device_video (FS) example on the board. Now, I am trying to migrate this example to High Speed (HS) using an external USB3300 ULPI PHY.[Current Status]Hardware: Nucleo-H755ZI-Q + USB3300 (ULPI interface).Software Stack: X-CUBE-AZRTOS-H7 (USBX).Enumeration: The device is correctly recognized as a "Camera" in the Windows Device Manager without any yellow exclamation marks.Issue: When I open the Windows "Camera" app, it fails with the following error code:0xA00F4243 <CameraReservedByAnotherApp>(0xC00D3704)[Modifications Made]Modified the USB configuration to use High Speed with external PHY (ULPI).Updated the USBX descriptors (Device Descriptor, Configuration Descriptor) to support HS, including the Device Qualifier Descriptor.Ensured the ULPI pins are correctly configured in the HAL initialization.[Observations]The FS version works perfectly. The
Hi, i want to use STM32U385RG (NUCLEO-U385RG-Q) to read and write files on SD using SDMMC (1 bit mode) interface, with FileX in standalone mode. I've successfully tested Fx_File_Edit_Standalone (SRAM) example and SD_ReadWrite_DMA (1 bit mode) example. Following my MX_FileX_Process function: VOID MX_FileX_Process(VOID) { UINT status; ULONG bytes_read; CHAR read_buffer[32]; CHAR data[] = "This is FileX working on STM32"; /* Start application */ printf("FileX Edit Standalone Application Start.\n"); /* Open the sram_disk driver. */ status = fx_media_open(&sram_disk, "STM32_SDIO_DISK", fx_stm32_sd_driver, (VOID *)FX_NULL, (VOID *) fx_sd_media_memory, sizeof(fx_sd_media_memory)); /* Check the media open status. */ if (status != FX_SUCCESS) { Error_Handler(); } printf("SD card opened.\n"); /* Create a file called STM32.TXT in the root directory. */ status = fx_file_create(&sram_disk, "STM32.TXT"); /* Check the create status. */ if (status != FX_SUCCESS)
Hello Everyone, This is the code that I have tried many times and tried to debug as well. I have attached a snapshot of the error of the debugging section (disassembly ). I have not been able to understand what of my code leads to this error , and how to solve this? /* 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. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include
Spent a lot of time on this and found that ST's code omits a key SCSI command which windoze and linux either do not issue or if they do they are not bothered by a non-response. Details around here https://www.eevblog.com/forum/microcontrollers/any-way-to-do-a-fat16-usb-msc-drive-in-2mb-flash/msg6206067/#msg6206067
Dear ST Community, I hope you are doing well. I am currently working with the STM32U5 development board and would like to integrate an SD card module using SPI communication. However, while configuring my project in STM32CubeMX / CubeIDE, I was unable to find the FATFS middleware option under the middleware section. My goal is to use FATFS with an SD card operating in SPI mode. Could you please guide me on how to enable or integrate FATFS for SPI-based SD card communication on the STM32U5 series? If manual integration is required, I would appreciate any official documentation, example projects, or recommended procedures.
Dear Team, I am currently working on an STM32F207-based custom board using Ethernet (RMII with LAN8742A PHY) and LwIP in NO_SYS (bare-metal, no RTOS) mode. I am facing an issue where Ethernet and UART are not functioning correctly in parallel. Project Details: MCU: STM32F207 PHY: LAN8742A (RMII mode, PHY address = 1) LwIP Operating Mode: NO_SYS = 1 (No RTOS) DHCP enabled (also tested with static IP) UART2 used for debug output (blocking HAL_UART_Transmit) Issue Description: When Ethernet (LwIP) is enabled and initialized using MX_LWIP_Init(), UART output stops working. Even simple debug prints placed before Ethernet processing in the main loop are not printed. However: If Ethernet/LwIP is disabled, UART works normally. If MX_LWIP_Init() is commented out, UART works. Ethernet link LEDs indicate that PHY is active. This suggests that enabling Ethernet + LwIP in NO_SYS mode is interfering with system execution or blocking during initialization or processing. Observatio
https://controllerstech.com/stm32-ethernet-hardware-cubemx-lwip-ping/?utm_source=chatgpt.comI followed steps of above website data based to configure Ethernet on stm32h753zi but still ping is failing i cant able to find the exact error can anyone help to tell the exact configuration of this board
Hello,I am trying to find the project used to create the code loaded on my Nucleo-H563ZI when I first received it.I see several references stating it should be in a Demonstration folder, however I don't see that folder in:...\STM32Cube_FW_H5_V1.6.0\Projects\NUCLEO-H563ZIThat folder has the following folders:ApplicationsExamplesExamples_LLExamples_MIXROT_ProvisioningTemplatesTemplates_LL
For context, I am new to both USB programming and the STM products (and tools), so I apologize in advance for my ignorance. I am working with an old, existing system, which utilized a USB connection to a processor/EEPROM to store information (a dongle). As some of the parts have gone end-of-life, we are looking to move to new hardware. The hope is to mimic the software running on the old hardware so that the new part will work with existing systems in the field, as well as new products. Our existing system runs on Linux with a custom driver communicating with the dongle, and from what I can tell has been coded up as a "vendor device" instead of a "class device". Anyhow, the engineering department selected the STM32C071RBT6 as an appropriate part and have provided a prototype which I am using for development along with the following:STM32CubeIDE v2.0.0STM32CubeMX v6.16.1STM32C0 series v1.4.0 To get started w
I have a STM32H732 processor connected to a ethernet switch with port based VLAN support.I use the processor to connect to two different interfaces which are separated in the switch.I wanted to be able to access the same two TCP ports in the processor from both interfaces.So I configured ETH_L3_FILTER_0 and ETH_L3_FILTER_1 with the two different IP-addresses used on the two interfacesAnd the ETH_L4_FILTER_0 and ETH_L4_FILTER_1 with the two different ports.But that did not work as I hoped.It looks like the L3_FILTER_0 and L4_FILTER_0 are used as one filter. and FILTER_1 as another.And maybe that is as intented but it is not super clear in the documentation.I may have to add that I have found and read...Is this correct or is there perhaps a way to use the L3 and L4 as separate filters so that I can get four different filters allowing two IPs and two Ports in any combination of ports and IP?Best regards
Hello,Where can i find the sources for MX66UW1G45G_STM32N6570-DK-OBL.bin and MX66UW1G45G_STM32N6570-DK.bin? The stm32-external-loader repository does not seem to have these?Thanks!
I want to generate an SBOM (Software Bill of Materials) for my STM32 firmware project, specifically targeting the STM32H733 microcontroller. I have tried searching for guides or examples of how others have done this for similar projects, but I haven’t been able to find any detailed resources. Any guidance or references on generating an SBOM for my firmware project would be greatly appreciated.
Hello,I have STM32F7 controller, using Free RTOS, trying to interface external NOR flash, S29GL128S10TFIV13.So at first, I was trying to do normal read/write operation, but here what I observed,void FMC_Init() { hnor2.Instance = FMC_NORSRAM_DEVICE; hnor2.Extended = FMC_NORSRAM_EXTENDED_DEVICE; /* hnor2.Init */ hnor2.Init.NSBank = FMC_NORSRAM_BANK2; hnor2.Init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE; hnor2.Init.MemoryType = FMC_MEMORY_TYPE_NOR; hnor2.Init.MemoryDataWidth = FMC_NORSRAM_MEM_BUS_WIDTH_16; hnor2.Init.BurstAccessMode = FMC_BURST_ACCESS_MODE_DISABLE; hnor2.Init.WaitSignalPolarity = FMC_WAIT_SIGNAL_POLARITY_LOW; hnor2.Init.WaitSignalActive = FMC_WAIT_TIMING_BEFORE_WS; hnor2.Init.WriteOperation = FMC_WRITE_OPERATION_ENABLE; hnor2.Init.WaitSignal = FMC_WAIT_SIGNAL_DISABLE; hnor2.Init.ExtendedMode = FMC_EXTENDED_MODE_DISABLE; hnor2.Init.AsynchronousWait = FMC_ASYNCHRONOUS_WAIT_DISABLE; hnor2.Init.WriteBurst = FMC_WRITE_BURST_DISABLE; hnor2.Init.Continuo
I have a dual core application running on an STM32H7 where I would like: the CM7 to tell the CM4 to enter stop modehave the CM4 enter stop modeat a later time, have the CM7 wake the CM4 from said stop modeIn the CM4 code, I'm doing this: HAL_PWREx_ClearPendingEvent(); HAL_PWREx_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFE, PWR_D2_DOMAIN);The problem is that HAL_PWREx_EnterSTOPMode is immediately exiting. I use the HSEM library for synchronizing all communication between the CM7 and CM4. I thought that maybe I had a case where the CM7 was notifying the CM4 via the HSEM library when I didn't want it to, causing it to wake. So as a test, I added an infinite loopwhile (1);after notifying the CM4 so that the CM7 wouldn't execute anything else. I know that debugging can/will wake the core. To confirm that the CM4 was getting the notification and calling the above HAL_PWREx code, I turn on an LED, delay for 5 seconds, then make the calls. After the enter function returns,
I am using STM32H743 controller, LAN8720 Ethernet chip, and Keil5 programming softwareI am using the IAP function of the network port and need to write the received data to FLASH. I found that the data read at that address after writing was modified. I found during debugging that after the "netif_add" function in LWIP initialization was executed, the data of my flash address was modified. May I ask what happened.Here is my MPU configuration, I'm not sure if it's related to MPU configuration uint8_t MPU_Set_Protection(uint32_t baseaddr, uint32_t size, uint32_t rnum, uint8_t ap, uint8_t sen, uint8_t cen, uint8_t ben) { MPU_Region_InitTypeDef MPU_Initure; HAL_MPU_Disable(); // 配置MPU之前先关闭MPU,配置完成以后在使能MPU MPU_Initure.Enable = MPU_REGION_ENABLE; // 使能该保护区域 MPU_Initure.Number = rnum; // 设置保护区域 MPU_Initure.BaseAddress = baseaddr; // 设置基址 MPU_Initure.Size = size; // 设置保护区域大小 MPU_Initure.SubRegionDisable = 0X00; // 禁止子区域 MPU_Initure.TypeExtField = MPU_TEX_LEVEL0; // 设置类型扩展域为lev
Hi ST Community, I'm wondering if there's a sample project for a UART Bootloader for the NUCLEO-H755ZI-Q series. Thanks for your support
tl;dr - HAL_UART_Receive_XXX, HAL_UART_Transmit_XXX == happiness; HAL_UART_Transmit_XXX, HAL_UART_Receive_XXX == misery. The call to HAL_UART_Receive_XXX causes the transmission started by HAL_UART_Transmit_XXX to stall in both interrupt and DMA modes.Longer story:This affects both interrupt-driven and DMA operation, which is why I've added the DMA label.I am using FreeRTOS, and implementing a serial protocol that, while practically half-duplex in behavior, is written in a full-duplex form. What I mean is the protocol doesn't really expect both sides to be transmitting at the same time, but the code isn't written to prevent it. Theoretically parts of the protocol could overlap.The typical behavior for a transmission is to first call HAL_UART_Receive_DMA(..) to prime the receiver for a response, and then call HAL_UART_Transmit_DMA(..) to send a message.When the calls occur in that order, everything works perfectly.Unfortunately, sometimes the task responsible for
Problem:HAL_FLASHEx_Erase returns error 0x20000, and HAL_FLASH_Program does return HAL_OK but does not actually write any data to the flash.Goal: Erase and install new firmware on flash on its own inside the bootloader.I am developing a bootloader for the STM32H533RET6. I have TrustZone enabled, and configured the secure and non-secure regions. I am trying to erase and write to the non-secure part of the flash, from the bootloader which is secure (and separate from the actual application). I have disabled any write protection that I am aware of inside the option bytes. I also use the Memory Management Tool inside CubeMX to configure the secure and non-secure regions. For the non-secure region of the flash I have set "Access Permissions" to "RW by any privilege level". I do have a Flash watermark set on bank 1 but this does not cover any of the non-secure flash regions. No watermark is set on bank 2. Below is the code I use to erase and write to a sector on the flash:uint32_t Erase
Hello, While working with STM32F446RET6, I encountered a problem with I2C1. When using HAL_I2C_Mem_Read_IT(), an error occasionally occurs in the form of sending 0x00 instead of the address with the read bit after Repeated Start. The error seems to only occur with O3 optimization. I2C Configuration: NVIC Configuration: Only TIM1 update interrupt (TIM10 not used), DMA1 stream2 (SPI3_RX) and DMA1 stream5 (SPI3_TX) have higher priority than I2C1. Here is an example of a correct signal: The signal with error and I2C_Flush_DR() looks like this: static void I2C_Flush_DR(I2C_HandleTypeDef *hi2c) { /* Write a dummy data in DR to clear TXE flag */ if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXE) != RESET) { hi2c->Instance->DR = 0x00U; } } The signal and I2C_Flush_DR() looks li
Hello everyone,I am working with the NUCLEO-H723ZG board and attempting to establish Ethernet communication using TCP/IP. The firmware was built and flashed successfully using STM32CubeIDE version 1.19.0.However, I am facing issues with basic network connectivity. Below are the details of my setup and observations:Setup DetailsBoard: NUCLEO-H723ZGIDE: STM32CubeIDE v1.19.0Ethernet stack: LwIPPHY interface: RMIIFlashing tool: ST-LINK (onboard)Test performed: Ping test from PCObserved BehaviorThe Ethernet port LEDs (orange and green) remain solid ON after connecting the Ethernet cable.Ping requests consistently fail (Request timed out).No response is received from the board.Troubleshooting Already PerformedTested both Static IP and Dynamic IP (DHCP) configurations.Verified IP address, subnet mask, and gateway settings.Tried multiple Ethernet cables to rule out cable-related issues.Rebuilt and reflashed the project multiple times.Verified that the firmware flashes successfully and runs wit
Hi everybody,I'm learning to use the ADC in a STM32F411CEU in Continuous Mode and Single Conversion with Polling. When the code is downloaded to the MCU everything runs ok (I mean, when the MCU runs by itself without any ST-Link connected).The problem appears when I try to execute the code in a debugging session. The first time the function HAL_ADC_PollForConversion() is called, the result is HAL_OK, but in the next iterations the functions doesn't return HAL_OK anymore.I know, I know, with Continuous Mode I should be using DMA. But I'm trying to learn the different operation modes (single conversion, scan mode, polling, DMA, etc.)One thing I've found is that if I set the ADC parameter End Of Conversion Selection = EOC flag at the end of all conversions instead of End Of Conversion Selection = EOC flag at the end of single channel conversion , then the function HAL_ADC_PollForConversion() works ok in all the iterations when debugging. Can anybody explain m
I am trying to create a simple UDP server using the NUCLEO-H743ZI2 board. I will port this to a similar microcontroller in the same family (STM32H750B) once I get it working. I am able to build the example code from this repository: https://github.com/stm32-hotspot/STM32H7-LwIP-Examples/tree/main/STM32H743_Nucleo_ETHIt successfully responds to pings and shows up in my router device list. I used:STM32CubeIDE Version: 1.17.0 STM32Cube FW_H7 Version 1.12.1.Following the instructions in the README, I attempted to build the application from scratch on the NUCLEO board, but I haven't been able to get it to respond to a ping despite a few days of troubleshooting. Can someone tell me if there is something wrong with my configuration file?
Hi, two years ago I posted this thread:Solved: How to set "Don't fragment" flag LWIP short TCP pa... - STMicroelectronics CommunityNow I just was reviewing it for another application that truly needed to send more data and was not allowed to wait 50ms for every sent packet.Final root cause explanationThe 415-byte packets were being ACKed after ~40–50 ms because I was only sending one TCP segment at a time and waiting for it to be acknowledged within my application code, before sending the next one.This behavior is due to the TCP Delayed ACK algorithm implemented by Windows. When Windows receives a single TCP segment smaller than the MSS, it does not immediately send an ACK. Instead, it waits approximately 40–50 ms before acknowledging it.This behavior is described in RFC 1122, section 4.2.3.2 ("When to Send an ACK Segment"), which explains that a TCP implementation may delay sending an ACK in order to reduce protocol overhead.If a second TCP segment is received before the delayed ACK t
Controller: STM32F303ZEWritten a function to read ROM memory as belowvoid ServiceROMRead(tst_ServiceDataset* ptrService){// Variable holds ROM addressDWORD ROMAdd = DIAG_ZERO;// Flag represents JUP service trigger state.RFJupExeFlag = TRUE;// Address from where the data needs to be readROMAdd = ptrService->DataAddr;//Check for the EEPROM addressif((ROMAdd > ROM_ENDADD)) //ROM_ENDADD is 0x0807AFFF{// wrong addressptrService->State = WRONG_DATA;//Indicator for wrong address passed}else{ptrService->ptrData = (BYTE *) ptrService->DataAddr;}}When I pass ptrService->DataAddr as 0x8000020 or 0x8000080 to the above function ServiceROMRead from my application it is sometimes leads to a system resetApplication is placed at 0x08003000 to 0x0807AFFFBootloader is placed at 0x08000000 to 0x08002FFF1. Why is the controller resetting when I try to read ROM from address 0x8000020 or 0x8000080?2. Will trying to read data from address 0x8000020 or 0x8000080
HelloI have a STM32H7R3V8T6 and want to use a few peripherals and GPIOs. However, I don't manage to see an output with my analyzer. The peripherals themselves seem to work: An XSPI receive for example does receive some dummy bytes and takes exactly the required time for the transfer (measured with the cycle counter), but the pins do not show anything.I reduced my code and came up with this simple demonstration of how I initialize a GPIO:int main(void) { SystemCoreClockUpdate(); HAL_Init(); SystemClock_Config(); __HAL_RCC_GPIOB_CLK_ENABLE(); GPIO_InitTypeDef GPIO_InitStruct = {0}; GPIO_InitStruct.Pin = GPIO_PIN_12; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); while (1) { HAL_GPIO_TogglePin(GPIOB, 12); HAL_Delay(10); } }The debugger shows that I reach the loop. The registers of the peripheral seem to be correct, but the pin doesn't toggle. This als
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.