Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi everyone, I'm using an STM32H755 microcontroller to read 20 temperature sensors (NTC thermistors) via 20 ADC channels for a testing setup. Each thermistor is wired in a simple voltage divider circuit like this: [VCC] -- [NTC] --+-- [Fixed Resistor] -- [GND] | [ADCx] All 20 ADC inputs are configured identically (same sampling time, resolution, continuous mode disabled, calibration enabled). However, I've noticed that ADC1_IN9 (PB0) consistently reports a temperature value that is ~3°C lower than the others. The remaining 19 channels produce nearly identical readings under the same conditions. Same NTC , same RES. Here’s what I’ve already checked: - ADC sampling time is long enough (e.g. 64,5+ cycles).- GPIO analog mode is properly set.- No visible layout issues or external interference.- Measurements are stable and repeatable — the deviation is not noise.- Swapped NTCs between channels — issue remains on PB0. This is quite puzzling. - PB0 has an internal analog path that's affect
Hi Team, I am trying to add a Secondary/custom bootloader in SBSFU. But not able to figure it out how to do it. I changed memory for active slot area and used the same area for custom bootloader in both linker file of both SBSFU and custom bootloader application. But does not work as expected. Can you please guide me through this? I need to add a Custom bootloader and trigger user application from it. What are the modification that I need to do for this. I am using STM32H753 board. @Jocelyn RICARD
The ref manual (RM0481 page 2585) says: "This circuit has a defined startup time (tSTARTUP specified in the datasheet) during which the behavior of the USB transceiver is not defined.". I searched for USB and tSTARTUP but could not find anything in the datasheet (DS14258 Rev 1). Is it missing or mentioned differently ?
Lars Thomsen of the excellent https://stm32world.com has been creating hands-on, no non-sense tutorials about the STM32 family.Check out the complete list at https://stm32world.com/wiki/STM32_Tutorial_Videos
can some one please tell me why is the schematics the pd8 is connected to gnd?here is a picture of the schematics
Table 20, "CN9 ZIO Connector pinout" on page 40 of "UM2407 User manual Rev 2 - STM32H Nucleo-144 boards (MB1364)" lists the wrong pin name for pin CN9-15. It is listing PE0 while it should be listing PE9.
Referring to RM0444 and DS12232 (referring to STM32G0x1 programming manual and data sheet).In the Low Power section, the RM states that there are five wakeup pins:But in the register section, there is clear mention of WKUP3 (EWUP3 bit in PWR->CR3, WP3 bit in PWR->CR4, WUF3 bit in PWR->SR1, and CWUF3 bit in PWR->SCR).However, when I look at the CMSIS files (stm32g081xx.h), I see:#define PWR_SCR_CWUF_Msk (0x3BUL << PWR_SCR_CWUF_Pos)0x3B = 00111011 --> note, the third bit (CWUF3) is not included in the mask.Are the register maps in RM0444 wrong for including bits for WKUP3, or is there some hidden use for WKUP3 I haven't found yet?Edit: also, WKUP3 does not appear anywhere in DS12232 (Data Sheet for the STM32G071)
We are currently working on a custom motor control project based on the STM32G431CBU6 microcontroller. Our goal is to implement 6-step BLDC motor control for an A2212/6T three-phase BLDC motor.We have already referred to the online documentation and tried the available firmware examples from GitHub. However, the firmware did not perform as expected — the motor only vibrates briefly instead of running properly. We also sent a query earlier and were advised to use the community forum, but we have not received any valuable technical guidance or working firmware support so far.To help your team understand our setup better, we have attached our schematics for both the microcontroller and GANFET boards.We kindly request your technical assistance or reference firmware for 6-step motor control using the STM32G431CBU6. Any internal documentation, configuration guidance, or tested example code would be extremely helpful for progressing with our project.Thank you for your time and support. We tru
Hi, Why is DAC_OVP_Threshold = 23830 ? @GMA Thx :)
In RM0440, it states that "Generation of a single interrupt request for the DMA1 controller," however looking at the exception vectors indicates that there is a separate interrupt vector for each channel for both DMA 1 and 2. Also the stm32cube library header files reflect this.
Hello,I am currently trying to use the EMW3080 Wi-Fi chip on the B-U585I-IOT02A over SPI. I am using the Keil µVision IDE and I am trying to use a bare-metal approach without a HAL. I am trying to send data over to ThingSpeak from the temperature and humidity sensor that is built on the board. I have been having significant issues communicating with the EMW3080 over SPI. If anyone is able to provide some guidance, that would be very helpful. I am not able to get the SPI clock to generate. I do not know what SPI mode the Wi-Fi chip is, and I do not know what protocol I need to use to communicate with the chip. I have attached my main.c file.Thanks for any help.
Dear Community,I am currently working on managing IGBT switching in the frequency range of 20 kHz to 60 kHz. My setup involves directly applying a PWM signal to a pulse transformer, which successfully drives the IGBT. However, I am encountering an issue where the IGBT occasionally burns out at random intervals. After reviewing some documentation, I suspect this is due to hard switching, and I understand that soft switching could improve efficiency and reliability.From my research, I learned that soft switching may involve applying a short pulse to the IGBT to initiate an LC tank oscillation, then detecting the zero-crossing point (ZCD) to synchronize the next pulse. However, I am uncertain how to implement this in a half-bridge configuration. Specifically:Implementation Method: Should I configure a PWM with complementary outputs, or can I achieve this by manually toggling two GPIOs with a controlled delay?Oscillation Synchronization: How can I effectively read the ZCD signal
Hello,I’m working with the EVLSERVO1 board (STSPIN32G431) and using ST-LINK V3 + STM32CubeProgrammer.Connection: SWD (ST-LINK V3 to J1 header)CubeProgrammer connects and uploads HEX file successfullyBOOT0 = GNDNRST is wired correctlyAfter reset, MCU does not appear to execute my code (tested with simple LED blink and with motor-control firmware).I also tried “connect under reset” → programming OK, but still no execution.Questions:Is there a specific jumper or power setup required on EVLSERVO1 to run user code?Which GPIO pin controls the user LED (for a blink test)?Does ST provide a ready-to-use motor test firmware for EVLSERVO1 that I can flash to confirm hardware is OK?Could the problem be due to missing motor supply voltage (VM) even when only testing LED blink?
Hi,I am using Tower Pro SG90 servo motor interfaced with STM32F401. Timer 2 is used for generating PWM and timer 5 is used for generating the delay. I tried multiple code changes by myself and also took help from internet, but the servo jitters a lot, gets heated and gives the incorrect angle. Can anybody check my code and help me out?#include <stdlib.h> #include <stdint.h> #include <stm32f401xe.h> /*************This structure defines the registers for general purpose timers 2 and 5*************/ typedef struct{ volatile uint32_t REG_CR1; uint32_t RESERVED0[2]; volatile uint32_t REG_DIER; volatile uint32_t REG_SR; volatile uint32_t REG_EGR; volatile uint32_t REG_CCMR1; uint32_t RESERVED1[1]; volatile uint32_t REG_CCER; volatile uint32_t REG_CNT; volatile uint32_t REG_PSC; volatile uint32_t REG_ARR; uint32_t RESERVED2[1]; volatile uint32_t REG_CCR1; uint32_t RESERVED3[8]; }TIM_REG_DEFINES; /*************This structure defines the registers for GPIO****
I am currently working on integrating the AFBR-S50 Time-of-Flight sensor with STM32F030CCT6 microcontroller.I have seen that there's an official document and example for AFBR-S50 and STM32F401RE, which includes the whole setup and integration. But I haven't come across anything similar for F0 series(especially STM32F030CCT6).I have the reference manual and datasheet for the MCU but I'd like to know if anybody is working with same setup and if they can help.If someone can provide any tips or guidance on integration and timing configurations. Any insights, experiences, or example references would be really appreciated. I am attaching a project that I have created using the porting guide available for STM32F401RE. I am having problem in the Periodic interrupt test and finally I am not getting the MeasurementCallback which will result in increment of mydatareadyevent variable. If there's any other problem in the code, please mention that as well. Thanks i
I got my custom stm32F746 PCB Working! It is based on the STM32F746G-DISCO. So, for the first revision I used the same capacitive touch lcd used on the Disco. So that all works! But I need a resistive lcd, so I designed in a TSC2046IPWR controller. I just want to connect a resistive panel and get it to function. Not really sure best way to proceed to disable the capacitive control and add the resistive? Any insight would be appreciated.
Hello folks,I've been having a weird issue and haven't found anyone else with the same problem, so I figured I'd post here.I have a project for the STM32H735 BLANK. The PCB has an 25 MHz external oscillator (ABM8W-25.0000MHZ-8-D1X-T3) used as the HSE.When I use the 64 MHz HSI or the 25 MHz HSE without the PLL to generate the sysclock, SWV printing works great. When I run them through the PLL (I'd like to run this with a sysclk at at around 450 MHz), even if I set up the PLL to output the same clock it is given, SWV printing fails. I do not change any other aspects of the code. aside from the sysclock source. I am not forgetting to swap the sysclock on the IDE debug settings side when changing clock settings, and I know I've correctly set up ITM otherwise because I can see it when not using the PLL. Using the debugger and breakpoints, I've verified the code runs correctly for all test cases below (or at least does to the best my knowledge).Clearly, I'm missing something.My four test cas
Hi,I am trying to create a binary image that can be run from either 0x08010000 of 0x08044000 in a STM32L476 Processor using the Keil MDK-ARM 5.42.0.0 Development environment with the armclang 6.23/6.19/5.06 (Options I have tried) compiler.I am unable to find detailed documention on how to make this work.I have found a trivial project guidelines that does not really include any of the sections needed in the scatter file.here is the trivial example: https://developer.arm.com/documentation/100748/0624/Mapping-Code-and-Data-to-the-Target/Bare-metal-Position-Independent-Executables?lang=en However, this is not detailed at all and does not describe what is and what is not supported in Compiler 6.23/6.19/5.06 Here is what I have tried with 6.23:C/C++(AC6) flags: -fbare-metal-pie,Asm flags: -fbare-metal-pie <--- argument ununsed during compilationLinker flags: --bare_metal_pie.When I do this, I see the following linker warnings/errors: linking....\OBJ\ELSA-16T_Application.axf: Warning: L608
Hi everyone,I'm currently working on an obstacle-avoiding robot using the STM32F407 Discovery board and I'm running into issues with testing my HC-SR04 ultrasonic sensor.Hardware setup:TRIG connected to PA0 (configured as push-pull output)ECHO connected to PA1 (configured for TIM2_CH2 input capture mode)Using TIM2 to measure pulse width via input capture on Channel 2Running the code bare-metal (no HAL or CubeMX)The issue:I tried having Chat walk me thru how to use UART but that didn't work, so I tried testing the sensor by debugging it and see if the value for my distance changed in the expression window.When I tried running it, it wouldn't work, so I tried stepping over to see where it broke, and its stopping on line 118-119, right after the while loop. I had this issue earlier with the for loop on 113, but GPT was able to help me thru that one, but so far I am stuck on this part. I am doing this solo with GPT walking me thru it, so I am open to any and all pointers/advice.Apprec
Hi,I want to control a 4-pin DC fan (9RA1212P1K001). I need to run 3 identical fans at the same time and at the same speed. In this case, what is the difference between using 3 different channels of the same timer and connecting each to the PWM input of each fan, versus using only one channel of the timer and connecting the PWM pins of all 3 fans to that single channel?I should note that I'm powering this DC fan with an external power supply, and there's a MOSFET (AO3400) between the STM32 board's PWM-generating pin and the fan.BR
Is official rust support on the roadmap for st, or contributing dev time to open source libraries like embassy-stm?
I’m using an analog camera with a CVBS output connected to an ADV7280/TVP5150, which interfaces with the DCMI on the STM32H747. However, the LCD display is not showing any image. Previously, I used the OV5640 camera, and it worked fine. void CAM_DMA2D_Config(uint16_t xsize, uint32_t ysize) { /* output,Configure the DMA2D Mode, Color Mode and output offset */ hlcd_dma2d.Instance = DMA2D; hlcd_dma2d.Init.Mode = DMA2D_M2M_PFC; // no pixformat convert hlcd_dma2d.Init.ColorMode = DMA2D_OUTPUT_RGB565; hlcd_dma2d.Init.OutputOffset = 0; /* DMA2D Callbacks Configuration */ hlcd_dma2d.XferCpltCallback = CAM_DMA2D_TransferCompleteCallback; /* Input,Foreground Configuration */ hlcd_dma2d.LayerCfg[1].AlphaMode = DMA2D_REPLACE_ALPHA; hlcd_dma2d.LayerCfg[1].InputAlpha = 0xFF; //hlcd_dma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_RGB565; hlcd_dma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_YCBCR; hlcd_dma2d.LayerCfg[1].InputOffset = 0; hlcd_dma2d.Instance = DMA2D; HAL_DMA2D_DeInit(&hlcd_dma2d);
Hi all, I'm working with a STM32 Nucleo-F439ZI board and using MATLAB Simulink (Embedded Coder + STM32 support package) to generate code and deploy to the target. I’m trying to set up serial communication (USART) between the STM32 Nucleo-F439ZI and my PC using MATLAB R2025a + Simulink + Embedded Coder. I am using the onboard ST-Link virtual COM port via USB. I’ve tried using the Serial Transmit and Serial Receive blocks in Simulink, mapped to USART3. However: No data is being received on the PC using a terminal (TeraTerm, PuTTY). I have also switched to other UARTs like USART2. Still it is not working. Are there known issues or required initialization steps when using Serial blocks in Simulink with STM32 targets?Any working example models or documentation for basic serial I/O using Simulink and STM32 boards? Thanks in advance for any help or pointers!
Hello,I made a simple USB HID keyboard with a STM32F042 in bare metal (no HAL, no LL). Everything works great. Including LEDs and media key support. The only strange thing I am observing is that windows and linux are both sending the LED report twice in a row (the second one comes directly after the minimum poll ~10ms later). The first report is always 0x01 and the second one is the actual state of the LEDs. Now I could implement a "filter" but I was wondering if this is normal behavior? Or could I have an issue in my descriptor?Thanks Kind regards
I get the following error when trying to debug an STM32H757 with SWO enabled. Failed to enable SWV configuration.Failed to execute MI command:-data-write-memory 0x5c003010 x 4 0x77etc...It would seem the debugger (ST-link v2) is not able to read the SWO and DBGMCU registers.With the same debug configuration and code, SWO works on H747 hardware, so I'm wondering if there is an SWO difference between these two micros that is not obvious or documented.Has anyone come across this issue before and has an idea of how to fix it?Thanks
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.