Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello everyone,I am encountering an over-current issue with the B-G431B-ESC1 when attempting to use position control with a quadrature encoder. Here's what I've done so far:Steps I Have Taken:Motor Profiler:I uploaded the Motor Profiler firmware and ran the profiler to obtain the motor parameters. The parameters from the profiler are as follows:Motor Parameters:Hardware Family: MOTORLabel: BDUAV C4250Description: BDUAV C4250 560KvPole Pairs: 7Nominal Current: 40 ANominal DC Voltage: 24 VStator Resistance (Rs): 0.1 ΩStator Inductance (Ls): 0.02 HMagnetic Structure: Surface Mount Permanent Magnet Synchronous Motor (SM-PMSM)Back EMF Constant (BEmf): 1.53 V·s/radInertia: 4.44 (unit depends on context, often kg·m² or g·cm²)Friction: 3.63 (unit depends on context)Max Rated Speed: 6020 RPMQuadrature Encoder Details:Pulses Per Mechanical Revolution: 2048Index Pin: PresentCompatibility:FOC (Field Oriented Control)SixStep ControlMotor ID: BDUAV C4250MC Workbench Configuration:I created a new pro
Hey everybody. I had 3 STM32 F401RE for my robotic project but now I got "no stlink detected" error. Once I turned my computer off with shot down and then on again I couldn't get stm32 to work again, that's why one of them went away, the other one was when I turned the driver on and off while the stm32 was connected to the stepper motor driver and then it went away, i don't remember the other one. My first question is are these stm32s completely broken, can i save them? My second question is if they are completely gone, how can i save my next purchases?
Hello,We have procured STM32U5G9J-DK1 recently. We have to supply a voltage of 3.6V to its Vbat pin. Datasheet of the Microcontroller (STM32U5G9NJ) say that we can supply a Vbat voltage of 1.6V to 3.6V but schematic of this Discovery kit mentions that "The design supports a VDD_MCU at 1.8V only" (Ref MB1829 schematic of this Discovery kit). Also, whenever I configure any GPIO as output on this kit and Pull it high, it shows 1.8V only. So, my doubt is whether or not we can give 3.6V to Vbat pin. Should we restrict Vbat to 1.8V only ? With regard,Sudarshan Chaudhary
I have Nucleo-L452RE-P and want to try out battery backup for RTC.I connected a CR2032 to Morpho connector 19 (-) and 33 (+) and when I pull the USB plug, the 5V LED LD2 remains on, although a bit less bright.How can that be?
STM32H743ZIT6 LwIP - Ping Working in Example but Fails in My Own Project - Need Step-by-Step Help]Hi everyone,I am working with STM32H743ZIT6 and trying to implement basic Ethernet communication using LwIP. I downloaded the STM32CubeH7 package, and using the default LwIP example, I can successfully ping my STM32 board from my PC — no issues there.However, when I try to replicate the same configuration in my own project, I cannot get ping to work. I suspect I am missing some configuration step or detail, even though I tried to match everything. Details:1. MCU: STM32H743ZIT62. Development Environment: STM32CubeIDE3.LwIP Version: Provided with latest STM32CubeH7 package4. PHY: LAN87425.Clock Configuration: HSE 25 MHz, proper PLL setup6.LwIP Example: LwIP_Ethernet example — works fine, I can ping7.My Own Project: Same clock setup, same LwIP stack, but ping doesn't work
Hi, I am using stm32f46-disco working with client for TCP server, my problem is when I start with one client it works successfully but when I connect another client (also stm32f746-disco) it receives data slower than the previous client and swaps with the first client (meaning the first client now receives data slower than the second client). Do you know this problem?/* * ethernet.c * * Created on: May 3, 2024 * Author: ACER */ #include "ethernet.h" #include "../element/element.h" #include "../user_eeprom/user_eeprom.h" #include "lwip/tcp.h" #include <string.h> #include <stdarg.h> extern struct netif gnetif; static err_t ERROR_DEBUG; // debug static struct tcp_pcb *user_pcb; char CurrentState[32]; char data_server[32]; char tcp_ip[64]; static err_t user_config_server(void *arg, struct tcp_pcb *newpcb, err_t err); static err_t user_poll_callback(void *arg, struct tcp_pcb *pcb); static err_t user_recv_callback(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err);
Hi all,I am using the STSPIN32G0252Q chip on a custom board (implements 3-shunt current sensing and back-EMF measurement, alongside the required drive features). I have designed the board in the MC Workbench, and have manually profiled the motor I am using, as the motor pilot tool doesn't support the Cortex-M0+ range.However I am finding it difficult to know where to start with actually implementing the code generated by the workbench/CubeMX; I can see that all of the control functionality is present, but there doesn't seem to be any documentation on how to actually run a motor using just API/HAL calls, instead of using the motor pilot. I have read the SDK documentation, but while this lists all of the functions and control algorithms it doesn't seem to show what a simple implementation loop would look like. Worse still, there seems to be some conflicting information about what each function does (e.g., whether the MC_StartMotor function needs a speed/torque ramp pre-programmed or not)
Greetings Everybody,I have Nucleo-F207ZG board. I want to try RTC feature of this STM32. In past i did try using RTC but after some days the time used to drift and it was like 4 seconds ahead than actual time after on week and after 1 month time was ahead like almost 15 seconds. If you have any step by step procedure of RTC smooth digital smooth calibration then please share. I have gone through various application notes but i am getting more confused... Please help me.
Hi, We are using STM32G0B1 MCU for our project. We need to use USB DFU for application reprogramming. I tried to to set option bits and then connect through USB DFU, everytime I set option bits through software and flashing through debugger , USB DFU is connected only once. Once I disconnect debugger and restart the board, USB DFU is not getting connected even though I am Jumping to system bootloader from application. Its again coming back to application and running. In my test software, I am jumping to bootloader after application is run for defined time for ex., 10seconds. Please let me know is there anything to be done so that USB DFU is connected everytime after jumping to bootloader from application.
Hello everyone,I am implementing a DDS-based pulse generator using DMA double buffer technique on my STM32H7. When I run this pulse generator as a standalone project, it works perfectly — the output pulse frequency is accurate and stable.However, when I integrate LwIP into the same project, I notice that the generated pulse frequency occasionally changes unexpectedly and produces wrong output values. It looks like there is interference or resource conflict when both the DDS pulse generator and LwIP run together.Has anyone faced similar issues? Is there a recommended way to isolate or manage DMA, timers, and LwIP to avoid such conflicts on STM32H7?Any suggestions would be greatly appreciated.Thank you!
I've got a program running on a dual-core STM32 (the STM32H747IGT6 if you're curious) and right now it's doing a pile of SCB_CleanDCache_by_Addr() and SCB_InvalidateDCache_by_Addr() to keep shared memory in sync between the CM4 and CM7. I was thinking it would be easier if I just set the shared area to non-cacheable, but when I configure the MPU the system will work for a few seconds and then hang.The shared memory area is called 'buffer_control' and I padded it to 512 bytes. My MPU configuration looks like this:SCB_EnableDCache(); SCB_EnableICache(); /* Disable the MPU */ __DMB(); /* Make sure outstanding transfers are done */ SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; /* Disable fault exceptions */ MPU->CTRL = 0; /* Disable the MPU and clear the control register*/ /* Configure the MPU attributes as WB-WA for SRAM */ MPU->RNR = MPU_REGION_NUMBER0; MPU->RBAR = (uint32_t)&buffer_control; MPU->RASR = ((uint32_t)MPU_INSTRUCTION_ACCESS_DISABLE << MPU_RASR_XN_P
Hello everyone, we are using STM32L152RBT6A for our development. Our PCB has a battery and we use the RTClock, no matter of the way of work - frequent power Off/ On. We kindly request some help in using „80 byte backup register“ like an energy independent memory, as we don't find any other suitable parameter in our processorHas anyone tried using this memory?Thank you in advance
Hi STM team,I am currently evaluating hardware solutions for a 64 kW BLDC motor control system in a VTOL (Vertical Take-Off and Landing) aerospace application. The project demands high safety assurance and performance, targeting DO-178C DAL-B or higher compliance.We are seeking a motor control IC or microcontroller solution with the following characteristics:Suitable for safety-critical motor control, including DAL-B system architectureCapable of Field-Oriented Control (FOC) for high-power BLDC/PMSM motorsSupport for PWM-ADC synchronization, encoder/sensor less feedback, and high-frequency switchingProven or qualified RTOS/toolchain support for avionics or DO-178C environmentsAvailable reference designs, libraries, or model-based development support (e.g., Simulink auto-code generation)It would be greatly helpful if you could recommend:Suitable ICs or families for this applicationMotor control development kits or demo boardsFunctional safety certification
Dear STM Community,We are currently evaluating motor controllers for a 48V BLDC motor application and have identified the STSPIN32F0B, which features an internal gate driver, as a potential candidate.Before proceeding further, we would like to confirm whether this controller is SIL (Safety Integrity Level) compliant, as our application requires adherence to SIL standards.Additionally, we would appreciate clarification on a general point:Do motor controllers typically fall under SIL compliance requirements, or is this dependent on specific use cases or certifications?Furthermore, if the STSPIN32F0B is not SIL-compliant, we would be grateful if you could suggest any SIL-compliant motor controllers suitable for 48V BLDC motor control applications.Your insights and any supporting documentation would be highly appreciated to help guide our evaluation and selection process.Thank you in advance for your support. Regards,Loganathan.R
Originally a comment on this tutorial - moved to main forum for better visibility & discussion ...I followed the first part of the tutorial (enabled USART2) and included the following code snippets for my STM32 NUCLEO-H7A3ZI-Q board. /* USER CODE BEGIN PV */ uint8_t buffer[1]; /* USER CODE END PV */ /* USER CODE BEGIN 2 */ HAL_UART_Receive(&huart2, buffer, 1, 0xFFFF); HAL_UART_Transmit(&huart2, buffer, 1, 0xFFFF); /* USER CODE END 2 */ /* USER CODE BEGIN WHILE */ while (1) { HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0); HAL_Delay(100); /* USER CODE END WHILE */ But I wasn't able to write any characters or anything on my serial console. Kindly give some suggestions.
Hi, I'm trying to enter bootloader mode but fails in the process. Things i have done: Shield powered with 3.3V FTDI attached to RXD, TXD, GND JP1 changed from User Flash -> Bootloader Measured that PA10 is high at boot I send 0x7F but doesn't receive anything. Oscilloscope used to be sure that 0x7F is transmitted Any suggestions on next steps?
Please suggest recommended values for EMMC for the following parameters:Max Read/ Write speed supportedWhat is maximum memory density it can support?What is the bus width it can support?Any recommended NAND based EMMC part number of memory density 16GB and 3.3V supply voltage, which performs efficiently with STM32H757XIH6?
I’m working on an STM32 project using TouchGFX and STM32CubeIDE. The code compiles fine on the real target, but when I try to build the TouchGFX Simulator, I get the following error repeatedly: fatal error: i2c_data.h: No such file or directory The i2c_data.h file is present in my project under Core/Inc. It seems the simulator build does not include the folder containing i2c_data.h in its include paths.
I'm using STM32CubeMX 6.12.0, with the firmware package U0_V1.1.0.When generating code for a STM32U073, the file system_stm32u0xx.c is generated, which contains the implementation of the SystemCoreClockUpdate() function.This file seems to be a mere copy of the firmware package's file "<...>\STM32Cube\Repository\STM32Cube_FW_U0_V1.1.0\Drivers\CMSIS\Device\ST\STM32U0xx\Source\Templates\system_stm32u0xx.c"I'm attaching it for reference.On line 330 we have: tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4U) & 0xFU]; It seems that this should actually betmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos) & 0xFU]; since RCC_CFGR_HPRE_Pos is 8, not 4 (as defined in stm32u073xx.h:5524).The RM agrees with the value 8: §5.4.3 shows HPRE[3:0] in position [11:8] in RCC_CFGR. Also note that stm32u0xx_hal_rcc.c:396 has the correct value (it uses the macro RCC_CFGR_HPRE_Pos, in HAL_RCC_OscConfig()). Note also that the same bug pot
Hi.. I am using STM32L476 Nucleo board. When i tried to erase a flash page using HAL_FLASHEx_Erase(), the FLASH_WaitForLastOperation() returns a HAL_ERRORI've seen similar issues in the community, but unfortunately, similar solutions just don't work.And the error code is 0xA0 , how can I fix thisStatusDef FlashWr(uint32_t flash_addr, uint8_t *pData, uint16_t length) { uint8_t *pBuf = (unsigned char *)flash_write_buf; uint16_t cnt; // valid length in current sector uint32_t flash_addr_base; uint32_t addr_offset; bool cmp_result; uint16_t i; uint64_t val; uint16_t addr; StatusDef sta = STA_OK; while (length > 0) { flash_addr_base = (uint32_t)(flash_addr & ~FLASH_SECTOR_MASK); addr_offset = (uint32_t)(flash_addr & FLASH_SECTOR_MASK); cnt = FLASH_SECTOR_SIZE - addr_offset; if (length < cnt) { cnt = length; } FlashRd(flash_addr_base, pBuf, FLASH_SECTOR_SIZE); cmp_result = FlashCmp(pBuf + addr_offset, pData, cnt); if (false == cmp_re
Please enlighten me. I added FreeRTOS to my STM32CubeIDE project using IOC. I discovered that I had to choose either CMSIS_V1 or CMSIS_V2 as the FreeRTOS Mode, else FreeRTOS would not be included. I chose CMSIS_V2. I then noticed the FreeRTOS Configuration pane and added a task, timer, and Queue. Upon finding the generated code, I noticed they are created with osThreadNew, osTimerNew, , and osMessageQueueNew. I was expecting xTaskCreateStatic, xTimerCreateStatic, and xQueueCreateStatic instead. Are the three set of functions somehow the same, or is one a wrapper for the other, or what? Can I still use the FreeRTOS Reference Manual, or do need to find and consult the CMSIS_V2 OS manual instead? Or, maybe I did something wrong.
Hello, I am currently attempting to get the ethernet set up on my eval board. The project goal is to use a timer on the eval board to trigger the board to call out to a PLC on my network to receive 8 values every 1 second. Those values will then be stored in specific corresponding variables in the main.c file to be used in another function later on. I have attempted to follow several examples and use some AI to help me debug but I have hit a wall. I have zero errors when building out the project and running the debugger. It appears to flash onto the device but then nothing happens. List of the places that I have tried to debug with a simple toggle GPIO command on one of the user LEDs -user code section 2 : did toggle successfully on -main while loop : does not work -user code section 4 with in my modbus request : does not work I have had several cases where it appears when the debugger asks me to resume the process it sends me to the hard fault handler in stm32H7xx_it.c, but this leave
Yes, I use Cube.In the documentation I read that eMMC is connected to SDMMC1.SDMMC1 can be configured either as SD or MMC. I get the SD option in FATFS only when SDMMC1 is configured as SD.OK, I found the example to use MMC driver, I configured it.Anyway - it doesn't work. I get SDMMC_ERROR_CMD_RSP_TIMEOUT.Here's my SDMMC1 initialization:static void MX_SDMMC1_MMC_Init(void) { /* USER CODE BEGIN SDMMC1_Init 0 */ /* USER CODE END SDMMC1_Init 0 */ /* USER CODE BEGIN SDMMC1_Init 1 */ /* USER CODE END SDMMC1_Init 1 */ hmmc1.Instance = SDMMC1; hmmc1.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING; hmmc1.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE; hmmc1.Init.BusWide = SDMMC_BUS_WIDE_8B; hmmc1.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE; hmmc1.Init.ClockDiv = 2; if (HAL_MMC_Init(&hmmc1) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN SDMMC1_Init 2 */ /* USER CODE END SDMMC1_Init 2 */ } UPDATE:Now I'm co
Hi.We have an application with a touch screen and 4 physical buttons. We have designed a demonstration GIU in TouchGFX, but to allow the simulator to handle presses on the hardware buttons, we have added the hardware buttons on the display. Consequently the display is made 100 pixels higher to have room for the buttons. It works fine for the simulator, but we cannot use the GUI design as it is for building the target application.I expected that it was possible to setup the simulator to hold the hardware buttons as an addition the the application display. But apparently not. It would be nice if it was possible to design the hardware button arrangement in addition the the GUI. The buttons should of cause have a legend and the button ID in addition to the arrangement. And of cause this should not be included in the target build. But it would be nice if it could hold additional fields (e.g. text areas and radio buttons) for simulating the rest of the hardwareDid I miss something? 
I added I-CUBE-wolfMQTT and I-CUBE-wolfSSL software packs to my STM32CubeIDE project in CubeMX built into CubeIDE. In CubeMX I set parameters:for wolfSSL:RTOS - Single THreaded (no RTOS / Baremetal)IO interface - LWIP (native API)for wolfMQTT:FREERTOS Support - FalseIO - LWIPDespite that, trying to compile project ends up with errors like "'SOL_SOCKET' undeclared (first use in this function)" or "'AF_INET' undeclared (first use in this function)". It is because example code uses sockets from LwIP library which can't be used if FreeRTOS is disabled. Even in lwipopts.h LWIP_SOCKET is defined to 0 and you can't enable it in CubeMX if NO_SYS (OS Awarness) is set to OS Not Used. Am I missing something? Did I misconfigure settings in CubeMX or are provided examples just wrong?
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.