Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I'm trying to use 2 timers (TIM1, TIM8) in sync.Everything works OK when using same value for both timers' ARR.But drift occurs when using two different values as ARR (i.g. 3999 for TIM1 & 19999 for TIM8).What could be causing this drift? tim.c/* TIM1 init function */ void MX_TIM1_Init(void) { /* USER CODE BEGIN TIM1_Init 0 */ /* USER CODE END TIM1_Init 0 */ LL_TIM_InitTypeDef TIM_InitStruct = {0}; LL_TIM_OC_InitTypeDef TIM_OC_InitStruct = {0}; LL_TIM_BDTR_InitTypeDef TIM_BDTRInitStruct = {0}; /* Peripheral clock enable */ LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_TIM1); /* TIM1 interrupt Init */ NVIC_SetPriority(TIM1_UP_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),0, 0)); NVIC_EnableIRQ(TIM1_UP_IRQn); /* USER CODE BEGIN TIM1_Init 1 */ /* USER CODE END TIM1_Init 1 */ TIM_InitStruct.Prescaler = 0; TIM_InitStruct.CounterMode = LL_TIM_COUNTERMODE_UP; TIM_InitStruct.Autoreload = 3999; TIM_InitStruct.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1; TIM_
We are currently developing two LoRaWAN-based products using STM32WL55J (battery powered and Mains AC). Both devices are designed to sample sensor data every 30 seconds and transmit it according to a defined daily duty cycle.However, we are facing challenges in maintaining accurate timing synchronization: The internal RTC is already being utilized by the Sub-GHz radio stack, limiting our flexibility. Using the Timer Utility for periodic alarms leads to cumulative delays over time - for example, if the first alarm triggers at 12:00:30, subsequent triggers drift gradually and no longer align with real local time (e.g., 12:01:00, 12:01:30, etc.). We are looking for general design guidelines for STM32-based LoRaWAN devices that require long-term periodic data acquisition synchronized with real time. Specifically:Is it common or recommended to use an external RTC (e.g., via I²C/SPI) in such designs? Are there firmware design patterns or best practices for maintaining rea
picture tells all. the resolver says these two functions have conflicting IP settings but the settings themselves apparently not.
I'm trying to start a timer when input GPIO becomes high (on its rising edge), at the same time i want to pull another GPIO to low. This is time critical.I'm using an external adc which will output a ready signal, at that time i want to pull CS pin to low and wait for a delay (tREAD), at the end of timer , want to pull the CS back high. Which is the best way to do, as i need the least latency.I'm using Nucleo H723ZG
HelloI'm using a NUCLEO-N657X0-Q board and trying to bring up ethernet in RMII mode using STM32CubeIDE. :small_blue_diamond: Issue Description:When I run the application in the non-secure project, the Ethernet DMA bit (in ETH_DMASR) does not clear after transmission.The same configuration works correctly when running in Secure mode.:small_blue_diamond: Clarifications Requested:In which context should Ethernet initialization (MX_ETH_Init()) be performed — FSBL, Secure, or Non-secure?Should the ETH clocks and DMA be configured in the Secure project, with only application-level operations done in non-secure?Any guidance or official examples on the proper initialization flow and DMA handling for Ethernet on STM32N6 would be greatly appreciated.I have attached my CubeMX .ioc file (for both Secure and Non-secure projects) and a snippet of my memory configuration for reference and analysis.Is there an example project or reference demonstrating Ethernet initialization (LAN8742,
Hello everyone,I'm working with a NUCLEO-N657X0-Q board and trying to read audio data from an INMP441 I2S microphone using SAI2 in Master Receive mode with DMA. I have configured everything in STM32CubeIDE, but the DMA transfer complete interrupts are never firing.Here is a summary of my setup and the troubleshooting steps I've taken.Hardware Setup:Board: NUCLEO-N657X0-QMicrophone: INMP441Connections:PE12 -> SCK (SAI2_SCK_B)PE13 -> WS (SAI2_FS_B)PE11 -> SD (SAI2_SD_B)Mic L/R pin is connected to GND.Mic is powered by the board's 3.3V supply.STM32CubeIDE Configuration (.ioc):Project Type: FSBL only (no Appli).SAI2_B Configuration:Mode: Master ReceiverProtocol: I2S Philips StandardData Size: 24 BitsNumber of Slots: 2Audio Frequency: Set to 16 KHz.DMA Configuration:SAI2_B is linked to HPDMA1_Channel0.Mode is set to Circular.NVIC Configuration:HPDMA1_Channel0 global interrupt is enabled.Clock Configuration:SAI2 Kernel Clock is configured to ~2.048 MHz (derived from PLL2). It is not
Hi,I’m currently working on the STM32G491 series MCU. Our requirement is to support OTA firmware upgrades. In case the flashing process fails, the system should automatically revert to the previous firmware.Does the STM32G491 support this feature by default, or do I need to implement a custom bootloader to handle the fallback mechanism?
We have a custom board using STM32H750IB and a single QSPI flash memory MT25TL01G. The QSPI pin for the flash memory is the same as STM32H750B-DK board, which is PF10 for CLK, PG6 for CS, PD11/PF9/PF6/PF7 for IO0-3. I saw several posts mentioned the external flash loader for this configuration; can anybody share the source code or the flash loader file? Thanks for the help.
Hello Everyone, Am looking for a little help on what I hope is a simple issue. A quick summary is when I use freeRTOS + STM32Cube and set a breakpoint in one of the default task lines it never triggers. Breakpoints enabled before the scheduler is started work ok. Can anyone point me in a direction to remedy this? Will provide more details below. BTW, I'm new to the community and this is my first time posting. Happy to hear any suggestions from any of you that will improve my posts. Details purchased a STM32F769I-DISCO eval board. I have a simple project that blinks the DISCO board LEDS originally it was done without the RTOS enabled. Breakpoints and all worked great added the FreeRTOS and moved the blinking code over to use OS related stuff in the default task. the program ran ok. however, when a breakpoint is set it never pauses the app i configured the RTOS proxy and that all appears to be working fine if I manually pause the app. i also fou
I have GPDMA working on STM32U5 with a circular buffer. However, when I add a GPDMA "trigger" to the setup, the DMA no longer works. GPDMA1_C2TR2.TRIGPOL=2 GPDMA1_C2TR2.TRIGSEL=11 GPDMA1_C2TR2.TRIGM=3 LPTIM1 setup to clock away at a 50% duty cycle. What I would expect to see is the DMA transfer working slower than normal based on the ARR period of LPTIM1. But, the above combination of values along with a few variations just results in stopping the DMA. What would be helpful is some example application running on a nucleo board which makes use of a GPDMA driven device where both a DMA request and a DMA trigger are being used. (Documentation seems to be lacking. They do describe what the triggers are and from what I can tell how they should work, but because it is not working some vital clue is missing or hidden.)
Hi,I noticed there is no Stm32H7 Ethernet PTP example available anywhere. The ST support for PTP is very poor. I wanted to make an example and get it out for review to bring more visibility to the issues with PTP and see if I could solve some issues which are bugging this implementation. Link: https://github.com/chris1seto/Stm32H723NucleoPtpExample ST, could you please comment on the issues covered in this example? For any others, if you have solutions to any of these problems, could you fork/PR to add fixes or just post here so I can include fixes? Issues are detailed in the readme, but I copy and pasted them below:"Tail pointer issueWith the stock HAL code which is supposed to correctly implement Eth RX tailpointer calculation, reception doesn't work with timestamping enabled.In this project's Eth hal driver, I simply write the tail pointer to 0. It's not clear how the tailpointer is supposed to work and the documentation doesn't clearly explain it.The Stm32CubeH7
Hi everyone,I am using the X-NUCLEO-GNSS1A1 (Teseo-LIV3F) with a NUCLEO-H753ZI board.The UART2 interrupt is working correctly, verified by "[GNSS_RX] UART RX Callback triggered",but the GNSS module does not send any "$GPGGA" or NMEA sentences.Only binary-like data such as "E" or 0x00 are received.The FSM remains in fsm_discard state and never detects the "$" character.Hardware setup:NUCLEO-H753ZIX-NUCLEO-GNSS1A1 (Teseo-LIV3F)STM32CubeIDE 1.19.0, X-CUBE-GNSS1 middlewareUART2 via Zio connector Jumpers: Closed: J3, J13, J5, J9, J12, J11, J14, J15; Open: J2, J4, J6, J7, J8, J10GNSS board green LED is ON (steady)Software behavior:Initialization appears successful:[BSP_INIT] MX_USART2_UART_Init SUCCESS[TESEO_INIT] Initialization completed successfully[GNSS_CB] UART callbacks registration doneUART2 interrupt log:USART2 IRQ triggered[GNSS_RX] UART RX Callback triggered[FSM] discard: 0x00 (.E I would appreciate any guidance on this issue.I also attached my set-up and Project File.&nbs
Hi,we have an STM32H735G-DK eval board with product identification DK32H735G$AT3 but can not find the differences to older DK32H735G$AT2andDK32H735G$AT1product versions in the user manual:https://www.st.com/resource/en/user_manual/um2679-discovery-kit-with-stm32h735ig-mcu-stmicroelectronics.pdf Can you tell us the differences between DK32H735G$AT3 and the older versions? Thank youRK_IOT
I am trying to flash the STM32H753I-EVAL-2 board with a .hex file generated from STM cube IDE version 1.14.0. The code is build without error, but while loading it using the STMCube Programmer, I am getting the following errors:Error: Failed to download Segment [1]These are the options that I have selected while starting the programming : External Loader selected: M29W128GL_STM32H743I_EVALKIndly help.
Hello, everyone. Can anyone tell me how? I want to do something while STM erases a sector, Since it is STM32F401, it takes too long to erase a sector. What can be the best solution?
Hi All, Trying to setup timer triggered DMA for the STM32H7S3V8T6 micro and cannot seem to get it workingI have tried a number of things and eventually resorted to asking chatGPT but so far no dice... What I want to achieve1. Timer 1 toggles CH1 output (PA8) this works 2. I want the DMA to trigger off of the TIMER_CH1 and shove the word into GPIOA->BSRR to toggle the GPIOA pins 0,1,2,3Here's my main. c code - really stumped as to what is causing this to not work... Any thoughts?? /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : STM32H7S3 GPIO output driven by TIM1 using GPDMA1 linked-list ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include <stm32h7rsxx_hal_dma_ex.h> /* Private variables ------------
STM32C071GBU6 PA2 (pin 8 on the UFQFPN28 device) is configured as ADC_IN2. What voltage can be expected when the pin is unloaded?
I would like to test UART Bootloader on my NUCLEO-C092RC.System Bootloader mode can be selected pressing the BOOT (B3) pushbutton while resetting the STM32C092 mcu through RESET (B2) pushbutton and without the ST-Link interference removing JP2, JP4, JP6, JP7 jumpers, right?UART2 on PA2 (TX) and PA3 (RX) port-pins is one of the UARTs handled by System Bootloader, right?UART2 is already connected as Virtual Com Port (VCP), so it can be used with bootloader through CN1 USB-C connector, right?Furthermore, BOOT0 pin must be enabled for boot mode selection in the User Option Bytes, right?Now, my STM32C092 mcu has nBOOT_SEL bit just cleared in Opton Byte and my simple led blinking application is running. If I keep BOOT pressed while I press and release RESET, my led blinking app still start running and STM32CubeProgrammer does not connect with the target.Is my procedure correct? How to start NUCLEO-C092RC in System Bootloader through BOOT pushbutton?And UART2 as VCP is available to test
Does anyone know if there are any software stacks available through ST that support DALI 2 colour tuneable (DT8) control gear devices (LED drivers). I can see that ST have a third party offering from MBS Solutions that claims to offer full DALI2 support but after contacting them they say that it doesn't support any DT8 control gear commands except RGBWAF - which none of my clients are asking for ...
Hello,I have strange behavior with reset, with reset pin, NVIC_SystemReset() or then IDWG fires the MCU just stops and do not restarts with debugger connected or without, when debugger is connected and toggle reset there text is displayed what address is out of scope, where to search for problems ?Reset pin is connected to 100nF capacitor, oscilloscope do not detect any activity on RST pin then NVIC_SystemReset() or IDWG firing, to connect with cubeProgrammer or upload code from cubeIDE I have to keep reset low and then turn on power, later until power is not disconnected there is no problems to connect and upload code many times.If before power applied reset is keept low and then released the code do not loads, but I can connect with debugger and upload code.If at power up reset is not low then code starts normally, the FSBL and then APPLI starts like expected.The main problem about reset problems what IDWG do not restarts MCU, MCU just stops.
Title edited to be clear that this is on a NUCLEO-F303ZE board.Hello all.I'm trying to write a simple message via UART to Putty using stm32f303ze microcontroller. I'm using USART2, via ST-link. All the configurations have been confirmed (baud rate, COM port, bits, etc.) And they are right. I even tried using the STM32 Cube IDE Terminal with no luck. Now I'm not sure if the problem is the UART I'm using, or I'm doing something wrong in the code.Also I'm not sure about the UART that support VCP in STM32F303ZE microcontrollers. However I tried all the USART, and the were no response in the Terminals. Below is the simple message I'm trying to send and the full code./* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights re
HIUsing stm32f303veh6.Changed the option bytes with the CubeProgrammer. 2.20.0 to override the BOOT0 signal. ( its floating )nBOOT1 - > uncheckedBOOT_SEL -> unchecked I see that the address on start is 0x1FFFF.. and my FW on flash does not run. For debug, I I did some external wiring of the BOOT0 signal to GND, and now my FW boots fine.Looked in Errata for know issues, but could not find any related. Any reason for Option Bytes not to work?
I have been attempting to interface a STM32U575 mcu to a dual HYPERRAM/Flash memory set up in multiplexed mode as shown in the following image taken from the STM32 Octo-SPI AN5050 application note. I am trying to implement a POSIX based RTOS and have thus been trying to create this setup in my project devicetree as follows: &octospi2 { pinctrl-0 = <&octospi_pins>; pinctrl-names = "default"; status="okay"; flash: ospi-nor-flash@0 { compatible = "st,stm32-ospi-nor"; reg = <0>; size = <DT_SIZE_M(512)>; ospi-max-frequency = <DT_FREQ_M(50)>; spi-bus-width = <OSPI_OPI_MODE>; data-rate = <OSPI_STR_TRANSFER>; status = "okay"; }; hram: ospi-nor-flash@1 { compatible = "st,stm32-ospi-nor"; reg = <1>; size = <DT_SIZE_M(512)>; ospi-max-frequency = <DT_FREQ_M(50)>; spi-bus-width = <OSPI_OPI_MODE>; data-rate = <OSPI_DTR_TRANSFER>; status = "okay"; }; }; and I have also tried: &octospi2
Hello,Regarding the STM32N657, I'm not using the internal SMPS. My question is: Do we need to put capacitors on the 6 VDDSMPS pins or can they be left as no connect? Same question on the VLXSMPS pins... do we need the capacitors on these pins, or can they be left as no connect?Also, on the STM32N657-DK board, there is a snubber circuit on the VLXSMPS pins, why?Finally, when I say "No connect", I assume these pins are connected internally, so it does not require an external link on the PCB when not used. Is this correct? (this will probably make the routing of the PCB easier)We are dealing with a very Very VERY small PCB, and saving the space used by 12 x 0402 makes a difference.thanks
Hello Everyone,I am facing an issue with my MCU entering low-power mode.My idea is to freeze the Independent Watchdog (IWDG) counter in STOP mode so that the MCU will not reset due to the IWDG counter elapsing.From my understanding, this can be achieved by clearing bit 17 (IWDG_STOP) of the FLASH_OPTR register, if I am right. As per the reference manual, in STOP mode, the IWDG can be automatically frozen depending on the configuration of the IWDG_STOP bit in the FLASH_OPTR register.So, the IWDG should not reset the MCU during STOP (sleep) mode, correct?If both assumptions are correct, could you please share the steps or example code to:Configure the IWDG to operate (or be frozen) in STOP mode, andSet up the FLASH_OPTR register appropriately for this behaviour?
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.