Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello ST Community,I am working on a BLDC motor control project and would like to use STM32 Motor Control SDK (MCSDK) Workbench to generate firmware.My Hardware ConfigurationMotor Type: BLDCMotor Voltage: 48VMCU: STM32F405RGT6IssueWhen creating a new project in MCSDK Workbench, I cannot find my exact board/MCU configuration in the board selection list. Since the STM32F405RGT6 board is not available in the predefined options, I am unable to proceed with the standard project generation workflow.QuestionsIs STM32F405RGT6 officially supported by MCSDK Workbench?If yes, how can I create a project for this MCU when it is not listed in the board selection menu?Is there a way to add a custom board definition?Where can I obtain the required board configuration/JSON file (if available)?Can an existing board configuration be modified to support STM32F405RGT6?If MCSDK does support this MCU, what is the recommended procedure for configuring:PWM generationCurrent sensingHall sensors / Sensorless con
Hello ST Community,I’m developing a custom external loader for a GD25Q64E flash device and cannot get STM32CubeProgrammer to read/write/erase the external flash. I’ve attached a screenshot of the error reported by the programmer.What I’ve doneFollowed the ST tutorial “External QSPI loader how to” External QSPI loader how to - STMicroelectronics. Verified read/write/erase work when exercised from main.c — no errors there. When running the loader, I see a hardfault reported in the CubeProgrammer “HardFault” tab. There is a hardfault at the end of loader_src.c in init(); I’m not sure whether that is expected. Project uses SPI3 with DMA and interrupts to talk to the external flash. I have also tested this with just polling and verified read/writing/erase work when exercised from main.c Device and external flash infoFlash: GD25Q64E SPI instance: SPI3 (Polling)Questions: Any troubleshooting tips for getting the custom loader working with STM32CubeProgrammer (and diagnosing the hardfault sho
Hi all,I am using ST link v3 mini when i try to connect the controller using the st link v3 it is showing as theError : unable to get the core ID.But when i try to connect the controller using the DFU mode.i am able to connect to the controller and able to program the controller and option bytes are also AA(RDP 0)>. What is issue why i am not able to connect to the mcu using the St link (SWD) but able to connect to the controller using the DFU mode.is there anything i have to make changes in the cube programmer.
Hello ST Community,I am using an STM32G431RBT3 on a custom-designed PCB. The STM32 is used to control a DRV8334 3-phase motor driver for a blower motor application.I am facing a critical issue where the controller works correctly when using ST-LINK debugging, but it does not run correctly when the PCB is powered on standalone.HardwareMCU: STM32G431RBT3 Package: LQFP64 Motor driver: DRV8334 PCB: Custom-designed PCB IDE: STM32CubeIDE Programmer/debugger: ST-LINK MCU supply: 3.3 VProblemWhen I power the PCB directly without ST-LINK, the following happens:The STM32 starts executing the firmware. A GPIO that I set HIGH in main() becomes HIGH. The GPIO that I toggle inside the while(1) loop does not toggle. I added a GPIO HIGH operation inside HardFault_Handler(). That HardFault GPIO becomes HIGH.Therefore, it appears that the MCU reaches main() but subsequently enters HardFault before the normal while(1) execution continues.When ST-LINK is connectedIf I connect ST-LINK and program/debug/ru
Hii All,I am working on a custom PCB based on the STM32H747IITX MCU, and I am facing an issue with the Ethernet interface.The Ethernet connection is currently not working on my custom board. I have checked the basic hardware connections, but I am unable to identify the root cause.I have attached the Ethernet schematic of my custom PCB for reference.Could someone please help me review the schematic and suggest what I should check?In particular, I would appreciate guidance on:STM32H747IITX Ethernet RMII configuration and pin assignments PHY hardware connections and required configuration PHY reset and power-supply requirements 25 MHz/50 MHz Ethernet clock configuration PHY address and MDIO/MDC communication Required Ethernet termination/bias components STM32 Ethernet GPIO alternate-function configuration Any hardware-specific requirements or common mistakes when designing Ethernet on a custom STM32H747 board Recommended steps to debug whether the issue is on the MCU, PHY, clock, or PCB s
Support request: STM32WL33CC — DEEPSTOP average current rises well above datasheet spec, even within a single uninterrupted dwellPart / packageSTM32WL33CC (custom board, not a Nucleo/eval board).SummaryOn our custom board, DEEPSTOP average current starts near the expected low-µA range on entry but climbs over tens of seconds to a plateau of roughly 360–390 µA — two to three orders of magnitude above the datasheet's Table 13 "Current consumption in DEEPSTOP mode" figures (≈1.2–2.1 µA ICORE across all listed LSI/LSE/RTC/IWDG/LPUART configurations). This is reproducible, happens within a single uninterrupted DEEPSTOP dwell (i.e. it is not an artifact of repeated entry/exit cycling), and we have ruled out every peripheral, sensor, and firmware-level cause we can identify. We'd like ST's input on whether this is a known/expected behavior of the DEEPSTOP power architecture (e.g. an internal analog settling time not captured in the static spec table) or points to a board- or configuration-lev
Hello, I have an ST Nucleo U5A5ZJ-Q board. I am powering the board through the CN1 connector and using the ST-LINK at the same time.In the project I am working on, I would like to connect a USB device to the hardware. For this purpose, I want to use the USB Type-C connector.When I connect the sensor to the Type-C connector, it does not receive any power. My assumption is that I cannot power the device through the USB Type-C connector. Also, LD7 does not light up.I wanted to consult you about this before doing anything that might damage the board.In addition I use usb standalone(STM32Cube FW_U5 V1.8.0).Thank you in advance for your support. Best Regards,Faruk
I am using EVLSPIN32G4-ACT. Am I correct to assume that if I want to use external resistors R16,19,23,26,29 & 32, I will have to connect TP3,4&5 to GPIO1_EX, GPIO2_EX & GPIO3_EX on CON6, as this is the only way I can connect the op-amp outputs to ADC inputs?
Introduction:Hello ST Team and Community, Following a recent architectural discussion on the Zephyr RTOS project (recommended by @erwango to be shared here), I would like to submit feedback and a feature proposal regarding how the Flexible Memory Controller (FMC) master controller enable gate is handled in the STM32Cube HAL/LL drivers.Background: On newer STM32 architectures (STM32H7, STM32U5, STM32H5, STM32H7RS, STM32N6, STM32MP1/2), the FMC block contains a master peripheral gate bit (FMC_BCR1_FMCEN or FMC_CFGR_FMCEN) which must be asserted for external bus transactions to occur. Currently in the STM32Cube firmware:There is no standalone HAL_FMC_Init() or public LL_FMC_Enable() API.The master gate is only asserted via the private macro __FMC_ENABLE() inside: HAL_SRAM_Init() HAL_SDRAM_Init() HAL_NOR_Init() Inversion of responsibility: While this chip-centric approach works seamlessly in standard STM32CubeMX bare-metal projects with discrete SRAM/SDRAM chips, it creates architectu
Hello,I ran into a bug in fx_stm32_sd_driver function.Our firmware was calling fx_media_volume_set on a partitioned card and we found it was corrupting the disk. The issue is that the FX_DRIVER_BOOT_WRITE case statement hardcodes the boot sector to be at sector number 0. This works for unpartitioned (superfloppy) layouts, but does not work on partitioned SD cards with a master boot record. Calling fx_media_volume_set on a partitioned drive overwrites the MBR instead of the boot sector and corrupts the disk.Note that the FX_DRIVER_BOOT_READ, which also has to manage this problem correctly calculates the offset using the _fx_partition_offset_calculate function.Regards,Mike
Hi everyone,I am currently working on a project using an STM32H533RET6 and I need to implement an RS485 Slave interface. To save as many GPIOs as possible, I was wondering if it is possible to use just one single CPU pin for both USART TX and RX (and one additional pin for both RE and DE)?I know that the STM32 supports a Single-wire Half-duplex mode (setting HDSEL in the USART_CR3 register). From my understanding, this makes the TX pin bidirectional and completely frees up the RX pin to be used as a standard GPIO.However, my main concern is how to connect this to the external RS485 transceiver. A standard transceiver (like the MAX485) requires at least three pins: DI, RO, and the DE/RE control pin.My thoughts so far: If I tie DI and RO together and connect them to the STM32's TX pin, I would still need a second GPIO to toggle the DE/RE pin. That would be a 2-pin solution.Has anyone successfully implemented this approach in a real project? Are there any hidden pitfalls regarding the con
Hi,I am using my own board based on an STM32F207ZG and STM32F2 HAL v1.9.4.I implemented an HID Host using STM32CubeIDE (v1.19.0), simply selecting USB Host and HID class support in CubeMX and generating the code.I was able to read key events from a standard USB desktop keyboard. However, I was not able to read any key events from a USB HID RF tag reader.While debugging usbh_hid.c, I noticed the following: USBH_HID_SetProtocol(phost, 0U); generates a SET_PROTOCOL request with wValue = 0x0001 (Report Protocol)whereas: USBH_HID_SetProtocol(phost, 1U); generates wValue = 0x0000 (Boot Protocol).because this implementation:if (protocol){ phost->Control.setup.b.wValue.w = 0U;}else{ phost->Control.setup.b.wValue.w = 1U;}In other words, the protocol parameter passed to USBH_HID_SetProtocol() is inverted with respect to the value actually transmitted in the USB SET_PROTOCOL request URB.I noticed that the same implementation is still present in STM32F2 HAL v1.9.6.I am not sayi
Part: STM32U375CE (Cortex-M33 r0p4), ChibiOS, system clock MSIS 4 MHz, FLASH_ACR = 0x100 (0 WS, prefetch on), ICACHE enabled, LDO. Firmware enters Standby from a small function: PWR_CR1.LPMS = 100b, SCB_SCR.SLEEPDEEP = 1, DSB, ISB, WFI. Standby exit is by reset, as documented. Symptom. With identical source, whether the part enters Standby depends on where code lands in the image. Inserting n nops into a function that is not even on the idle path flips idle current between 4.4 uA and 1040 uA (0/2 nops sleep; 4/8/16/32 stall; three trials each). Two builds with a byte-identical 77-instruction arming function, same WFI offset within its flash line, same call list, differing only in two literal-pool data words, behave differently. Whole-tree -O0 always sleeps. Disabling ICACHE, or running the arming sequence from SRAM (.ramtext), makes every build stall. What the stalled state is. Plain stores into retained SRAM2 (PWR_CR1.RRSB3) read back over SWD after connect-under-reset show the firmwa
Hi all,I’m configuring a GitHub Actions CI pipeline for an STM32 project with auto-generated CMake files (STM32CubeIDE/CubeMX).I already created a custom Debian container including the dedicated ARM toolchain (arm-none-eabi) version 14.3.rel1 for reproducible builds.What is the best practice: how do I have to configure the CmakeList? Is there a template?How can I keep custom flags/include paths/post-build steps without editing generated files directly?Do you have a minimal working example for STM32 + CMake on GitHub Actions (including .elf/.bin/.hex artifacts)?Thanks in advance for any recommendations.
I am using the STM32F405RGT6 built-in System Memory CAN bootloader for firmware update.Configuration:MCU: STM32F405RGT6 CAN: CAN2 (PB5 RX / PB13 TX) External HSE: 24 MHz CAN bitrate: 125 kbps Host: Jetson Linux / SocketCAN Standard 11-bit CAN IDI am facing an issue with the CAN Erase command (0x43).For example, to erase Sector 8:cansend can0 043#08The STM32 responds with the first ACK:043 [1] 79but I never receive the second/final ACK after the erase operation.So the sequence is: Jetson -> 043#08STM32 -> 79 <-- received <-- final 79 is NOT receivedImportant observations:Mass erase using 043#FF works. Individual sector erase using STM32CubeProgrammer + ST-Link/SWD works, including Sector 8. RDP = AA (Level 0). WRP0–WRP11 are unprotected. Sector 8 address is 0x08080000. CAN communication with the ROM bootloader otherwise works.Therefore, it appears that the 0x43 command is being accepted by the ROM bootloader, but the sector erase operation doe
Hi everyone,I am currently working on repairing my NUCLEO-F767ZI board (Revision: [MB1137 Rev B]). The 3.3V LDO regulator (U6) was damaged and needs to be replaced.While working on it, I found a hardware discrepancy: According to the official schematic, U6 is specified as LD39050PU33R (a 6-pin DFN package). However, on my physical board, the PCB footprint for U6 clearly has 8 pads. The damaged original IC I removed is an 8-pin package with the marking code "PH 2kE". Since a 6-pin IC cannot fit on this 8-pin footprint, has anyone encountered this before? Could you please help me identify the correct 8-pin LDO part number to replace it?I have attached pictures of the physical 8-pin IC and the 8-pad PCB footprint for reference.Any advice would be greatly appreciated. Thanks in advance! Figure 1: The removed original 8-pin LDO IC with the marking code "PH 2kE".Figure 2: The physical 8-pad PCB footprint for U6 on the NUCLEO-F767ZI board.
Kindly provide an example code to make my steval esc001v1 to a working ESC for a drone i have configured PA15 as input which accept PWM signal but throttle mapping is not done any help will be appreciated.
Hi,We have observation that STM32L496RGT6 takes around 32mA current when not even flashed first time. That is STM32 has purchased from supplier and assembled only. It takes 32mA. When it is first time programmed when it takes less current.What could be reason and how to solve first problem./Anurag
Is there ST-Link V2 driver for Windows 11? I am using Microsoft Surface Pro + Copilot and trying to load code on STM32L476.
I am developing a custom embedded device that uses PIMA with USBX in order to access the SD card contents of my PCB from a PC through USB.When UX_PIMA_WITH_MTP_SUPPORT is enabled, the device is correctly detected by Windows and communication works properly.However, in order to correctly represent a hierarchical folder structure in Windows Explorer using MTP, I would need support for command 0x9805 (GetObjPropList, CMD 00000043). As far as I can see, USBX does not implement this command.To avoid implementing the full MTP property system myself, I wanted to use the more generic PIMA behavior instead, where the host requests ObjectHandles each time the user enters a folder, similar to how old digital cameras behaved.The issue is that when I disable UX_PIMA_WITH_MTP_SUPPORT, the PC no longer even recognizes that a USB device is connected. If I enable the macro again, everything works correctly.So my question is:Is disabling UX_PIMA_WITH_MTP_SUPPORT expected to completely break USB enumerat
Hi everyone, I am facing an long-standing issue with a STM32L476RE-powered device loosing UART frames when waking up from UART3 from Stop Mode (will be analyzed on another issue).Prompted by this, I have a generic question for clock configuration after Stop1-2 mode.The device uses HSI & LSE for all of its peripherals, in a bare-metal CubeMX project.Q1: The function __HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_HSI);is called 1 time before while(1){} loop. Should it be called just once or should it be called every time before calling HAL_SuspendTick();HAL_PWREx_EnterSTOP1Mode(PWR_STOPENTRY_WFI);?Q2: Should we call SystemClock_Config();every time after waking up from Stop mode, despite the fact that the clock selection ( HSI & LSE ) remains the same and no PLL or MSI is used ?Q3: Could calling SystemClock_Config();HAL_ResumeTick();disrupt an ongoing UART-RX ( running on Idle-line callback ) , despite the fact that clock selection is not changing ? Thank you in advance
After i finish my setups according to STM32U0 Bare-Metal USB workshop video. When i compile and load he program to my PCB adn then connect my pcb to PC via USB cable; at the device manager connection seems undefined like the picture below. It says that Unknow USB Device. Does anybody face like this kind of problem?
I want to get the scroll position of a ScrollList widget in the view, and also set the scroll position in the view.However, the `setOffset` and `getOffset` functions of `ScrollBase` are protected.How can I get and set the scroll position of a scrolllist?
I was finding non-deterministic behavior entering standby -- small code changes unrelated to the standby code or devices seemed to prevent standby. Many hours of debugging later using a joulescope and claude automation, the following fixed the problem -- declare the standby code as noinline (by default, my builds inline small funcitons) void __attribute__((noinline)) enter_standby_mode(void) Also, an attribute to not optimize works as well. It did not appear that the generated assembly for the standby code changed, but what did change, due to inlining, is the code alignment. This suggests, but doesn’t confirm, that the fetch pipeline can impact the ability to enter standby on this part. This was never an issue on the stm32l432.
I have encountered a specific issue using the STM32F411RE NUCLEO Board and I2C peripherals:The problem:When i plug in the board with I2C devices (DFROBOT BMM150, MPU6050, ADAFRUIT ICM20948) already connected to the board my PC (LINUX) cannot find the device.when trying to flash CUBEIDE says something along the lines of ‘STLINK not found’ and PROBE-RS says:ERROR nusb::error: interface not found (errno 2) WARN probe_rs::probe::list::linux: Make sure you have reloaded udev rules after setting everything up WARN probe_rs::probe::list::linux: Read more under https://probe.rs/docs/getting-started/probe-setup/ Error: Failed to open probe: Failed to open the debug probe. Caused by: 0: The debug probe could not be created. 1: A USB error occurred. 2: interface not found (errno 2)The fix:1) UNPLUG BOARD2) DISCONNECT I2C peripherals3) PLUG in BOARD4) RECONNECT I2C peripherals5) the STLINK is found again and I can flash code like normalWill this be an issue if I design a PCB with permanently conne
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.