Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi, I want to make a simple application with an STM32WB5MMG that exposes a characteristic which I can read. I created the service and the characteristic, and I enabled the CHAR_PROP_READ property. In custom_app.c, I then use Custom_STM_App_Update_Char to update the value under the CUSTOM_STM_FW_VER_READ_EVT case branch. However, I can't read the correct value—it always returns 0.I also tried enabling the GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP property, but from the debugger, I see that it doesn't even enter the void Custom_STM_App_Notification(Custom_STM_App_Notification_evt_t *pNotification) function.Can someone help me?Thanks.
I'm using ST MC Workbench v6.4.1 to generate sensorless FOC control code and trying to run a motor with the following setup:PWM frequency: 50 kHzMotor: 7-pole pair BLDC, 1750 KvBus voltage: 24 VMost other parameters are at default valuesWhen I run the motor unloaded and increase the speed, the SPEED_MEAS parameter (observed in ST Motor Pilot) suddenly turns negative around 27,000 RPM. I’ve tried adjusting current loop and PLL parameters, but it didn’t help.Any idea what could be causing this issue? How can I resolve it?
I'm using the STM32H7B3.ADC configuration: Sample time : ~2usLL_ADC_SAMPLINGTIME_64CYCLES_5 Calibrations: HAL_ADCEx_LinearCalibration_FactorLoad(adc2)HAL_ADCEx_Calibration_Start(adc2, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED)Observations:The ADC counts seem to be stuck at values which are highlighted in the picture above at around 0.31 to 0.35 V and 0.62V to 0.66VThe ADC > DR also seems to be stuck and reads 255, 511 at the two voltage ranges mentioned aboveInput signal source: Analog Input voltage range is 0V - 5V in YELLOW converted to 3.3V scale which is also the VrefUsing only RED boxed channel that is connected to the ADC pin on the mcu Things that I tried:Increasing the sample time to ~11usTried different calibration combinations HAL_ADCEx_Calibration_Start(adc2, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED)Ignored the DMA buffer values and only observed the ADC > DR which also seems to directly jump from 255 to 288 and 511 to 544 Not
On the STM32WL33 chip, is it possible to switch between LPAWUR Wake-up Radio Rx mode and PWR DeepStop RTC mode in the same code?
I'm working on a custom board using an STM32H743IIT6. In general, the board is working, but I'm running into an issue with the RTC. The RTC is running accurately, but when I reset the board, the RTC resets. This happens even if I just terminate and restart the connected debugger, without disconnecting power. I've read through about 20 pages of RTC related posts here, and have checked all sorts of things:- I commented out the Cube/HAL code that initializes the RTC to a specific value- I checked the battery (1.6V with a 357 battery)- I tried using a method described on this forum: After initializing the RTC, store a magic number to a backup register. If that magic number is found in the backup register on startup, don't initialize the RTC again. It didn't help. I took this code out, because the RTC itself has a flag that indicates whether it's been initialized or not, and the HAL code skips initialization if the RTC is already initialized, based on that flag.- My init code looks like thi
I was reviewing the schematic for the STM32H7x3I-EVAL board and noticed that the ETH_nINT pin from the Ethernet PHY is connected to pin PG7 of the microcontroller.I'm having trouble finding clear documentation on how this pin functions. Could someone please clarify the following?What is the exact purpose of the ETH_nINT pin on this board?Does it require any special configuration within the LwIP stack to be used?Are there any example projects that demonstrate how to handle this interrupt? Any help would be greatly appreciated.Thanks,Mohammed
I'm using a NUCLEO-L4A6ZG board with the STM32L4A6ZG MCU. My project uses the microSD connector for serial communication with a computerThe microSD connector uses lpuart1. I use uart_irq_callback_user_data_set to install a callback for received data. This works perfectly from a cold boot (power disconnected). The callback is invoked as data is received. From a warm boot (reset without disconnecting power), the receive callback is never invoked. In this state, even though the receive callback is never called, the STM32L4A6ZG can still transmit data over lpuart1.I changed the Device Tree to use uart3 instead (with an external serial-to-usb bridge). There are no code changes. That works perfectly every time – the receive callback is invoked after both cold and warm reboots.Any suggestions?
Post edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code #define FMC_BANK1_BASE ((uint32_t)0x60000000) #define FMC_A16_OFFSET ((uint32_t)0x00020000) #define LCD_REG (*((volatile uint8_t *) FMC_BANK1_BASE)) #define LCD_RAM (*((volatile uint8_t *) (FMC_BANK1_BASE | FMC_A16_OFFSET))) 0x00020000 does not work 0x00010000 does not work when write data (LCD_RAM ) is has to be high maybe it is the other way around I am using STM32F427VGT6 the display is 8 BIT FMC, maybe it has something to do with declaration ((uint32_t)0x60000000) instead of ((uint8_t)0x60000000) the pin will not switch properly to choose data or command register when I assign PD11 (which is the A16) as regular GPIO then the display works void LCD_WR_REG(uint8_t reg) { HAL_GPIO_WritePin(GPIOD, GPIO_PIN_11, GPIO_PIN_RESET); LCD_REG = reg; } // Write 8-bit d
Hello I want the STM32 to transmit data to the FPGA via the FMC. However, when I use the manufacturer's example and modify the return line in the FPGA, the LCD displays the modified value from the STM32 instead of the expected return line value. What configuration setting in the FMC_Test project am I overlooking that is preventing the correct value from appearing on the LCD?
Goal: I need to store my newly added assets (images, fonts and texts generated from STM's touchGFX designer) in the existing project (which already has set of assets in it).BUG: The newly added assets (maybe text area, image, fonts) to the existing project, are not displaying properly. (My assumption is, the added assets might be stored inside the internal flash, because of it's large space, the data is overflowing, because of this the image is not properly displaying, instead it should store inside the external flash, I am facing issues with storing the external flash despite enabling the mapped storage format in the touchGFX designer).Help me to implement how I can move the contents of internal flash to external flash, so that the assets will be stored inside the external flash.Thanks,
Hello,I am working on custom bootloader + application setup on a STM32G070CBT6Currently, I need to store bootloader flag that indicate whether the MCU should jump to the bootloader code or to the application code.Since the movement i am reserving 1 flash page(2KB) ,just to store single flag bit.This feels like a waste of memory, since I only need 1 bit of storage.My questions are: 1. Can I use Option Bytes memory area to store the custom flag? Are Option bytes writable at runtime for application/bootloader use, or are they limited to ST system configurations (e.g., RDP, WRP, BOR levels)? 2. If Option Bytes memory area are not suitable ,is there another small memory area(apart from flash) that is recommended for storing such a small boot flag?I need only one bit for this flag, but dedicating a full 2KB flash feel inefficient.
STM32H7S3L8 – XIP app HardFault on vector fetch from XSPI (BFAR/MMFAR=0x70000004, VECTBL)MCU: STM32H7S3L8Tooling: STM32CubeIDE (HAL/CMSIS + FreeRTOS)External flash: NOR on XSPI2 (XSPIM Port 2). Bootloader sets XSPI to memory-mapped; application is linked for XIP at 0x7000_0000.What worksBootloader brings up XSPI, reads SFDP (initially had a DMA/IRQ config issue; fixed).Bootloader successfully puts the NOR in memory-mapped mode and jumps to the app:VTOR = 0x7000_0000MSP/PC loaded from 0x7000_0000 / 0x7000_0004Branch to Reset_Handler at 0x70005A44 is observed.The problemImmediately in the application I hit a HardFault. ST’s Fault Analyzer shows:HardFault: FORCEDConfigFault: VECTBL (Failed vector fetch)BusFault: IBUSERR/PRECISERR setBFAR = 0x70000004MemManage: DACCVIOL setMMFAR = 0x70000004So the core tries to read the vector table entry at 0x7000_0004 and it gets blocked → HardFault right at exception entry. This is my main.c in Appli: /* USER CODE BEGIN Header */ /** ********
Building upon my previous post, "Bidirectional Serial Communication with ST-Link using FreeRTOS on NUCLEO Boards," this code demonstrates a Simulator component and an Application component operating on two separate NUCLEO-C092RC boards. Please note that this project is intended for educational use and is not designed as robust production code; some errors or omissions may remain that users will need to address. This initial demonstration should function as described when configured according to the provided instructions, and it may serve as a foundational template for future development and enhancements. Val Gretchev
Hi,Will PC0 PC1 LPUART functions in normal operation? I have to use this LPUART in normal operation of MCU, not in power saving mode.Is there any limitation on this like speed, baud rate etc. Regards,Anurag
Hi everyone,I’m trying to generate two PWM signals with 50% duty cycle and a 90° phase shift, to simulate an A/B type output.I managed to achieve this using two different timers and adjusting the compare values, but I’d like to know if it’s possible to do it with a single timer, specifically TIM1.I noticed there are Asymmetric PWM1 and Asymmetric PWM2 modes, but I don’t really understand how they work and whether they can be used to get this kind of phase shift between two channels.Has anyone tried something similar or knows how to configure TIM1 to produce two PWM outputs in quadrature (90° out of phase) without relying on a second timer? Thanks!
I’m running into a strange issue when trying to jump into the STM32 bootloader.I’ve built an FDCAN bootloader flasher using an STM32H7 along with a Windows host program. This setup allows me to reprogram both virgin and already-programmed. To do this, I set the BOOT pin high and reset the MCU (controlled by another MCU via test pads). This method works flawlessly every time, and it’s just as fast as using an ST-Link V3.Now, I want to achieve the same result without using the BOOT pin (on already programmed MCU) —by sending a CAN message to trigger a jump into the STM32U5 internal bootloader. However, when I switch my programmer MCU to FDCAN mode and attempt communication, the bootloader does not respond....My hardware is designed so that, by default, the CAN transceiver and all required circuitry are active and ready. But once I perform the jump, the MCU simply won’t respond to FDCAN messages.Here’s what I’ve tried so far:Resetting all pins back to default input with pull-upsDisab
Hello,I have a ADC clock running at 96MHz prescaler divided by 10, 12bit, Sampling time 47.5 Cycles. I am just trying to sample this DC volgtages. I have a battery that has around 20Volts, and I am stepping this voltage down using the voltage divider as U8, U1, U2 to be sampled by the ADC. I have two ADC measuring BN, and Vref to measure the current across the 1Ohm resistor. I am getting consistently accurate values, but I have this random 5mv difference or 30mV spikes that happens out of no where. I am not sure how to fix this to improve my ADC resolution. Could you please give me an idea how to proceed? I really appreciate the time and effort for this matter Thank you
Hi,We are using the STM32H725VGH6 MCU and are plannign to use the internal SMPS for VCORE.With regards to the connections required for the VLXSMPS pin, I would just like to confirm that a 220pF capacitor is required on this pin in the "Direct SMPS Supply" configuration. It seems unusual to have a capacitor directly on the output of a Buck SMPS. It is also not show in Figure 2 of "AN5419: Getting started with STM32H723/733, STM32H725/735 and STM32H730 Value Line hardware development". However it is recommended in Table 2 & Figure 3.
Dear ST Team,I am an embedded developer working with STM32 MCUs in various projects, and recently I have been exploring the use of Zephyr RTOS due to its growing adoption and strong ecosystem.I noticed that companies like Nordic Semiconductor provide a dedicated SDK (nRF Connect SDK) which deeply integrates Zephyr with their MCUs, making it easier for developers to use advanced RTOS features, drivers, and middleware.I would like to ask if ST has any plans to:1. Support the migration of more ST sensor drivers into Zephyr RTOS.2. Offer a dedicated SDK or integration layer (similar to Nordic’s nRF Connect SDK) that makes Zephyr development on STM32 more streamlined and accessible.Such an initiative would greatly benefit the developer community and strengthen STM32’s position in modern IoT and embedded software ecosystems.Best regards,
I tried to set readout protection via ST-LINK CLI - it's enabled and disabled correctly, but after RDP=0 I can't erase/write chip - I've got an error on write operation. Tested on 2 boards and both boards have same behavior. e:\STM32 projects>"%PROGRAMFILES%\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ST-LINK_CLI.exe" -c SWD SWCLK=9 -OB RDP=1 STM32 ST-LINK CLI v3.6.0.0 STM32 ST-LINK Command Line Interface [SWCLK=9]: SWCLK is obsolete. Use SWJCLK instead. ST-LINK SN: 55FF6B067087534936162567 ST-LINK Firmware version: V2J37S7 Connected via SWD. SWD Frequency = 950K. Target voltage = 3.1 V Connection mode: Normal Reset mode: Software reset Device ID: 0x466 Device flash Size: 64 Kbytes Device family: STM32G0 Updating option bytes... Option bytes updated successfully. e:\STM32 projects>"%PROGRAMFILES%\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ST-LINK_CLI.exe" -c SWD SWCLK=9 -OB RDP=0 -ME STM32 ST-LINK CLI v3.6.0.0 STM32 ST-LINK Command Line Interfa
Hi We are working on a project based on the STM32U073CCT6. The USB interfaces is not need. How should I connect the VDDUSB pin in order to minimize tthe power consuption? Is it Ok to connect it do GND? BrGilberto
DescriptionI am developing a system with STM32WB5MMG module.A pushbutton is connected to PA0 and is used to control the system power state:During runtime, PA0 works as an EXTI interrupt to request shutdown.In shutdown mode, PA0 should act as the wakeup source.System state before shutdownAt the moment the shutdown is requested, the system is fully initialized:Both cores (M4 and M0+) are running,The BLE stack is active and functional,Clocks, peripherals, and services are all started.Before calling the shutdown function, clocks and peripherals are stopped.So the transition into shutdown happens from a stable and fully operational state.IssueEntering shutdown works as expected: the current consumption drops to nearly 0 µA.Once the button is pressed to wake up:Without the debugger, I can see consumption rises to about 3–4 mA, but the application does not start.With the debugger connected, I can see the program counter and the system falls into the HardFault handler immediately after wa
Hi,I am using W25Q64JV NOR flash of size 8MB on ST STM32U5A9ZJ board. On the flash I have created a file system using LevelX and FileX. I have enabled fault tolerant option in FileX. I am writing 128bytes of data every 500ms to a file. Initially the write operation is taking around 70-80 ms, however after some time (after around 3000 writes) the write operation occasionally is taking around 3-4 seconds. This is after every few writes. Following is the fx_media_format parameters I have used status = fx_media_format( &flashMedia, fx_stm32_levelx_nor_driver, reinterpret_cast<VOID *>(LX_NOR_OSPI_DRIVER_ID), reinterpret_cast<UCHAR *>(mediaMemory), sizeof(mediaMemory), "FLASH_DISK", 1, // Number of FATs 32, // Directory Entries 0, // Hidden sectors (0x800000 - 0x10000)/ 0x10000, // Total sectors minus one 512, // Sector size 8, // Sectors per cluster
Hello everyone,I am using the STM32N6570-DK.BackgroundThe example STM32CubeN6/Projects/STM32N6570-DK/Applications/DCMIPP/DCMIPP_ContinuousMode at main · STMicroelectronics/STM32CubeN6 · GitHub is just a FSBL project. So the application is part of the FSBL and limited to 512 KB memory. I want to use this example for my project but I don't want to be limited to the 512 KB. Thats why I tried to migrate this example to an FSBL with load & run application.What have I done so far?At first I created a new project and tried to blink a LED in the main.c file of the _Appli project. This worked and I knew the project setup was correct. Then I set up everything what I need for the DCMIPP_ContinuousMode in the .ioc File and also copied the code from the example. So I copied more or less everything thats in the main.c of the DCMIPP_ContinuousMode example to the main.c of my _Appli project. As soon as I could build the _FSBL and _Appli project with no errors I tried to debug it. Bu
Hi everyone,I'm developing an application for the STM32H755I-Q board in which I'm using the LwIP library (without an OS) to leverage the TCP/IP stack (for the configuration, I followed How to create a project for STM32H7 with Ethernet ... - STMicroelectronics Community).After verifying that everything was working correctly, I decided to add log management via UART3 printing (according to the reference manual, USART3 supports the Virtual COM Port).Unfortunately, when I try to print "Hello World", I only see unreadable characters in the terminal.Below is the main:/* 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 o
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.