Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I am having issues with the STM32G0 ADC measurements. I am trying to measure 2 voltages:1. 3.3V2. 12VAfter the voltage divider, the 3.3_adc and 12v adc pins are connected to the MCU pins directly:3.3_adc - PA3 (ADC1_IN3)12v adc - PA7 (ADC1_IN7)My STM32CubeMX configuration for the ADC is as following:VREFBUF Mode is configured as External voltage reference:Because we have 2.5V connected to the VREF+ pin of the MCU and we want to use it as the ADC Reference Voltage, see the schematic below:I have measured the voltages with the Multimeter on VREF+, +3.3V and +12V, and all of them are correct and as expected. I have also measured the voltages using multimeter after the Voltage divider and I measure as following:3.3_adc - 0.275V (if I apply voltage divider, I get 3.3V precisely)12v adc - 0.508 (if I apply voltage divider, I get about 11.6V. This is expected voltage on this pin as it has some diode connected on this line hence its not actually +12V)My code is as following:/* USER CODE BEGIN
Title:Hi STM32 Community,I’m working on a FOTA (Firmware Over-The-Air) project using the STM32G030C8T6. The setup consists of:- A custom bootloader at 0x08000000 (32KB)- An application at 0x08008000 (32KB)- Communication via UART2 with an ESP32, which sends Intel HEX files:white_heavy_check_mark:Working Bootloader Flow- On any reset (power-on or manual), the bootloader always runs first.- The bootloader listens for HEX data and writes the application to flash at 0x08008000.- When it receives "JUMP_2_APP" over UART, it jumps to the application.- This jump works correctly: the application runs, GPIO/LED blinks, UART works.__attribute__((noreturn)) void Jump_To_Application(void) { uint32_t app_addr = 0x08008000; uint32_t msp = *(__IO uint32_t *)app_addr; uint32_t reset_addr = *(__IO uint32_t *)(app_addr + 4); void (*app_entry)(void) = (void (*)(void))reset_addr; if ((msp < 0x20000000) || (msp >= 0x20002000)) { send_uart("[BOOT] Invalid MSP! Application not valid.\r\n"); while (1);
Hi, I'm working on a project in MC Workbench 6.3.2 and trying to configure a motor with a maximum speed of 150 RPM. When I set the "Max. Application Speed" parameter to 150 RPM (as shown in the first picture), I encounter an error related to the "Speed Sensing Configuration". I've attempted various parameter combinations for the Hall Sensor settings (as shown in the second picture), but haven't resolved the issue. Could you please advise on how to fix this problem? Thank you for your help.
hi all,I'm Trying to send a string from STM32F401RE MCU to EPS32 Via UART i have programmed both STM as well as ESP32 and i successfully verified that data is available on UART pin of STM Data on UART Pins of STMBut I'm not able to receive data on ESP32, i double checked the UART Hardware connection is correctand i configured STM UART in TX_ONLY mode , did not configure any hardware flow pins ,baudrate is 9600,1 stop bit and not using parity ESP32 UART RX I'm receiving some Garbage value on Arduinocan anyone please help me with the UART message not Receiving in ESP32
I dump a STEVAL-SPIN3204 board in STMC Board Designer and want to add "Electronic Speed Control" Feature.In Board Designer I had add this feature without error. But in Motor Control WorkBench as attached 1.JPG .We can see ESC feature. But in project config stage, we can't find this feature as 2.JPG. Can anyone help on this question ?
Hello, I’m facing an issue using the RAK3172. In my project, UART1 is configured for debugging and LoRaWAN logs, while UART1 (PB6/PB7) is reserved for communication with the LC76G GPS module. However, I'm unable to print any data from the GPS module to the monitor. So, I performed two steps to verify whether the module is actually working: I checked the current consumption using a multimeter; I soldered a wire directly to the module's TX pin and used a TTL converter to confirm that NMEA data is indeed being sent. Based on that, I searched the forum and saw that others have experienced issues with UART1 on this module, but I couldn’t find a clear solution. These are the two functions I’ve implemented so far, and I’m calling them during the LoRa initialization. I’d like to point out that they were used successfully in a previous project with an STM32L4, and everything worked fine there. void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size) { if (huart ==
Been working on the Nucleo H5 dev board for about a month. Everything with the built-in ST-Link/V3 was fine until randomly yesterday, the board would no longer get out of reset when the ST-Link is powered. Board powers up and boots if getting power from the USB-OTG port AND the ST-Link is unplugged. Tried with STProgrammer and GDB in VSCode debugger, neither can connect to the target chip. To be clear, the STLink enumerates and works OK, but the MCU is held in reset state. Board is held in reset state when ST-Link gets power/host connection. Attempting to flash the board always gives "Reason: Target held under reset.". All solder jumpers and physical jumpers are in the default positions Fixes I've tried: Any set of settings via the STProgrammer, including Soft Reset, the "under reset" connection type, etc. Any time STLink is powered from host, the board is held reset and will not connect still. Updating the STLink/V3 drivers/fi
Hi. Last week I received my first STM32U5A5 board and tried to implement USBX HID standalone mode, following this tutorial. Guess what? I managed to make it work and It just works very well! I should call USBX_Device_Process(NULL); in the main loop so the STM32U5A5 serves as USB HID device. My question is that, is it appropriate to call USBX_Device_Process function in the main loop, while the USB polling rate is 1000 Hz (depending on settings)? When debugging, that function is called multiple times per milliseconds and I'm worrying about some malfunctioning due to the excess of USBX_Device_Process calling. Or is it totally fine repeating the USBX_Device_Process function without carefully configured timers or fitting the timing into the polling rate? Thanks in advance!
Good morning,I have recently made a piece of hardware which has a F722VET6 microcontroller and a W25Q128 flash chip onboard. When I set up all the peripherals (using quite a few other spi and i2c components) and write a simple LED flash in the main while loop the LED doesn’t flash. However if I comment out the MX_Qspi_init function code runs fine on the board. This happens with both the flash soldered and if it’s not populated on the board. I also have various sensors which I have tested and they run fine with regular spi. The only thing I can think of is that when the QSPI init is left in the code (not commented) it tries to use the external flash and boot from it which doesn’t have anything on so doesn’t do anything. I’m unsure if this is correct. Wiring is correct and I’ve tried various clock speeds for the qspi does anyone have any ideas?
Hello,I'm working with the STM32H745ZITx and trying to receive data over USART3 using RX DMA. However, the usart_rx_dma_buffer remains all zeros — as if no data is written. Here’s what I’ve checked::small_blue_diamond: DMA Configuration:DMA1_Stream0, Peripheral-to-Memory directionTried both Circular and Normal modeDMA RX request enabled for USART3HT and TC interrupts are enabledNVIC settings verified:small_blue_diamond: Memory & MPU:RX buffer is aligned using __attribute__((aligned(32)))Proper cache invalidation is applied using SCB_InvalidateDCache_by_Addr()Buffer region tested in .ld file using both D1 domain (0x2400xxxx) and D2 domain (0x3004xxxx)MPU region configured as Normal, Cacheable, Shareable:small_blue_diamond: What I’ve Tried:IDLE line interrupt is enabled — still no dataTX DMA works correctlyRX DMA callback triggers, but buffer is untouchedAll configuration steps follow the stm32-usart-uart-dma-rx-txCarefully reviewed DMA is not working on STM32H7 devicesNote
Hello STIm trying to generate a HSO compatible FOC board using the STM32G747CEUx but I am not able to select the HSO option for Speed sensing.I've seen the requirement of using atleast two different ADCs for the current sensor and voltage measurementTherefor I have assigned ADC1 and ADC2 for current measurementAnd ADC3, 4 and 5 for voltage measurementBut I am not getting a solution for this.Here is my json design fileThank you"mcu": "STM32G474CEUx", "clockFrequency": 170, "motorDrives": [ { "name": "M1", "minRatedVoltage": 16.9, "maxRatedVoltage": 60, "maxRatedCurrent": 80, "maxRatedPower": 2000, "features": [ { "type": "CurrentSensing", "name": "CurrentSensing", "hwVariants": [ { "signals": { "CURRENT_AMPL_U": [ { "name": "PA0", "help": {}, "cost": 0 } ], "CURRENT_AMPL_V": [ { "name": "PA1", "help": {}, "cost": 0 } ], "CURRENT_AMPL_W": [ { "name": "PA2", "help": {}, "cost": 0 } ] }, "type": "ThreeShunt_AmplifiedCurrents", "cost": 0, "amplifyingN
Hello,I am working on the STM32H745ZITx platform and using both CM7 and CM4 cores with FreeRTOS. I am trying to run a TCP server on the CM7 core using LwIP.However, when I call the accept() function, the system seems to hang. Specifically, after accept() is called, none of the tasks on the CM7 core continue to run — it appears as if the RTOS scheduler has crashed or is blocked.I have reviewed the example from this repository:STM32H745_Nucleo_M7_ETH and followed the STM32H745_Nucleo_M7_ETH project structure closely.Do you have any suggestions or guidance on what else I should check? Could this be related to interrupt priority, improper memory configuration, or something else I may have overlooked?I would appreciate any help or insights you can provide.Best regards,Kemal UZGOREN
Hi all,I am designing a PCB using the STM32G030K6Tx and for my application I only require the HSE external crystal, which I believe I connect to GPIO pins PC14 and PC15. When I go the the .ioc file in the STM32CubeIDE (System Core -> RCC) I see there is only an option to enable the LSE and no option to enable the HSE. How do I go able enabling the HSE? I have attached an image of the relevant section of the .ioc file.STM32G0 Series RCC
Hello,I'm trying to implement an I3C target device which sends inband interrupts when I push the blue Nucleo button.But I also want it to be ready to receive data via a private message.To do this I call `HAL_I3C_Tgt_Receive_IT` after receiving a dynamic address. But to send an inband interrupt I must abort this action and before being able to call `HAL_I3C_Tgt_IBIReq_IT`.The problem I'm facing is that the abort only finalizes if the controller tries to send a private command. My expectation is that `HAL_I3C_Abort_IT` would abort the pending receive action right away so I can send an inband interrupt.Is there any way to realize this by modifying the HAL library? Or am I using the HAL library in a faulty manner?The state process I'm currently using to implement the target. int i3ct_poll(void) { switch (_state) { case I3CS_WAITING_FOR_ADDRESS: { if (_got_address) { DBG_PRINTF("goto state idle\r\n"); _state = I3CS_IDLE; } } break; case I3CS_IDLE: { // check if we must s
We are using MCWB 6.3.2We generated a project that is working fine. However, testing our motor close to its peak current, we have been getting an over current fault.We decided to increase Over current protection (OCP) Digital Filter Duration and Threshold (well within our system limits). We then go to 'Project HW & Info' and Run CubeMx. From there we generate the project.Our main.c file is intact as well as the peripherals and pin configuration. However, we are not sure that the Digital Filter Duration and threshold have been updated.Would you please, confirm that this is the correct workflow and where in the code I could confirm that our changes made through? We read somewhere that topology changes are not possible at this point, but this is not considered a topology change, correct? For us to generate new project every time would be very laborious giving that we have an extensive use of peripherals.Would it be possible to turn OC protection off and even DP off momentarily f
Configure STM32G0 to sample 11 channels; When voltage is injected into only one channel each time, the sampling values of all channels are correct. When voltage is injected into 11 channels simultaneously, the sampling values of all channels are incorrect and random values are displayed. Could someone help me explain the reason for this problem and how I should configure it? Thank you.
Hello, i have been trying to measure the frequency of a pwm signal using input capture. I am using Nucleo-F429ZI I want to print the values of the frequency of the signal in question with UART. The frequency of my signal is 100 kHz but I read stuff like these on my serial monitor: (I printed diff instead of frequency to see what is the issue, it is the same with frequency just with bigger values.)The oldest data was removed. Continue...637130510862817410578482410364375355365365365131575163852855021820130200482000519942200442001619963(I cut most of the data so that the post isn't too long but it is roughly like this. Constant values near 365 and occasianl continous irrelevant high values)Below is the relevant parts of my code: ... /* USER CODE BEGIN 0 */ uint32_t captureValue = 0; uint32_t previousCaptureValue = 0; uint16_t diff; uint16_t frequency = 0; char uart_buffer[32]; static uint8_t first_capture_flag = 1; /* USER CODE END 0 */ ... int main(void){ ... HAL_TIM_IC_Start
Hi everyone,I have a problem with the Ethernet connection that I can't solve on the STM32H747I-DISCO board.I followed Adam Berlinger's guide step by step (https://community.st.com/t5/stm32-mcus/how-to-create-a-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308) and the Ethernet works for a while, but when I send messages on udp or start the ping, after a while it stops working.can someone help me?, I've been trying to fix this problem for two months now but without success.thank you very much in advance.
Hello,I am currently using the STM32L496 microcontroller in a product design. In this design, I use PC1 as an output to control the EN (enable) pin of a TPS78228 LDO. I'm encountering an issue where the LDO exhibits unexpected behavior when EN is driven low by the STM32. Setup Details:There is a 470 kΩ pull-down resistor between PC1 and the EN pin.A 4.7 µF capacitor is connected to VOUT, as recommended.When I manually pull EN directly to GND (bypassing PC1, when STM32 is powered-off), the LDO shuts down correctly, with VOUT dropping to 0 V.However, when STM drives PC1 low, the EN pin voltage appears close to 0 V, but VOUT remains at 1.8 V.Vin is within the recommended range and remains the same in both cases. I’ve attached two scope captures showing two different behaviors. In both:Blue = VEN (EN pin voltage)Orange = VOUT (LDO output)In Figure 1 STM32 is not in use and I manually drive the enable pin to the GND and to VCC interchangeably. As expected, VOUT drops to
Hello,I am beginning development with MCUs, am new to this. At the moment, I am at the design stage.I have identified a device which seems most suitable for my application, STM32G0B1CET in this case.I am trying to understand the I/O constraints. I would like to be able to, once in a while, use the bootloader to update firmware in-system.On this particular device, If I understand correctly, the bootloader is designed to use any of a long list of peripherals (two USART, two I2C, two SPI, USB, and FDCAN) - and it accordingly configures the device for this purpose.This appears to very seriously constrain how the pins may be connected on my board (to avoid unwanted interaction or conflict during the boot phase).So it seems that, even if "naively" the device has enough I/O for my application, many of them can't be used just because of how the bootloader (even temporarily) configures them.What am I missing?Thank you.
Hello ST Team and Community,I’m working with the X-NUCLEO-IHM07M1 board for 6-step sensorless BLDC control, and I need some clarification regarding the purpose and correct use of the GPIO_BEMF pin.In this ST Community answer, it is mentioned:"The GPIO_BEMF pin is provided to manage the BEMF sampling during the PWM ON state for 6-Step control only."I understand that this refers to enabling the BEMF voltage divider (e.g., 10k/2.2k) to bring phase voltage into the ADC range during PWM ON time. However, on the X-NUCLEO-IHM07M1, it seems that even during the PWM OFF time, if GPIO_BEMF is not pulled LOW, the voltage divider is disconnected (floating bottom resistor), and the BEMFx signal becomes unreliable or unusable for ADC reading.So my question is:Do we also need to pull GPIO_BEMF LOW when sampling BEMF during the PWM OFF-state (e.g., mid-off-time) in order to enable the voltage divider and get a proper ADC reading?If not, how is the ADC expected to receive a reliable voltage at BEMFx wi
Hi Team, We are performing thermal simulation where the part STM32H753VI included in my board.We are powering STM with 3V3 and we would like to understand the below parameters,1)Tj,2)Thermal simulation data if any3) Efficiency to calculate the power dissipation? Also, we could see some document An5036: section 6.1.1,table 4: we would like to understand how you calculated the dissipation values? Note: we aware the document is for different STM from ours. Your prompt support on this will be highly appreciated !Regards,Manikandan R.
I'm developing a program and we want to be able to flash it via bootloader in production with a UARTTo do that, we are using a NUCLEO-F302R8 board to flash a custom board with a STM32G0B1 following this post: https://community.st.com/t5/stm32-mcus/how-to-program-an-stm32-with-another-stm32-using-an-embedded/ta-p/612362It worked, but only when flash was erased. In order to work in case of accidental disconection of UART wires, we need to be able to flash it in any case by pulling BOOT pin highThe option bytes were:nBOOT1=1, nBOOT0=1, nBOOT_SEL=1. That means I was in the fourth line scenario, it attempted to boot from Main Flash and only booted from bootloader when it was empty regardless of BOOT0 pin stateTo fulfill the requirements of the project, I needed to set the first and second lines scenario, so it would boot from Main Flash when BOOT0 pin was low and boorloader when high. To do that, I changed the option bit nBOOT_SEL from 1 to 0Now, with nBOOT1=1, nBOOT0=1, nBOOT_SEL
I have SPI1 working in bare metal on a 48 pin version of the same chip, but I am having difficulty with SPI3 migrating to a 64 pin. For reference, I have attached the most recent stm32f103x6.h file from the Cube MX F1 package (STM32Cube_FW_F1_V1.8.0). SPI3 is on APB1, and SPI1 is on APB2.The first strange thing, if you look at line 17 of the code below, there is no "RCC_APB1ENR_SPI3EN" defined in the stm32f103x6.h file. When using SPI1, you can use "RCC_APB2ENR_SPI1EN" - which IS defined in the .h file. So I didn't think much of it and just manually set bit 15 of APB1ENR, corresponding to the SPI3 enable (Page 116 of reference manual RM0008).The second strange thing is "SPI3" simply is not defined in the stm32f103x6.h file. For instance, if you change line 34 to "SPI3->CR1...", it won't recognize SPI3 and gives an error.It's acting like SPI3 doesn't exist on this chip. There are no references to SPI3 (or SPI2 for that matter) in the 
Hardware environment: STM32 Nucleo-64 development board with STM32C071RB MCU.Software environment: Bare-metal operation without RTOS.I am currently working on a USB composite device without an RTOS. Previously, I used STM32CubeMX to generate and modify separate HID mouse and CDC virtual serial port programs, both of which worked fine.This time, I added a CDC component to the HID mouse program. After generating the code with CubeMX and supplementing the CDC interface functions, I encountered an issue with PMA endpoint memory allocation. I referred to the code example in the CubeMX repository (STM32Cube\Repository\STM32Cube_FW_C0_V1.4.0\Projects\NUCLEO-C071RB\Applications\USBX\Ux_Device_HID_CDC_ACM), which has the following memory configuration:HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x00, PCD_SNG_BUF, 0x14);HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x80, PCD_SNG_BUF, 0x54);HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x81, PCD_SNG_BUF, 0x94);HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x01
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.