Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I soft-bricked a keyboard using a STM32F103C8T6 by, I think, trying to write too large an image, and I guess I overwrote the USB bootloader. I have an identical keyboard and I just ordered an ST-Link v2 but I haven’t been able to pull up instructions for cloning the firmware from the working board using the ST-Link. Is this possible?
MCU: STM32G4Motor: DFA90L048017-ADC bus: 24 VPole pairs: 11Hall sensors: 120°Hall pins: H1 = PB6 H2 = PB7 H3 = PB8Motor rated speed: 1900 RPMHall electrical phase shift currently: 120° Problem:- Motor starts and runs.- At approximately 500 RPM command, actual speed oscillates.- Motor can accelerate toward ~1000 RPM.- Motor then briefly rotates in the opposite direction.- Motor Pilot also shows approximately the same behavior.- Hall interrupts are continuously generated.- All six Hall states 1..6 are observed.
We want to activate a 3-phases motor. We wchosse the STM32G474BCx6 microchip, we created a custom board but cant connected it to any motor, we get the message “No algorithm is available for this hardware configuration”, how can we solve it ?attached the “custom board “ we created. Thanks
I am accessing the STM32H563/573 via SWD through the debug port.My ultimate goal is to access the flash registers to perform write/erase operations on the 2MB flash memory and configure the option bytes.I have a few questions regarding this process:・I want to halt the CPU before releasing the RESET signal. Specifically, I intend to: Set C_DEBUGEN in DHCSR to 0b1. Set VC_CORERESET in DEMCR to 0b1. However, I was unable to write to or read from the following registers: (Writing results in an error, and reading returns a value that is impossible given the register configuration.) DHCSR : 0xE000_EDF0 DEMCR : 0xE000_EDFC Please explain the cause of this issue and suggest a workaround.・According to the reference manual, the factory default value for FLASH_OPTSR2_CUR is 0xB400_170, with TZEN[7:0] set to 0xB4, meaning TrustZone is enabled. However, when I read FLASH_OPTSR2_CUR from a microcontroller in its factory-shipped state, the value was 0xC300_017C, with TZEN[7:0] set to 0xC3, meaning Tr
I have no problem reaching a low power state with stop3. All the Pull Up/Down registers are configured correctly. However, simply changing the low power mode from STOP3 to STANDBY results in a 1.5mA current sink. What could this be? The debugger support is off in both cases.
HelloI have my own board with STM32G071KBT6 microcontroller. I successfully comunicate with charger by PD protocol and I receive up to 21 V (PPS). But I need above 21V. I have power bank with AVS up to 28V and USB cable with e-marker (up to 240W). How to configure the stack to receive EPR parameters? I have no TCPP IC, but I use my own protection circuit. In the trace the EPR commands isn't present. I use STM32CubeIDE 2.1.1 and STM32CubeMX 6.17.0.Thanks a lot and best regards
Hello,is there a definitive application note to interface PDM mics with MDF/ADF?there is AN5027 but it doesn’t tell about MDF or ADF. If I insert correctly MDF/ADF is a newer version of DFSDM but I would like if someone can point me to the interfacing wet stm32cubeMX for MDF/ADF usage with PDM mics showing configurations to interface N number of MICs(1-8) for a required sampling rate(16-96 KHz) if possible?which one to choose MDF or ADF?or both are same?Thanks a lot in advance !regards,S
We have a current application in which our F7 is connected to an external Microchip PHY which provides a 50 MHz reference clock for RMII. We are attempting to place the system into a low power mode in which we disable the PHY thus stopping the reference clock. Is there a way to do this that will not cause the network stack on the MCU to fail? We are using Zephyr as our RTOS which may or may not be relevant.
I flash firmware in stm32f030c8t6 MCU around 1000pcs and applied RDP level 1 protectionnow i face issue that some MCU work fine but on some application don’t run…i have read all register of both MCU good and not goodkey difference found is below figure. all perpheral rister difference table left one not good write one goodi also observe when i connect MCU with stlink v2 in stm32cubeprogrammerGood MCU bootloader version is 0x21 show eror on reading flash memoryNOT Good MCUbootloader version is 0x23 read flash memory while RDP level 1 was active and show same pattern valuesNOT GOOD MCU GOOD MCUnow how can i solve this issue?
I am using three Nucleo-WL55JC1 boards running software based on the dual-core SubGHz-pingpong example in LoRa mode.The SDK I am using is STM32CubeWL Ver. 1.5.0.The settings used are BW=125 kHz and SF=10.The first board initiates the sequence, transmitting a 16-byte packet every 10 seconds and then switching to receive mode.The second board acts as a receiver and sends a response upon receiving a packet.The third board is receive-only and monitors the communication status. If the second board does not send a response, the first board transmits packet without issues.However, if the second board does send a response, the first board sometimes fails its subsequent transmission, depending on the timing of that response. If the second board responds within approximately 150 ms of receiving the packet, the first board operates correctly.If the second board responds after a longer interval, the first board may fail to transmit the next packet.Observation with a spectrum analyzer shows that th
Hello everyone.I have recently made my own STM32 board based on the STM32F405. After soldering all the components and testing all pads and connections, finding them to be wired correctly and checking that the 3.3V is being supplied to all the correct pins, I tried to upload some code, but to my shock, the STM32F405 isn't establishing a connection via the ST-Link V2 nor the USB cable. After trying multiple fixes, I suspect the issue might be the STM32F405 chip that I got off AliExpress itself. Before taking any further steps to replace it, I decided to post a question here for review in case the problem was in my PCB design. And sure enough, I had misplaced the chip pin due to the faulty pinout diagram I used as reference.I have since fixed the chip's orientation and rechecked all pad and pin connections, as well as the 3.3V supply, and found everything to be correct; yet I still cannot get the STM32 CubeProgrammer or IDE to connect with my board using the ST-Link V2 or a
Hi all - I have a problem getting DMA working with SPI, for communication with an MCP3564R ADC as one task in a complex project running on FreeRTOS. I have made a stripped-down version of the project that just does the ADC reading task. It runs on a bare Nucleo board and illustrates the basic problem which shows up from the first transmit, so a connected ADC isn’t needed to see the problem.The code uses SPI3 at 20MHz (although the problem occurs at lower speeds as well)The GPIO pins I’m using are not the defaults:GPDMA1 is configured with two channels for SPI3 TX and RX:My code can be configured to use the HAL SPI DMA APIs or the interrupt APIs like so:static uint8_t write_register(const uint8_t * reg_write_cmd_p, uint8_t num_bytes){ HAL_StatusTypeDef hal_status; BaseType_t wait_ret_val; uint32_t notify_bits; uint8_t ret_val = 0; /* Failure */#if (MCP3564_HAL_SPI_MODE == MCP3564_USE_HAL_SPI_DMA_MODE) hal_status = HAL_SPI_Transmit_DMA(&ADC_SPI_PERIPH_HANDLE, reg_write
hi I am trying to get an sd card to work with my custom board, uses STM32F412RET6.when i try to mount or do anything other than init in 1 bit mode the code gets stuck at this point. I have been able to read block size and number from the SD card but that is it. while(!__HAL_SD_GET_FLAG(hsd, SDIO_FLAG_RXOVERR | SDIO_FLAG_DCRCFAIL | SDIO_FLAG_DTIMEOUT)) { if(__HAL_SD_GET_FLAG(hsd, SDIO_FLAG_RXDAVL)) { *(tempscr + index) = SDIO_ReadFIFO(hsd->Instance); index++; } else if(!__HAL_SD_GET_FLAG(hsd, SDIO_FLAG_RXACT)) { break; } if((HAL_GetTick() - tickstart) >= SDMMC_SWDATATIMEOUT) { return HAL_SD_ERROR_TIMEOUT; } }
The following repository contains examples for creating 'normal' type of external loaders, i.e., to be used with the "-el" argument of the STM32CubeProgrammer (e.g., with output "STM32CubeProgrammer/bin/ExternalLoader/MX66UW1G45G_STM32H7S78-DK.stldr"):https://github.com/STMicroelectronics/stm32-external-loader Where can the source code examples be found for the 'SFIx' type of external loaders, i.e., to be used with the "-elbl" argument of the STM32CubeProgrammer (e.g., with output "STM32CubeProgrammer/bin/ExternalLoader/MX66UW1G45G_STM32H7S78-DK-SFIx.stldr")?
SummaryOn an STM32WL5MOC-based LoRaWAN end node, we've measured a consistent ~100 ppm RTC drift on the module's integrated LSE (32.768 kHz) crystal — noticeably outside the commonly quoted ~±20 ppm room-temperature tolerance. We isolated this down to the RTC hardware itself through several independent tests before concluding it's a genuine crystal characteristic (or specific to this device/batch) rather than a software or configuration issue. Posting to ask whether ~100 ppm is within expected variance for this SiP's integrated crystal, or worth escalating further.ConfigurationMCU: STM32WL5MOC (Cortex-M4 side) RTC: RTC_BINARY_MIX mode, PREDIV_A=31, PREDIV_S=1023 (10-bit synchronous prescaler) RTC clock source: LSE — confirmed selected and ready (RCC_FLAG_LSERDY, __HAL_RCC_GET_RTC_SOURCE()) before proceeding; HAL_RTC_MspInit() itself calls Error_Handler() if LSE isn't ready/selected, so normal boot already implies this passed. Application: LoRaWAN Class A end node (US915), periodic uplin
I was testing stm32 adc interrupts but the IRQ is not working properly and idk what is the matter, I wasted a lot of time in debufgging it but didn’t get any leads. Please help me out, here is the link of the project:GitHub Repo
Hi STM32 Community,I am currently selecting an STM32 MCU for a timing-control application and would like some guidance on the required timer architecture.My requirement is:Input trigger: 45 Hz, 50% duty-cycle signal. After receiving the trigger, the STM32 should generate 8 PWM outputs with a configurable delay. The required trigger-to-output delay is approximately 0–3 µs. PWM1–PWM4: 45 Hz, 25% duty cycle PWM5–PWM8: 45 Hz, 25% duty cycle The 8 outputs need to be synchronized according to the timing sequence shown in the attached diagram. In addition, I receive 4 feedback PWM inputs: Feedback 1–4: 45 Hz, 25% duty cycle These feedback signals need to be measured/captured by the STM32. My main question is:What is the recommended STM32 timer architecture for this requirement?Specifically:How many timer peripherals would I need? Can I use two timers with 4 PWM channels each to generate the 8 PWM outputs? Can a third timer with 4 input-capture channels be used to measure the 4 feedback PWM s
Hello ST Community,am working with a Nucleo-H753ZI board where the STM32H753ZI is configured as an SPI1 slave, and the SPI master is a TI AM64x R5F core.The goal is for the STM32 to continuously transmit 4-byte frames over SPI (using DMA) whenever the master clocks the bus.However, the problem is:The master is receives only FF FF/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 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 --------------
Hello everyone,I am currently developing with the STM32N6570-DK and utilizing the hardware ISP. I am facing an issue with the embedded Auto Exposure (AE) algorithm's convergence time. It currently takes about 20-30 frames (~1 second) for the AE to settle on the correct exposure and gain. For my application, it is critical that the very first frame upon wake-up is perfectly exposed, meaning a 1-second delay is not acceptable.To bypass this feedback loop, I have integrated a Texas Instruments OPT3001 Ambient Light Sensor (I2C) to implement a feed-forward solution. My intended sequence is: Read the absolute ambient lux from the OPT3001 on boot. Map this lux value to a pre-calibrated Lookup Table (LUT) to determine the ideal Exposure Time and Sensor Gain. Force the STM32 ISP into manual exposure mode and inject these values directly. Start the camera stream to achieve a zero-delay, perfectly exposed first frame. I have a few questions regarding the best way to implement this within t
I have used the 70STM32H7 template in TouchGFX Designer 4.26.1 to create a project for a Riverdi RVT70 board.I've created a basic start screen, generated code and built it using CubeIDE 2.1.0.The code loads onto the target and runs as expected.If I open the project's .ioc file, I am told that the project uses V1.12.1 of the STM32Cube FW_H7 and V.13.0 is available. Upgrading to this version, saving and regenerating the code results in the project failing to build:In file included from ../../../CM7/USB_HOST/Target/usbh_conf.h:98, from ../../../Middlewares/ST/STM32_USB_Host_Library/Core/Inc/usbh_core.h:27, from ../../../Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc/usbh_msc_bot.h:28, from C:/TouchGFXProjects/GFX/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc_bot.c:27: ../../../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os.h:32:10: fatal error: cmsis_os2.h: No such file or directory 32 | #include "cmsis_os2.h"This can be fixed by adding a new i
I have used some time to figure out to use the ADCs for a couple of Nucleo STM32G4xx boards. In particular I liked to be able to make use of the asynchronous clock. I found out by some trials and errors to get the right RCC settings for that.In RM0440 you got a ADC clock schematic figure 83 page 597. I have tried to enlarge this schematic a bit regarding the RCC controls like this: Can you agree to this schematic?These functions can help configure RCC for the other ADC clock input:__HAL_RCC_ADC12_CLK_ENABLE() Enables clock to AHB interface__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_ADCCLK); Enables clock to PLLPI did not find a function outside the big HAL RCC init data structure to set the bits ABCxxSEL[1:0] of RCC_CCIPR, so I did that bare metal.
Setup: STM32F446RE Nucleo + MPU9250 (I2C1, PB8=SCL/PB9=SDA), breadboard wiring, HAL library, 100kHz standard mode.Symptom progression: Sensor works intermittently. When it fails, I see two distinct failure signatures that seem to escalate:First failure mode: HAL_I2C_IsDeviceReady() succeeds (device ACKs its address) but the WHOAMI register read returns the wrong value. After a couple of MCU resets without touching hardware: escalates to the device not ACKing its address at all (IsDeviceReady fails outright).What I've tried:Implemented the STM32 I2C "clear busy flag erratum" workaround (ST-documented fix for the analog filter/BUSY-flag lockup bug — the 15-step GPIO bit-bang + SWRST sequence). This did NOT reliably fix it — worked on some boots, failed on others, no clear pattern. A full power cycle (not just MCU reset — actual power removal) temporarily restores it to working. Reseated all breadboard connections (SDA, SCL, VCC, GND) multiple times — no change in behavior.What this rules
Dear ST Support Team,I am currently working on an LLC resonant converter project using the STM32G474 microcontroller.My goal is to implement Synchronous Rectification (SR) using the STM32G474's PWM timers and Comparator peripherals. However, I am unsure about the correct peripheral configuration and firmware implementation.I would appreciate your guidance on the following: How should I configure the PWM timers and Comparator peripherals in STM32CubeMX for Synchronous Rectification? Which timer and comparator connections are recommended for this application? Are there any reference projects, example firmware, or application notes available for implementing SR on the STM32G474? Are there any recommended CubeMX configurations or firmware examples that demonstrate this functionality? Could you recommend any official documentation, training material, videos, or tutorials that explain the implementation of LLC Synchronous Rectification using STM32? My objective is to understand the c
Hi all,I’m looking at a STM32C092 for some UART stuff. The data sheet has USART1 on an independent clock. Using MX I select USART1 as Asynchronous and MX calculates the rate according to the independent clock as expected,However, when I select USART1 as Synchronous MX calculates the bit rate according to the APB clock. I don’t have a device to test it on.Is MX right or wrong?Thanks in advancePedro
We are using the PowerSTep01 chip to control a stepper motor.https://www.st.com/resource/en/datasheet/powerstep01.pdfRecently we have had issues with the control of motors where the initialization of the PowerStep01 chip failed at startup and the status register read 0x0000 before initialization and 0xE603 after initialization and 0xE613(HiZ=1) when tried to run the motor. After some investigation we figured that sending a reset pulse for 5ms worked (initial Solution A) which had to be increased to 100ms (Solution B) for a stable outcome.The solution was built by reading through the answers in different forums, with 2 examples links belowhttps://forums.parallax.com/discussion/165132/trouble-driving-the-powerstep01-using-the-x-nucleo-ihm03a1expansion-board https://community.st.com/power-management-53/powerstep01-constantly-tripping-overcurrent-25813 Below is the detailed problem description as well as details of solution A and B. The problem resurfaced after removing intermediatory fi
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.