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 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?
I'm using SPI3 and TIM3's PWM CHANNEL 1 on PB4.after HAL called __HAL_RCC_SPI3_CLK_ENABLE(), the PWM output disappeared...I want to know how to fix this.
I want to read a linear tape encoder. If I use only one function, it works; when I use two functions, it doesn't work properly and the motor vibrates. When I use a flag, both functions work properly. Why?Thanks./* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes --------------------
Hello,I'm using the STM32N657 processor and have the HEXASPI device running at 1.8V. VDDIO2 is connected to 1V8 supply (which affects: PO[5..0] and PP[15..0]The FMC is placing the A23 line on pin PO1 (this is the only option for the FMC-A23) and the FMC device is running at 3.3V. Can I place a pullup to 3.3V on PO1, or will this affect/blow the GPIO connected to 1.8V -OR- do I need to place a voltage translator on that pin?
Hello,I want to use the buffer program feature of my IS29GL064 NOR flash in order to increase the programming speed.For this I replaced HAL_NOR_Program() by HAL_NOR_ProgramBuffer() in the NOR flash demo and got a memfault. Did some debugging and doubt the code, especially because I found this post hereBUGS: HAL_NOR_ProgramBuffer() is riddled with them Has the reported bug, if any, been already fixed ?Second, I wonder if my ISSI flash is supported because of the following comment in stm32h7xx_hal_nor.cThis function must be used only with S29GL128P NOR memory.IMHO all devices which support the necessary commands, e.g. NOR_CMD_DATA_BUFFER_AND_PROG, should be able to use this feature and HAL function.Any hints, news, updates or comments?Thank you
Hello everyone,I’m working on a project using the STM32WB55RG microcontroller with FreeRTOS, and I’m trying to put the MCU into STOP Mode 2. The system is supposed to wake up regularly using the RTC.I’m using LL libraries to configure the power registers for STOP Mode 2. However, when I reach the _WFI() instruction, the MCU does not actually enter stop mode—it simply continues normal execution instead of waiting.Has anyone experienced a similar issue? Are there any specific configurations, prerequisites, or FreeRTOS-related considerations I might be missing?Any suggestions or debugging tips would be greatly appreciated.Thank you in advance for your help!Here is my code piece: void EnterStop2Mode(uint32_t seconds){HAL_RTCEx_DeactivateWakeUpTimer(&hrtc); // Ensure wake-up timer is resetuint16_t rtc_counter = RTC_CalculateWakeUpCounter(seconds);HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, rtc_counter, RTC_WAKEUPCLOCK_RTCCLK_DIV16);__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_0);LL_PWR_SetPowerMod
Hello,I have an STM32G431 here that sends messages to a PC via MIDI. These are translated into OSC messages by a bridge and then interpreted by lighting control software. I would like to eliminate the intermediate step via the bridge and transmit the messages directly as OSC. My own research has shown that this is possible in principle if the controller acts as a network adapter via USB. Unfortunately, I couldn't find any examples for the G4. There seem to be a few examples of people configuring an F4 as a USB network adapter. Unfortunately, I haven't been able to integrate these examples into Cube IDE and get them to run on the G4. I have also tried to integrate a TinyUSB stack. Unfortunately, this was also unsuccessful. Therefore, I wanted to ask if anyone else has examples for me in which RNDIS has been integrated on the G4, or tips on how I can get closer to a solution.Thank you in advance.
Hi, I am using three STM32 devices for CAN communication:HardwareDevice A: STM32G431 (FDCAN)Device B: STM32F303 (Classic CAN)Device C: STM32H7A3 (FDCAN)SetupA sends a continuous sequence of commands to B.B processes each command and replies to A over the same CAN bus.One specific command requires B to perform a synchronization sequence with C (also over CAN).While B is synchronizing with C, A continues to send commands to B.IssueDuring the B↔C synchronization, B intermittently misses some frames from A (i.e., A transmits, but B does not process/see a corresponding message).The failure is not immediate: A↔B + B↔C run together fine for a while (sometimes short, sometimes long), then a frame from A is skipped.When the synchronization with C is disabled, A↔B runs reliably with no missed frames.CAN ID from A to B: 0x12CCAN ID from B to A: 0x12DCAN IDs between B and C (sync purposes): 0x2BC, 0x2BD and 0x2BEAs you can see from the inserted can config the sampling point for 3 devices is a
Hello.I have problem using STM32 USB Host HID. I`m stuck in the USBH_Process() function in usbh_core.c, or its better to say stuck in USBH_HID_Process() function in usbh_hid.c file. I am trying to connect a USB keyboard to my own designed stm32f407zgt6 board, code is generated through STM32CubeMX v5.2.1 with package software v1.24.2 and I work with IAR IDE v8. I`ve made a project just same as (https://www.youtube.com/watch?v=Co4ChSgVSek), but with different pins pack, every time I connect the keyboard the MCU gets the descriptors, but it never gets data from keyboard. I only used one keyboard model, also searched a lot about the problem. I`ve tried what pavel.a said in (https://community.st.com/s/question/0D50X00009XkZ4KSAV/usb-host), nothing changed, when I printf() the logs on uart, at first I get: after some "HOST_ENUMERATION"s it recognizes keyboard: and at last the process goes on like the: for ever "HOST_CLASS..." from USBH_Process() fuction in usbh_core.
Hello, We have designed a custom PCB using the STM32H745IIK6 MCU. When we try to connect with STM32CubeIDE using ST-LINK, we get the following error: Failed to read ROM table via AP 3 Error in initializing ST-LINK device. Reason: Unknown. Please check power and cabling to target. In our design, we did not use the SMPS configuration — instead, the MCU is powered in LDO mode. The VCAP pins are connected according to the LDO configuration, and the MCU supply voltage (VDD, VDDA) is at 3.3 V. Could this issue be related to using the LDO power configuration instead of SMPS? Or are there any specific points we should check. Any guidance on how to properly verify the power configuration and debug connection would be greatly appreciated. Best regards, Kemal
I drew a board of stm32h503rbt6, including a screen and a NOR flash. The flash model is mxl6433f. Currently, the problem I'm facing is that when I try to program the board using stprogram, I encounter an error that the programming cannot be completed. The error message shows that the memory deletion failed. I have been looking into it for a week, but still haven't been able to solve it. I hope a senior can help me with it.I'm really in a bad mood right now.
Heyho,strange things happening that I'd like to understand for a STM32L073 (Nucleo for now).Setup on a L073 @ 32MHz:- ADC is clocked by PCLK/4- ADC prescaler = 2 -> divide by 4 -> 2 MHz- 12 bit right aligned- ref V = VDDA = 3.3V- hardware oversampling + shift is used (great feature!)- 7 ADC channels sequenced- DMA, with buffer for 8 samples per channel -> u16AdcDmaBuf[56] In non-circular mode (CIRC neither set in DMA- nor in AD-registers), after each DMA's transfer complete interrupt, DMA and ADC are restarted, everything is as it should be, and as it is set in the sequencing registers.Here's what the DMA buffer looks like, and all this makes sense:buffer[0] = 2031 is the DAC output set to 2047,buffer[1] & buffer[2] = 4095 are connected to VDDA -> 4095 ok,buffer[5] is internal VREF = 1.2V -> perfect,buffer[6] is internal temperature sensor -> ~24°C -> perfect1) ADC & DMA: not circular DmaBuf [00] 2031 4095 4095 1926 3083 1524 0604 [07] 2031 4095 4095
I am using STM32CubeIDE as my development environment,and the board is STM32F429I-Discovery (MCU: STM32F429ZITx). I created an LCD display program using the BSP drivers (such as stm32f429i_discovery_lcd.c).The project builds successfully and flashes without any errors. However, after powering on the board, the LCD remains completely white and nothing is displayed. I downloaded the official firmware package from ST’s website:https://www.st.com/en/embedded-software/stm32cubef4.htmland imported the necessary BSP files from stm32cubef4-v1-28-0.zip into my CubeIDE project. Current situation: The folders Drivers/BSP/STM32F429I-Discovery and Utilities/Fonts are properly included in the project The build and flashing process complete successfully The LCD backlight turns on, but the screen stays white all the time I used the example project LTDC_Display_2Layers as a reference I would like to know what kind of initialization or configuration might be missing,or what are the common ca
Hello fellow community members.I recently needed to find a method for the microcontroller on a board to detect which variant of a board it is installed on. In this particular case, the PCB comes in (for now) two different variants: One with all components mounted, and one with the bare minimum mounted. This is for cost saving on the less advanced devices.To simplify firmware uploading and updates, the firmware for the two variants is going to be the same. The firmware is to figure out by itself which board it is installed on, in order to handle the differences properly.I was running out of pins, and couldn't waste ADC inputs on this. Also, pulling one digital input pin high or low only gave me two possibilities, which might not be enough in the future. But then I thought of something else, which I wish to share with the community.With one resistor on one general-purpose input pin, I can detect four different configurations. This requires the use of the built-in weak pull-up and pull-do
HAL_ADC_Start on STM32U5G9J results in HAL error.Initializing the ADC/* ADC4 init function */ void MX_ADC4_Init(void) { /* USER CODE BEGIN ADC4_Init 0 */ /* USER CODE END ADC4_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC4_Init 1 */ /* USER CODE END ADC4_Init 1 */ /** Common config */ hadc4.Instance = ADC4; hadc4.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV256; hadc4.Init.Resolution = ADC_RESOLUTION_12B; hadc4.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc4.Init.ScanConvMode = ADC4_SCAN_DISABLE; hadc4.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc4.Init.LowPowerAutoPowerOff = ADC_LOW_POWER_NONE; hadc4.Init.LowPowerAutoWait = DISABLE; hadc4.Init.ContinuousConvMode = ENABLE; hadc4.Init.NbrOfConversion = 2; hadc4.Init.ExternalTrigConv = ADC_SOFTWARE_START; hadc4.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; hadc4.Init.DMAContinuousRequests = DISABLE; hadc4.Init.TriggerFrequencyMode = ADC_TRIGGER_FREQ_LOW; hadc4.Init.Overrun = ADC_O
Im getting hardfault at 0x817c364 address and can not debug where exactly hardfaults and why because no source available:I moved my heap to external SDRAM and it started hardfault at this function, maybe someone knows why? and how can I debug it if function not exist?Im using STM32H743ZIT6 and IS42S16400J-6TLI sdram.
Hello, dear friends. I'm new to STM and looking for your help. I've completed the hardware part for 0-10V, 4-20mA, MODBUS analog signal outputs with STM32F030F4P6. Some artificial intelligence applications reported faulty and missing components, while others reported no components. I'm looking forward to your comments. Best regards.
I am working with STM32H747I -DISCO board I am using CubeMx version 6.15, firmware: H7_V1.12.2, Freertos CMSIS2 - V10.3.1configuration 1 : Generating from touchgfx and configuring Eth other all parameters commented in code (Touchgfx parameters).Here ETH is working fine configuration 2 : only configuring ETH with same configurating as above but generating from cubemx Here Eth Communication worked for abt 10 to 20 min and then MCU stucked.I compared both projects : it's all same (MPU configuration Linker script DMA Descriptor and RAM Heap pointer) ...middleware package, CMSIS files, Freertos config files, Lwip folder(lwip.c .h and ethernetif.c and lwipopt.h),LAN files all are same but still I am facing this issue. I have attached wireshark snip when MCU got stucked and IOC files 1. Touchgfx generated 2. CubeMx Generated @STea @STackPointer64
Dear ST members,I'm designing a new board with STM32WBA65RGV6 in LDO power supply scheme. The datasheet and reference manuals are not clear how to connect certain pins in this configuration. Please, clarify the queries below:Is VDDSMPS to be connected to GND or to VDD? On the reference manual page 299 it says to connect to ground, but on Figure 31 it is connected to VDD with a capacitor. If a capacitor is to be added, please specify the value.Is VDD11 to be connected to capacitor like in Figure 31? If so, what is the capacitor value?Regards
I am currently seeking to implement motor rotation control to any desired angle using the P-NUCLEO-IHM001 motor kit. Is this feasible? If so, how should I proceed? Are there any relevant tutorials or documentation available? Thank you. *This post has been translated from Chinese to comply with the ST Community guidelines.
Hello! I am working on a custom OTA bootloader system on a STM32G473RBT6 MCU in a custom board I have been using maybe for 3 years with no problem. My board is connected to a Raspberry Pi over RS485 network. My idea is this:There are 3 virtual sections: 24 KB OTA Bootloader starting from 0x0800 0000. 52 KB Storage space starting from 0x0800 6000 and 52 KB Application space starting from 0x0801 3000. In total 128 KB as the STM32G473RB MCU has.The custom bootloader reads incoming data, erases storage space and stores this new data in storage space, check CRC32, etc. Then the bootloader erases previous application in application space, and copies storage space to application space and starts from new application address.The problem is that the bootloader only succeeds if the following condition met (basically full flash erase):I have a fully erased chip and only bootloader loaded. If I want to load a simple LED blink application which FLASH.lb file configured as following:MEMORY{RAM (xrw)
Hello, I’m trying to perform ADC measurements with the STM32H563ZIT. I’ve shared my configuration settings from the .ioc file below. The ADC reading fluctuates by about ±40. When I short the ADC pin to GND, the reading varies between 0 and 30 instead of staying stable. I can’t get a constant value. What could be causing this issue?static void MX_ADC1_Init(void) { /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC1_Init 1 */ /* USER CODE END ADC1_Init 1 */ /** Common config */ hadc1.Instance = ADC1; hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV10; hadc1.Init.Resolution = ADC_RESOLUTION_12B; hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE; hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc1.Init.LowPowerAutoWait = ENABLE; hadc1.Init.ContinuousConvMode = DISABLE; hadc1.Init.NbrOfConversion = 1; hadc1.Init.DiscontinuousConvMode = DISABLE; hadc1.Init.
I've gotten myself into an odd bug or something. I had been using the Motor Profiler successfully from the Workbench for a month or so and I had to stop for a while and work on other items. I may have played around the graphing/plotting stuff in Motor Profiler the last thing I did. Not totally sure. When I went through the normal connection process to run Motor Profiler today I got a weird pop up that only stays on for 2 seconds and then disappears. I'm not sure if I've ever seen this screen before. It could be a GUI. It could be settings for a plot, but it is not the Motor Profiler GUI that I expected. I captured the 2-second pop up from a video in the attached image. Does anyone know if this is a bug or corrupted files or settings. How do I reset Workbench to get it to just open the profiler GUI again? Thanks for any assistance you can provide.
Hello,as a first time user of STm32CubeIDE, I wanted to toggle a few IOs with a serial output.I used the JTAG port to connect to the STM32 and program it BUT after the first programing, I can't connect to it anymore.....Here is the pinout that I used:Afterwards, I discovered that I should have activated the JTAG debug.... but it is too late.....What can I do to access/program the STM32 again?This might be a simple question but I would appreciate the help.Thank you
In the default configuration, the SMPS on the development board is disabled. As such the VDDA18PMU appears to be floating. According to the spec sheet, it says that the pin MUST be tied to Vss when the SMPS in not used. Is there an internal pull down?
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.