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 writing my first bare-metal driver for STM32 in C (CMSIS, no HAL). The driver controls a TMC2209 stepper motor driver over half-duplex UART.The basic functionality is currently working: initialization, frame assembly, CRC calculation, and movement control via VACTUAL. To keep it hardware-agnostic, the UART send function is decoupled using a function pointer (handler->send). Registers are defined using union and bitfields (struct).Since this is my first driver, I'd love to get feedback from experienced embedded developers on the following questions: API Design & User Access: What level of API access should I expose to the user, and how should it be structured? Is it better to hide register manipulation behind high-level functions (e.g., set_speed, set_current), or keep direct register access accessible? Bitfields vs. Shifts/Masks: Is using union + struct (bitfields) acceptable for production-ready embedded code, or is it better to switch to explicit bit shifts a
I am designing the power system for an application using the STM32N645. In the datasheet for the STM32N6x5 minimum Vbat is defined as "TBD". In the STM32N6570-DK schematic the Vbat rail is set to 3.3V. If it can operate at 1.8V it would simplify the power architecture. Does anyone have any experience with running it at 1.8V? Or is there a timeline for when this specification will be released?Thanks!-Bash
Hi all,I'm working through a self-directed embedded systems curriculum, writing everything at the register level (no HAL, no CubeMX-generated I2C code) to actually understand what's happening under the hood. Posting this in case it saves someone else the same debugging loop, and to sanity-check my conclusion.Setup:Board: Nucleo-F411RE Sensor: GY-521 breakout, sold as "MPU6050" I2C1 on PB8 (SCL) / PB9 (SDA), AF4, open-drain, onboard 4.7k pull-ups Standard mode, 100 kHz (CCR = 80, TRISE = 17, APB1 = 16 MHz) Pure register access via a self-built I2C_TypeDef-style struct — no ST HAL calls anywhereTransaction sequence (reading WHO_AM_I, register 0x75):START, wait SB Send (0x68<<1)|0, wait ADDR (confirmed ACK) Clear ADDR (SR1 then SR2 read) Send 0x75, wait TXE and BTF (important — TXE alone isn't enough before issuing a repeated START; BTF confirms the byte and its ACK are fully clocked out) Repeated START, wait SB Send (0x68<<1)|1, wait ADDR (confirmed ACK again) Clear ACK bit (
STM32F411RET6 Can't boot, a floating GPIO during startup.I am designing aى energy meter. It has a "Capacitive power supply" so it is very limited power (16mA @ 16V), rise time for the voltage rail is in ms.The meter has Latching relay. We are driving this latch through GPIO & npn as shown in the schematics pic. My bad design, I didn't put a pull-down resistors in the latch control lines.During startup the latch control (MCU_L_ON & MCU_L_OFF) are float, till the FW boots and set the GPIO to 0.Out of 50 produced & flashed: 40 pcs success in booting. 10 didn't success. The failed ones has consistent behavior of having voltage of 0.6v on MCU_L_OFF which makes the npn turns ~ on and draws current, so the voltage in the power supply won't increase as it should. Vcc (3v3) voltage stays around 2.2v. it has small oscillations but never fall below 2v. If latch control disconnected, no issue occur.latch control Capacitive power supply stm mcuWe don't have brown out enabled. Only the
Hello Gyessine, We tested the board in chamber, it seems that it can only work @105℃, even we decrease the CPU clock to 40MHz, if CPU clock is 200MHz, it only can work @95℃. We are using seperate LDO for 1.2V Core, you can check the circuit below.
Hi,I'm currently encountering an issue with USB CDC on the STM32F466: the device is not being recognized as a USB CDC device.I'm using the USB_OTG_FS peripheral, with the USB_DEVICE middleware configured as CDC. However, in the Parameter Settings for USB_OTG_FS, I don't see an option for Internal PHY.I then tried using USB_OTG_HS with Internal FS PHY instead, and in that configuration, the Internal PHY option is available in the parameter settings.So I'd like to confirm the following:Is the Internal PHY option only available when using Internal FS PHY (i.e., only through USB_OTG_HS configured for FS mode), and not available for USB_OTG_FS directly?If I need to use CDC with USB_OTG_FS, do I need to add external pull-up resistors (since there's no internal PHY option to handle this automatically)?Thanks in advance for your help.
Hi,I am trying to perform injected conversion of two channels in ADC1 (STM32G431x), and I wish to trigger them in discontinuous mode. The ScanConvMode is enabled and the discontinuous mode for injected measurement is also set (injectedDiscontinuousConvMode = ENABLE). However, the conversion still happens continuously. I had to hard set the bit (SET_BIT(ADC1->CFGR, ADC_CFGR_JDISCEN)) to make it work in discontinuous mode.Any help here will be appreciated! Thanks.
Hi! I have already trained my AI model using the STM32 Model Zoo Services, and the project is fully running on the STM32N6570-DK board. The model has been successfully deployed, and the object detection is working correctly with the camera.In parallel, I have also developed the graphical user interface using TouchGFX as a separate project. At this point, my goal is to integrate both projects into a single application: the TouchGFX interface and the AI inference application.I have read your article about integrating TouchGFX with the Camera Middleware, which was very helpful.However, I could not find information about integrating TouchGFX with an AI application generated from the STM32 Model Zoo Services.What I would like to achieve is the following workflow: the application starts with the TouchGFX interface, and when the user presses a button, the camera is initialized, the AI inference pipeline starts, and the model begins detecting objects in real time.Could you please advise on the
Hi,I am currently working to simulate my linear motor and its control algorithm (FOC) on Simulink for PIL and HIL with the STM32 Microcontroller Blockset.I am using the STM32C562, but the C5 series is not supported in the Matlab Blockset.Is the C5 series going to be supported on Matlab in the future? (If yes, would you have an estimated release?)In the meantime, can I use the H5 module for at least the shared functions between C5 and H5?
Hello teams,I tried to use STM32N6570-DK DCMIPP Pipe0 to read data from my camera that has own ISP. The camera output format is UYVY (YUV422 BPP16). The issue is that I can't get any data from DCMIPP and CSI-2 Host, I only received SOF and EOF events from CSI-2 Host. I've referred to other people's posts, but my issue still exists. Is my DCMIPP and CSI configuration wrong?Additionally, I'm not sure if the CSI and DCMIPP clock is set correctly, I just follow the example. If my camera out is 640x480@60fps and format is UYVY, how should I configure this clock?My settings are as follows.static void MX_DCMIPP_Init(void) { /* USER CODE BEGIN DCMIPP_Init 0 */ /* USER CODE END DCMIPP_Init 0 */ DCMIPP_CSI_PIPE_ConfTypeDef pCSI_PipeConfig = { 0 }; DCMIPP_CSI_ConfTypeDef pCSI_Config = { 0 }; DCMIPP_PipeConfTypeDef pPipeConfig = { 0 }; /* USER CODE BEGIN DCMIPP_Init 1 */ /* USER CODE END DCMIPP_Init 1 */ hdcmipp.Instance = DCMIPP; if (HAL_DCMIPP_Init(&am
hi, I created a project by the MCSDK, i tried running it as a C++ project, but im getting an error compilation that i cant solve: ../../MCSDK_v6.4.2-Full/MotorControl/MCSDK/MCLib/Any/Inc/revup_ctrl.h: In function 'void RUC_Stop(RevUpCtrl_Handle_t*)': ../../Inc/mc_type.h:77:32: error: invalid conversion from 'void*' to 'RevUpCtrl_PhaseParams_t*' [-fpermissive] 77 | #define MC_NULL (void *)(0x0) | ^ | | | void* it seems that there is a wrong casting issue. I tried to solve it in some fifferent wauys like: pHandle->pCurrentPhaseParams = (RevUpCtrl_PhaseParams_t*)(malloc(MC_NULL)); or pHandle->pCurrentPhaseParams = static_cast<RevUpCtrl_PhaseParams_t *>malloc(sizeof(MC_NULL)); but its not solving the issue. but when i tried to delete this line it keeps having the same error !!!!!! what could be the problem
Hello! We are using the STM32G431RBT6 microcontroller and designing our own BLDC motor driver. Everything was fine until a week ago, but recently we have been encountering a "Bad CRC Header" error. We have checked our Motor Control Workbench and Motor Pilot software; no changes have been made to either the software or the hardware. After Motor Pilot reports this error, the connection drops, then re-establishes, and the motor driver resets.Thanks in advance.
Hello,We are using STM32 Motor Profiler to identify the parameters of an IPMSM motor, but the profiling process always stops at approximately 7% and reports a “Driver Protection” fault.Hardware configuration: - MCU board: NUCLEO-F446RE - Motor-control expansion board: X-NUCLEO-IHM09M2 - Power board: STEVAL-IPMM15B -Motor type: IPMSM Thank you.
I’m trying generate code via MC Workbench for custom a board.I am getting a create failure notification for current sensing assignment.Could this be due to dual ICS sensing or ADC channel mismatch? In the MC Workbench, the current sensing has a red x at the heading and the notification of “Two ICS (isolated current sensing) Currents”I’m doing PWM generation by using TIM1 from STM32H563 for general purpose driver.Let me know and thank you.
I'm interested in improving my debugging workflow when working with STM32-based projects. Beyond using breakpoints and serial output, what techniques or tools have made the biggest difference for you?Do you rely on STM32CubeIDE features, hardware debugging tools, logic analysers, or custom testing methods? Are there any common mistakes beginners should avoid when troubleshooting timing issues, peripheral configurations, or communication protocols?I'd love to hear about the debugging practices that have saved you the most time in real-world projects.
Hello, We have a custom board with a STM32WB55VGY MCU on it.Originally, the FUS version that runs on it is 1.2.0 and we would like to upgrade the FUS and flash the latest version of the Wireless stack (BLE stack full) and safe boot.So, using the STM32_Programmer_CLI we run the following commands:STM32_Programmer_CLI -c port=swd -startfus STM32_Programmer_CLI -c port=SWD -r32 0x20010010 1 Read 0x20010010 : 01020000 → FUS version 1.2.0 STM32_Programmer_CLI -c port=SWD -fwupgrade stm32wb5x_FUS_fw.bin 0x080EE000 firstinstall=0 STM32_Programmer_CLI -c port=SWD -r32 0x20010010 1 Read 0x20010010 : 02020000 → FUS version 2.2.0 STM32_Programmer_CLI -c port=SWD -fwupgrade stm32wb5x_Safeboot_fw.bin 0x080F2000 firstinstall=0 STM32_Programmer_CLI -c port=SWD -fwupgrade stm32wb5x_BLE_Stack_full_fw.bin 0x080D0000 firstinstall=0All commands run successfully except for the SafeBoot where it returns the following error:Error: FUS_ERROR_INVALID_OB: Option bytes and UFB values do not match.Error: Old Fi
Hello,I have created a framework for OEMiROT + OEMuROT boot path wherein I have tried implementing a two-boot stage. This boot path isn’t included in the ST template examples unlike that for OEMiROT or STiROT_OEMuROT. I was able to run both existing examples on my board correctly.For OEMiROT + OEMuROT boot path, I have made changes in the scripts specific to boot paths and UBE. The memory layout is also defined depending on the image sizes where I am using the flash memory divided for OEMiROT, OEMuROT , secure application and nonsecure application referring the below boot path when TZ is enabled. Post reset the control jumps to OEMiROT in this case.I could write the OEMiROT binary at base address 0x8000000 and OEMuROT at 0x800E000 using the scripts.I am able to verify if they are flashed by reading the respective memory addresses using ST programmer. I could see the non-zero or non-FF values at both memory addresses. I have shown one for base address 0x8000000 Besides the images gettin
Hello ST Community,I am considering using the High-Resolution Timer (HRTIM) on the STM32G4 series (specifically STM32G4x4 / G474) and would like to ask a few technical questions regarding its Input Capture functionality:1. Is my understanding correct that the 184 ps high-resolution feature applies mainly to PWM generation (using DLL), while the Input Capture function operates at the base HRTIM clock frequency (up to 170 MHz, giving ~5.88 ns resolution)?2. Is it possible to capture the timer counter values using the HRTIM capture units (CPT1 / CPT2) triggered by External Events (EEV) or internal signals (such as comparator outputs)?3. If Q2 is yes, does capturing via internal signals (e.g., comparator) yield the same measurement resolution (~5.88 ns based on 170 MHz) as capturing via external pins?Any clarification would be greatly appreciated. Thank you in advance!
Hello,Document: RM0090 Reference Manual for STM32F405/415, STM32F407/417, STM32F427/437 andSTM32F429/439.https://www.st.com/resource/en/reference_manual/rm0090-stm32f405415-stm32f407417-stm32f427437-and-stm32f429439-advanced-armbased-32bit-mcus-stmicroelectronics.pdfRevision: 21, 07-Jun-2024.Location: Pages 847-862 in Section 27. Also, Figure 241, 242, 243, 244, 245, Table 125.This section, figures and table all contain 17 references to ITEVFEN bit, supposedly from I2_CR2 control register.In reality, there is no such bit in this register, the actual name is ITEVTEN (interrupt event enable), and it is located in I2C_CR2, bit 9.Section 27.6.2 has correct name.stm32f405xx.h file, and others related to i2c, use the correct name: #define I2C_CR2_ITEVTEN_Pos (9U) #define I2C_CR2_ITEVTEN_Msk (0x1UL << I2C_CR2_ITEVTEN_Pos) /*!< 0x00000200 */ #define I2C_CR2_ITEVTEN I2C_CR2_ITEVTEN_Msk /*!<Event Interrupt Enable */Therefore, the ITEVFEN in the document should be repla
I am really very new to wireless communication but i need to make the project up and working. I have purchased 2 Wio E5 boards, getting confused how to build and make it working. I have gone through two gitshubs STM Repository and the seed studio repository seedrepository At present i am looking for point to point communication. I found similarities with both the projects for example BSP folders for nucleo and LoraE5mini, i understand is i have to port the code, i tried hard but it is showing compilation errors. Please recommend me how do i proceed in terms of compilation.
STM32CubeIDEI have Project Directory (Fully populated from an earlier version of the IDE on a different machine)that I bundled up and then unwrapped on my new build machine.However, when I point my newly installed (up to date) IDE to my unwrapped Project directory,it “sees” the Project is there...but when I click “Finish” to bring it into my IDE, the IDE showsthe project (with the correct name) but devoid of any project properties...and no Source Code Tree(where I normally--and previously--could navigate all the source files). I can see all the expected source code files in my Project DirectoryWhat is the disconnect?Do I need to manually edit the PROJECT.ioc or .project file (or .cproject or .settings or *something*) ?Is there a known issue with transferring a Project from an earlier version of the IDE?Guidance Appreciated!Paul++
Hello,We have designed a custom RF module based on the STM32WL33, and one of ourcustomers is asking us to demonstrate that the RX sensitivity of our modulematches the values published in the datasheet: - RX sensitivity @ 1% BER: -132 dBm @ 300 bit/s, 433 MHz, OOK -128 dBm @ 300 bit/s, 868 MHz, 2(G)FSK -112 dBm @ 38.4 kbit/s, 868 MHz, 2(G)FSKTo validate this, we would like to reproduce the exact test conditions usingan official ST development board (e.g. NUCLEO-WL33) and theSTM32WL33 GUI, so the result is directly comparable to thedatasheet.In the GUI's "Radio settings" tab we can set: fc, DR (ksps), Fdev (kHz),CHF (channel filter bandwidth, kHz), modulation (OOK/2(G)FSK/4(G)FSK/ASK),Spread Factor, and Pout.Could you please help us with the following:1. What DR / Fdev / CHF / Spread Factor values did ST use internally to characterize each of the three sensitivity points above? In particular: - For -132 dBm @ 300 bit/s / 433 MHz / OOK: Under the test conditions of 1
Hello ST Community,I would like to report a bug in the code generated by STM32CubeMX 6.17.0 for the STM32WBA55 with firmware package STM32Cube FW_WBA V1.9.0. Environment- MCU: STM32WBA55CGU6- CubeMX: 6.17.0- Firmware package: STM32Cube FW_WBA V1.9.0- Toolchain: Keil MDK-ARM V5.37- Middleware: STM32_WPAN (BLE Basic stack) Problem descriptionThe application crashes with a HardFault after approximately 2 minutes of operation. The fault is caused by a NULL function pointer call in the generated file `Utilities/tim_serv/STM32_timer.c`, inside `UTIL_TIMER_IRQ_Handler`. Suggested fixAdd a NULL guard before the callback invocation in `UTIL_TIMER_IRQ_Handler`:if( currentExecutionHead->Callback != NULL ) { currentExecutionHead->Callback(currentExecutionHead->argument);} NoteThis issue appeared after migrating from FW_WBA V1.6.1 to FW_WBA V1.9.0. The same project worked correctly with the previous version.
Hi,I am working on a Matter-over-Thread firmware project on the NUCLEO-WBA65RI / STM32WBA65RIVx, and I am seeing an issue where the Amazon Alexa app does not detect the board during Matter commissioning.My current environment is: Board: NUCLEO-WBA65RI MCU: STM32WBA65 STM32Cube FW_WBA: V1.9.0 X-CUBE-MATTER: V1.6.0 STM32CubeIDE: 1.17.x Commissioner being tested: Amazon Echo 4th Gen, model L4S3RE Matter / connectedhomeip version: v1.3.0 as packaged in X-CUBE-MATTER V1.6.0 The device boots correctly, Thread and Matter initialize, and the commissioning window opens. From UART logs I can confirm: Thread task starts successfully Matter task starts successfully BLE stack initializes successfully Matter BLE advertising starts Matter service UUID 0xFFF6 is present in the advertising payload Manual pairing code and QR payload are generated Fabric count is 0 Commissioning window opens successfully The device is also visible in BLE scanner tools such as nRF Connect. nRF Co
Hello,I am trying to create an FSBL XIP project for the NUCLEO-N657X0-Q with the following structure: FSBL running from internal SRAM Application executing in place from the external XSPI flash ThreadX and NetX Duo running in the Application context Ethernet using the onboard LAN8742 PHY External Memory Loader project The STM32CubeN6 firmware package contains two relevant examples: Projects/NUCLEO-N657X0-Q/Templates/Template_FSBL_XIP Projects/NUCLEO-N657X0-Q/Applications/NetXDuo/Nx_UDP_Echo_Client However, the two examples use different project structures.Template_FSBL_XIP provides the required FSBL, XIP Application, and External Memory Loader structure, but it does not contain the ThreadX, NetX Duo, and Ethernet application configuration.Nx_UDP_Echo_Client, on the other hand, contains the required ThreadX, NetX Duo, Ethernet, LAN8742, and UDP configuration, but the complete application is assigned to the FSBL context instead of being built as a separate XIP Application.Copyi
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.