Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
We're using the following circuit to measure a battery voltage @ 20 kHz for use in motor control.We are having some issues though, where the ADC suddenly starts measuring 0 V (0 in the data register) and gets locked in this state. In this state, we also measured 0 V at the MCU pin on the board, and a resistance < 20 Ohm between the pin and GND, both using a multimeter. The issue is not fixed by a reset (pulse on the NRST pin), only removing the battery and power cycling the MCU.How and why can/does this happen?We initially thought it was overvoltage and tried connecting a PSU directly to an ADC pin on the STM32G474RE NUCLEO board. We only started seeing abnormalities at 6 V and destroyed the ADC at around 9 V, so this does not seem to be the reason.The ADC is clocked 170/4 = 42.5 MHz and configured as follows (from IOC file):ADC1.CommonPathInternal=null|null|null|null ADC1.DMAContinuousRequests=DISABLE ADC1.EOCSelection=ADC_EOC_SEQ_CONV ADC1.EnableAnalogWatchDog1=false ADC
Hi, I am using encoder mode TI1 and TI2 on TIM1 and TM3 to read encoder, however the polarity is just rising edge or falling edge. How do I know this encoder in x1, x2 or x4 mode?Thank you!
Hello,I am exploring the STEVAL-25R200A, and I want to build a pollingTagDetect application, using NFC10A1_PollingTagDetect that comes with the X-CUBE-NFC10 package, in STEVAL-25R200-STM32G0B1.ioc but i can't get it to work.When i flash the code into the steval, this prints in the com4 port:Welcome to X-NUCLEO-NFC10A1Toggling Wake Up mode ONAnd that's it, nfc tags are never detected.I made sure to update the IPs for the ones that STEVAL-25R200-STM32G0B1.ioc includes. The steval works just fine in ST25R200 EVAL GUI and ST25PC-NFC GUI.I appreciate your help
Hi,I'm attempting to write to an SD Card using a Riverdi STM32U5A9 display board. Since TouchGFX natively uses FreeRTOS, I'm attempting to keep it within FreeRTOS. Porting to ThreadX has caused it's own issues which I have in a separate thread. In the Configurator, there is no longer an option for FATFS, so I'm using the STM32U5 Classic MW Git Repository as recommended by the FAE. I copy over and update the templates as required, but am still getting a Hard Fault during f_mkfs while the HAL library is initializing the SDMMC. I believe that my configuration is incorrect, but the example is only for SDRAM, so I'm not entirely sure where I've gone wrong... I have it setup for 4-bit width and I've changed the clocks to be 24MHz at the SDMMC clock output. The examples within the configuration are for older MCUs and have a tab to enable the DMA. My understanding is that the STM32U5 has an Internal DMA, so it's not required to setup the DMA with
I have been trying for a while now to do something simular to this with threadxhttps://community.st.com/t5/stm32-mcus/how-to-use-stm32u5-with-freertos-in-tickless-mode/tac-p/857701#M1715I want to be able to put the MCU into STOP and wake from uart traffic, I am using threadx not freertos. I should note here that I have written a lot of code on the STM32U575 in the last couple years and have used threadx successfully quite a few times. Ultimately I want to add this to FW that is already running on a product so I would rather not change to freertos. For the purposes of figuring this out I am working on the nucleo board.The problem I am encountering is that the MCU never enters Stop at all unless I kill SRAM3. As a sanity check I also tried doing this without an RTOS:https://community.st.com/t5/stm32-mcus/how-to-wake-up-the-stm32u5-from-stop2-using-lpuart/ta-p/49436Its the same thing as the first link just without freertos or my threadx adaptation. It w
DMA stops working when I enable IWDG in .ioc on my STM32, even when commenting out the IWDG initialization for testing. DMA stops working when I enable IWDG in .ioc on my STM32, even when commenting out the IWDG initialization for testing. Before enabling IWDG, DMA is functioning normally.If anyone can help me, I don't have much experience with stm32, I'm just starting out. /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include <stdio.h> #include <string.h> #include "microwave_sensor.h" /* USER CODE END Includes */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ #define ADC_CHANNELS 2 /* USER CODE END PD */ /* Private variables ---------------------------------------------------------*/ ADC_HandleTy
Hello,I'm working on a low power project using STM32U073 with FreeRTOS, LPUART2 and LPTIM1.To achieve the lowest system power possible I am trying to use STOP2 for when the system is idle.Currently I have LPTIM1 releasing a semaphore every 1 second which then controls an I2C ASIC by grabbing the latest data then setting it going again for the next measurement.This part of the project works perfectly and will allow the MCU to fall into STOP2, wait for the LPTIM1 compare interrupt, wake the MCU and control the I2C device before then falling back into STOP2.While the MCU is in RUN mode, caused by LPTIM1, I can successfully service LPUART2 in that it will respond to a 'request for data' Modbus message.If a message is sent to the MCU while it is in STOP2 the request for data is missed.For testing I have disabled LPTIM1 IT and am trying to wake the MCU using LPUART RX alone and force the MCU to hold RUN for 100 ms so that I can see it on my power profiler, but all I am seeing is ~2ms activit
Hi, I am trying to configure my STM32G071GBU6 to enable reprogramming the flash throguh USART1. I check the datasheet of STM32G071x8/xB, reference manual RM0444, and application note AN2026. It says I am supposed to configure the PA9 (USART1_Tx) and PA10 (USART1_Rx) pins. The problem is when I configure the USART1 as asynchronous mode in STM32CubeMX, the software automatically set PB6 and PB7 pins as USART1_Tx and USART1_Rx. There are no available options like USART1_Tx and USART1_Rx for PA9 and PA10.I am wondering why the manual is inconsistent to the STM32CubeMX and how should I configure the MCU to correctly reprogram through USART1?
I'm having a hard time understanding when to use Unicode::snprintf vs Unicode::strncpy, also because I'm seeing different behavior when it comes to wildecards.I have a font where I've set various wildcard characters (see below)Now, I have a text area with a buffer of 10.If I use Unicode::snprintf(myTextBuffer, MYTEXTTEXT_SIZE, "%s", "myText");I'm seeing the text on the touchscreen as ???, so it basically falls back to the fallback characters.Instead, if I use Unicode::strncpy(myTextBuffer, "myText", MYTEXTTEXT_SIZE); I correctly see myText as the textWhy is that?
Hello I have custom board with STM32N657. I have set timer 2 to output PWM pulse on channel3 and output compare pulse on channel 1 as trigger to another timer. The timer starts when external trigger - TIMER4_ETR (mapped to timer 2) detects rising edge. All works good, there are continuous pulses as expected. I want timer2 to run once per trigger so enabling One Pulse Mode. static void MX_TIM2_Init(void) { /* USER CODE BEGIN TIM2_Init 0 */ /* USER CODE END TIM2_Init 0 */ TIM_ClockConfigTypeDef sClockSourceConfig = {0}; TIM_SlaveConfigTypeDef sSlaveConfig = {0}; TIM_MasterConfigTypeDef sMasterConfig = {0}; TIM_OC_InitTypeDef sConfigOC = {0}; /* USER CODE BEGIN TIM2_Init 1 */ /* USER CODE END TIM2_Init 1 */ htim2.Instance = TIM2; htim2.Init.Prescaler = TIM2_PRESCALER; htim2.Init.CounterMode = TIM_COUNTERMODE_UP; htim2.Init.Period = TIM2_PERIOD; htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE; if (HAL
Hello everyone, Some time ago I asked on this website information about jitter on a PWM : Solved: PWM jitter - STMicroelectronics CommunityThe problem was that when generating a PWM, it wasn't very stable. At the time changing the source clock to the external clock of the nucleoboard worked and stabilized everything.Since then, I created my own board using an STM32G474QE (128 pins) with an 8MHz (+/-50ppm) external oscillator.I tried to generate the PWM and I am encountering the same exact problem again, the jitter is back. This time, I directly setup the clock as the external one. I checked it up and it feels to me that the problem could be coming from the stability of my oscillator (I have frequency variation on it's output ranging from 7,999,950 to 8,000,050Hz). Now my question is, could this really be the problem and could a lower ppm oscillator work ?I tried looking up information on my own especially using AN2867 but I only get information about crystal os
Hello, i created a custom external loader for a STM32F429 board.The problem is now, my code needs HAL_Delay() for generating short delays between flash device accesses. And the code freezes when executing HAL_Delay(). So i have read that interrupts are no longer allowed at newer versions of CubeMXProgrammer.But HAL_Delay() seems to need a working SysTick interrupt.I used this tutorial for my custom EL:https://community.st.com/t5/stm32-mcus/how-to-add-your-spi-flash-into-the-stm32cubeprogrammer-s/ta-p/49392 IsSCB->VTOR = 0x20000000 | 0x200;the right value for my F429? Further i tried uncommenting#define USER_VECT_TAB_ADDRESSand#define VECT_TAB_SRAM But still no success. Does someone know what else has to be fixed? Thank you.
I'm using STM32G474 with dual ADC injected simultaneous mode. İndividual ADC injected mode works ok. ADC1 is triggered by TIM1 Channel 4 and the interrupt is firing correctly, but ADC2 always returns zero. Questions: Why does ADC2->JDR1 always return 0 in dual injected simultaneous mode? Is it correct that HAL_ADCEx_InjectedStart_IT(&hadc2) returns HAL_ERROR in dual mode? You can see my ADC1 and ADC2 configuration. void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef* hadc) { if (hadc->Instance == ADC1) { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_SET); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_RESET); adc1 = ADC1->JDR1; adc2 = ADC2->JDR1; } } static void MX_ADC1_Init(void) { /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ ADC_MultiModeTypeDef multimode = {0}; ADC_InjectionConfTypeDef sConfigInjected = {0}; ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC1_Init 1 */ /* USER CODE END ADC1_I
I’m working on an STM32F746-based project. I know how to port ThreadX to this board, and I want to use the ThreadX source available on GitHub. My question is about integrating ThreadX with TouchGFX. Specifically, I want to understand: What steps are needed to make TouchGFX run on top of ThreadX? Do I need to modify the TouchGFX-generated code or middleware when using ThreadX from GitHub? How should I create and manage the TouchGFX task inside ThreadX? What is the recommended project structure for combining STM32F7 + ThreadX (GitHub version) + TouchGFX? Are there any example projects or references for this integration? Any documentation, sample projects, or practical guidance would be very helpful.
Hello,I am using the Nucleo STM32WB55 board and noticed that when I press the user button, the interrupt service routine (ISR) is triggered only after about 3.5–4 seconds. This delay occurs even before reaching the callback function — the ISR itself is reached late.I have not initialized or configured any BLE stack functionality; this is just a basic GPIO interrupt setup. I have also used other Nucleo boards and never experienced this kind of delay.Has anyone else encountered this issue or found a solution?Thanks,Shreyas
Hello,I would like to know if there is a planned release date for STM32H7 support with MbedTLS v3.Thank you.
Hello, I am a beginner with STM32 and LTDC and I would like some guidance. I have a STM32F429I-DISC1 board and an external 7" TFT LCD panel, model TD070WGCB2 (854 x 480, 24-bit RGB, HSYNC/VSYNC/DE/NCLK).According to the panel datasheet, it uses a parallel RGB interface with: R0–R5, G0–G5, B0–B5 HS (HSYNC), VS (VSYNC) DE (Data Enable) NCLK (pixel clock) VDD = 3.3 V The backlight is CCFL and I am planning to drive the backlight from the original board / inverter, not from the STM32.With the STM32F429, I only want to generate the video signals (RGB, HSYNC, VSYNC, DE, CLK) and show graphics created with TouchGFX. My questions: Is the STM32F429I-DISC1 LTDC peripheral suitable to directly drive this panel (RGB 24-bit, 854x480)? Do you have any recommended LTDC timing settings (pixel clock, HSYNC/VSYNC, back/front porch) for this panel? The datasheet suggests a pixel clock around ~33 MHz and provides timing values, but I’m not sure how to correctly map them into CubeMX LTDC fi
Hi,I designed a PCB with 4 STSPINs where individual STSPIN is based on the EVSPIN32G4 board schematics, i am generating code using the ST motorcontrol workbench.I am able to run and control all 4 motors except for that fact that the STSPIN's get very hot(around 65-70 degrees) as soon as i turn on the power, this is regardless a motor being connected, and i noticed the same behaviour even after doing a full chip erase.i am powering the board using a 24V supply, and 8V and 3.3V is being generated buy the internal buck and LDO respectively, i am not using the supply generated by the STSPIN anywhere other than the sensing and feedback circuitry required. i am attaching below the photos i took using a thermal camera of my custom PCB.
Hello, My STWINKT1B (STEVAL-STWINKT1B) had been working fine, but suddenly it is no longer detected by PySDK.Now the red LED blinks rapidly (≈4 Hz) and no USB/COM device appears in Windows Device Manager.To recover it, I performed a full flash using STM32CubeProgrammer + ST-LINK (SWD), with the official firmware:C:\Users\User\Downloads\fp-sns-datalog2\STM32CubeFunctionPack_DATALOG2_V3.1.0\ Projects\STM32U585AI-STWIN.box\Applications\DATALOG2\Binary\datalog2_release.binFull erase → Program + Verify = OK, but after reset the symptom remains: fast red LED blinking and still no USB device.During the firmware update, both the ST-LINK and the board were connected to my laptop.I also powered the board via micro-USB for more than 2 hours, but the red LED keeps blinking at the same rate (no green LED).I tried different cables/ports/PCs, battery OFF/ON, and a FAT32/MBR microSD (also tried empty card), but the issue persists.Could you clarify:What does the fast-blinking red LED (~4 Hz)
I planning to use STM32H573 (LQFP) for Ethernet based on RMII. Is this controller support to all RMII signals. Please suggest the clock frequency shall give from external or internal, which one is the best.
I am currently working with an STM32WB05N as a co processor to a STM32U5, but I think the basic flow should be the same for all WB products. But I didn't find an AN or example for it.My device is acting as a central and connecting to a (WB55 based) peripheral which uses aci_l2cap_connection_parameter_update_req. My central receives this though aci_l2cap_connection_update_req_event. So far so good.But now I want to accept the proposal with aci_l2cap_connection_parameter_update_resp using the same parameters received through the request and Min_CE_Length as well as Max_CE_Length using the same values I used for the original connection opening (and 0x01 for accept). But I get a 0x12 BLE_ERROR_INVALID_HCI_CMD_PARAMS.What am I doing wrong? (and is there example code for connection update somewhere?)uint8_t s_Identifier; uint16_t s_Connection_Interval_Min; uint16_t s_Connection_Interval_Max; uint16_t s_Max_Latency; uint16_t s_Timeout_Multiplier;
Hi,I'm working with an STM32WB5MMG. I need to use both USB and BLE. I see that there are some threads opened about problems regarding the use of both USB and BLE in the same project due to the HSI48. However, I added LL_HSEM_1StepLock(HSEM, 5) to prevent the CPU2 to disable the HSI48 oscillator when it does not use anymore the RNG IP. It was working until I add all the peripheral. I report my main code.Someone has suggestion?Thanks.int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* Config code for STM32_WPAN (HSE Tuning must be done before system clock configuration) */ MX_APPE_Config(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* Configure the peripherals common clocks */ PeriphCommonClock_Config(); /* IPC
Hello everyone,For a while now, I have been writing my hardware jpeg driver for the STM3U5G9, I am near the end but a last (last?) major problem remains.With a grayscale 8-bit image (on the left), the output encoded image (on the right) is totally different from the input. (the output screenshot is decoded by an external jpeg decoder). I also observe the same behavior with HAL/MX configuration, so I only share the HAL/MX code for simplicity matter.MX_JPEG_Init(); JPEG_ConfTypeDef cfg = {0}; cfg.ChromaSubsampling = JPEG_444_SUBSAMPLING; cfg.ColorSpace = JPEG_GRAYSCALE_COLORSPACE; cfg.ImageHeight = 480; cfg.ImageWidth = 640; cfg.ImageQuality = 75; int length = cfg.ImageHeight * cfg.ImageWidth; HAL_JPEG_ConfigEncoding(&hjpeg, &cfg); HAL_JPEG_Encode(&hjpeg, img, length, img_jpeg, length, HAL_MAX_DELAY);For grayscale only image, do I need to do extra steps to make it work ?I saw (A)RGB image conversion to YCbCr functions (expensives to perform as a whole), do I need to per
I am currently working on a project using the STM32F401RE Nucleo board interfaced with a 3.5-inch TFT SPI display (ILI9488 driver). I am facing an issue where the display does not show any output, even though the backlight turns on and the code uploads successfully without errors.I have already checked the SPI connections, power supply, and display initialization code, but the screen still remains blank. I would like to kindly request your guidance or any reference materials/libraries that can help me correctly configure and test the display with STM32CubeIDE.If possible, I would appreciate help with:Correct SPI configuration for ILI9488Required GPIO pin mapping (DC, RESET, CS, etc.)A working example code or initialization sequenceAny known issues or recommended libraries for STM32F4 + ILI9488Your support will greatly help me continue my project. Thank you
Hello!From the datasheet, I could tell it was a BAT54AFILM (due to the D84 marking), but I couldn't figure out what E1 meant. Could you help me decipher this?Thx!
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.