Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello,I am using an STM32WB05KZ on a custom PCB. Initially, I was able to program it normally via SWD using STM32CubeProgrammer, but after uploading a BLE Beacon example, I can no longer connect to the MCU.CubeProgrammer now shows:Error: Unable to get core IDError: ST-LINK error (DEV_TARGET_CMD_ERR)No STM32 target foundMy Hardware SetupCustom PCB using STM32WB05KZSWDIO, SWCLK, RST, VDD, GND routed through through-hole padsST-LINK V2 firmware: V2J46M33Operating voltage: 3.21 VSWD frequency tested from 4 MHz down to 100 kHzTried Normal, Hotplug, and Under Reset modesTried holding RESET while connecting → no successMy SituationAfter flashing the BLE firmware, SWD stopped responding completely.It seems the firmware reconfigured the SWD pins early or put the device into DeepStop, which disables SWD access.I saw advice suggesting to force the chip into the UART bootloader by pulling PA10 HIGH and resetting.However, since I designed a custom PCB (not the NUCLEO-WB05KZ), I manually tie PA10 to
Hello,I am using an STM32WB05KZ board and it was working normally with SWD through STM32CubeProgrammer.However, after uploading a BLE beacon example firmware, I can no longer connect to the MCU.CubeProgrammer shows the following errors:Error: Unable to get core IDError: ST-LINK error (DEV_TARGET_CMD_ERR)No STM32 target foundMy setup:SWDIO, SWCLK, and RST are connected through through-hole pads.ST-LINK V2 firmware: V2J46M33Voltage: 3.21 VSWD frequency tested from 4 MHz down to 100 kHzTried "Under Reset", "Hotplug", and "Normal" modesTried holding RESET while connecting → still no successIt seems the BLE firmware is blocking SWD or reconfiguring PA13/PA14 very early during boot.Requested Help:How can I recover the STM32WB05KZ and re-enable SWD?Is there a recommended recovery procedure for WB devices stuck after BLE firmware?Does the WB05KZ support BOOT0 or another method to force the system bootloader?How can I prevent BLE examples from disabling SWD pins or entering STOP mode?Any
Hi,I am using STM32H563 with OEMiROT_Boot example project, I got a problem to read the FLASH_SIZE register (0x08FFF80C).I found two issues,(1) the value of this register is 0 at begining of OEMiROT_Boot main() function.(2) the register become not accessable after sau_init_cfg(). Snaku
I really want to love ST. There is so much potential in this company, but it using their products is awful at times.I have spent 3-4 hours a day for the past 5 weeks non-stop debugging issues when trying to prototype. The perfect example of this is. Give 100computer science Masters Levels B-L475E-IOT01A1, and say you have 4 hours to get on wifi and connect to a remote host. When they all fail, give them 2x the time until 48 hours are done. This should be as simple as python, when you get a hardware drop down, and select what packages you want. Has anyone figured this out? How do we get this device to connect to wifi? I've tried all the LLMs, google, youtube, etc.. I can't believe this would be so difficult to figure out without help.
Hi everyone,I’m new to STM32 and working on a custom board using the STSPIN32G4 to drive a 3-phase BLDC motor (max 1000 W). The board will be powered by a 7-cell Li-ion pack (max 29.4 V, up to 30 A). I would appreciate a general schematic review.Could you please check the following points:Debug interface – Is the STDC14 wiring correct? I want to use the STLINK-V3SET Debugger!Power routing – Are VDD_3V3, VDDA, VREF+, REGIN, and VCC connected properly and decoupled with the correct capacitors?Decoupling – Can any of the VDDA / VREF+ / VDD capacitors be safely reduced?TVS diode on VM – For the 29.4 V input, should I use a unidirectional or bidirectional TVS diode at the VM input? I’ve seen both approaches online but not sure which approach is best practice. RFM69 supply – Is it safe to power the RFM69 from VDD_3V (internal LDO), given ~140 mA peak and ~10–30 mA continuous (≈1% duty cycle), noting the STSPIN32G4 LDO is limited to 150 mA?SPI pin conflict – All SPI1, 2, 3 pins
Hi. I'm trying to read data from w25q64. When i erase and write the chip and then read it, i receive true data.But when i only read data, my chip is blank and i receive 0xFF.Is my chip still blank or i wrote the chip correctly?Why don't i receive true data when i only read it?
In stm32l4_hal_flash.h: #if defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx) #define IS_OB_USER_TYPE(TYPE) (((TYPE) <= (uint32_t)0xFFFFU) && ((TYPE) != 0U)) #elif defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx) || defined(STM32L496xx) || defined(STM32L4A6xx) #define IS_OB_USER_TYPE(TYPE) (((TYPE) <= (uint32_t)0x1FFFU) && ((TYPE) != 0U)) #else #define IS_OB_USER_TYPE(TYPE) (((TYPE) <= (uint32_t)0x7E7FU) && ((TYPE) != 0U) && (((TYPE)&0x0180U) == 0U)) #endif The problem is that the L496/4A6 both have nSWBOOT0 and nBOOT0 option bits: #if defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || \ defined (STM32L442xx) || defined (STM32L443xx) || defined (STM32L451xx
Hi, I'm using a Nucleo-F446RE Board and I'm trying to set up a basic DAC with DMA configuration without HAL-libaries.The configuration without DMA works just fine, I can measure correct voltages with my oscilloscope on PA4 as intended. My following DMA configuration sets the PA4 always on 0V, nothing happens.I checked the debugger and all registers are being properly set, DMA and DAC both have their clock and values.It just doesn't copy the values into DAC->DHR12R1. I also checked the Flags in DMA_LISR, but no error there.I'm probably missing somehow on how to start the whole process, so my last iteration of code tried to mess with software triggers. I also tried all combinations of PSIZE and MSIZE, as well as uint8_t and uint32_t arrays instead of uint16_t. I feel like I followed the stream configuration procedure from the reference manual, but I probably missed some small, gritty detail.Anybody got code for a similar MCU or sees the problem in my configuration? #inc
Hello , I want to run a BLDC motor (with hall sensors ), first I thought that STEVAL-PTOOL2V1 a plug & play control board .. I'm not a programing expert but I have a some basic knowledge .. how canI run the motor on this board ..kindly can some expliane it step by step?..Motor parameters : isNominal voltage 24 VNo load speed 9960 rpmNo load current 164 mANominal torque (max. continuous torque) 55.5 mNmNominal current (max. continuous current) 2.48 ATerminal resistance 0.727 ΩTerminal inductance 0.475 mHTorque constant 22.8 mNm/ASpeed constant 418 rpm/VThanks in advance
Hi everyone, dear.I have already managed to generate the necessary strings that represent the html pages, but I need to generate more complex pages. In the example that comes with CubeMX, it simulates a file system. How can I convert a small file structure to these headers?Thanks
Hi ST, i have one question for you. Could you please make "examples" more messy? Is it even possible? Lets see, i believe you can do it even worse. To be honest, i have never saw this nonsense and mess in my life. And i have also worked as ABAP developper. Have you ever heard about rule, that strongly recommends NOT to use "goto"? No? I thought so.Have you ever heard about spaghetti code? Because you created one really huge. That example about UsbX for Stm32u5 is awfull. Who did it? Intern? Student? What is wrong with you? Even renesas is now better than you.
Hi. I'm trying to read data from W25Q64 flash memory.These are my connections:And these are my SPI and RCC and GPIO settings:And these are my functions and main code:Using W25Q_ReadID function, i could read device ID.But i can't read data stored on device using W25Q_Read.these are my result that i think they're wrong:what's wrong with my code or configurations?
Hi everyone,This is a follow-up to my previous question about LED behavior on the STM32H755ZI-Q when using OpenAMP communication between CM4 and CM7.https://community.st.com/t5/stm32-mcus-boards-and-hardware/nucleo-h755-led3-not-turning-on-pb14-in-ipc-example/td-p/829379 While debugging why LED3 on PB14 was not turning on (assigned to CM7), I found a very unusual issue in the CM7 startup code generated by STM32CubeMX.CubeMX generates the following D2 domain clock readiness loop:timeout = 0xFFFF; while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET) && (timeout-- > 0));If I rewrite the loop explicitly:while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET)) { timeout--; if (timeout < 0) { Error_Handler(); } }then PB14 suddenly starts working normally.But here is the strange part:If I add any variable initialization before the loop, for example:timeout = 0xFFFF; while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET)) { timeout--; if (timeout < 0) { Error_Handl
Hi there,I am trying to add the STM32WL3xx chips to embassy-rs and for that I need to be able to generate the peripheral data. They use the SVD files for that information.I was able to find the SVD files for the STM32WL30, WL31 and WL33, but the ones I found seem to be lacking almost all `enumeratedValue` that are present in the other SVD files I could find of other chips. Instead it seems to be described in the description fields but that it way harder to parse.Are there SVD's available anywhere with the data in a way that is it more parse-able?Kind regards
I am facing an issue with my Nucleo-F446RE board. It was working normally before, but now when I connect it via USB, the ST-Link LED lights up red, and I cannot upload code, nor does STM32CubeIDE recognize it. I tried updating the ST-Link firmware using the ST-LinkUpgrade tool (STSW-LINK007), but the program displays an error message: "No ST-Link device detected. Please connect it and then retry," even though the computer recognizes the ST-Link in Device Manager as "STMicroelectronics STLink Virtual COM Port (COM6)."I have verified that the CN2 jumper settings are enabled (ON).I cannot install the drivers or update the firmware because neither ST-LinkUpgrade nor STM32CubeProgrammer recognizes the board.I kindly request your help to identify the reason why ST-Link is not being detected and how to resolve this issue.Thank you in advance for your assistance.
Hello ST experts,I have a weird experience with UART communication between two STM32G4 microcontrollers. MCU1 sends 10 bytes to MCU2 via UART. Both UARTS are configured with 9600 Baud rate with DMA in circular mode. The Problem arises when the MCU1 is turned on, it sends 11 bytes which the first byte is 0x00 in case I need only 10 bytes to be received. Can you help me in this issue?Best,Davood.
I’ve been trying to run an SPI loopback test, but my code gets stuck in the transmit function. The data never actually transmits, so the function waits indefinitely. When I checked the SPI clock pin with a logic analyzer, it remains low. I also verified the peripheral clock in the SFRs, and it shows that the SPI clock is enabled.For the hardware setup, I connected MOSI to MISO with a jumper wire.I’ve attached images and included the full code—please take a look and help me figure out what’s causing the issue. One more note: I’ve used the same configuration in previous projects and it worked fine, but now it suddenly doesn’t.If the information I’ve provided isn’t clear or sufficient, I apologize—please let me know, and I can share more details./* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @at
Hello,While testing FOC operation using Hall sensors in MCSDK, I encountered an issue that I’d like to discuss.When attempting low-speed BLDC control (around 100-200 RPM) with FOC, the electrical angle updates discontinuously at 60-degree intervals, as shown in the graph below. If I first apply a high-speed/high-torque command so that HALL can interpolate the electrical angle and then switch to low-speed control, the problem is resolved. However, this approach becomes challenging when the motor is under heavy load.Is there any method or idea to make the motor run smoothly at low speed directly from a standstill without going through this intermediate process?Additionally, it seems that in 6-step control, users can only specify a speed reference. Is there any way to set a current (torque) reference without modifying the core MCSDK code? If this feature is not currently supported, I’m curious whether there are plans to enable 6-step control via current reference in the future(in case som
As the subject says. searches over many hours have resulted in several different ways to do this, none of which work.The CLOSEST ive gotten to a reaction out of a textbox outsode of some event is to break the rules, and *** with the autogenerated code. All that resulted in was getting the box to change to "??" which as crazy as it sounds, progress, because I have yet to figure out what methods to call to do this seemingly simple thing.From the documentation: touchgfx::Unicode::strncpy(textArea1Buffer, "string", TEXTAREA1_SIZE); textArea1.resizeToCurrentText(); // optional, will resize the box to fit the text if it is too small textArea1.invalidate(); This does absolutely nothing. Again, from the documentation: // With int/double/UnicodeChar* touchgfx::Unicode::snprintf(textArea1Buffer,TEXTAREA1_SIZE,"My numbers %i %i", my_var_1, my_var_2 ); // With float touchgfx::Unicode::snprintfFloat(textArea1Buffer,TEXTAREA1_SIZE,"My float %f", my_var_float ); textArea1.in
Hi, everyoneI recently encountered a strange phenomenon. I opened three DMA channels on the STM32G474RBT6.The first one is Channel 1 of DMA1 (circular mode), which is used for automatically collecting the data converted by ADC.The second one is channel 8 of DMA2 (normal mode), which is used to transfer the calculated data to the timer for updating the PWM.The third one is Channel 1 of DMA2, which (normal mode) is used to send serial port data of variable length. The first two did not enable the interrupt service function.But if the DMA in the third case does not enable the interrupt, the serial port sending process will be stuck (the HAL library shows that the DMA2channel1 is in the “BUSY" state). If the interrupt is enabled, this situation will not occur.However, the interrupt service of the first two I didn't enable DMA can still run normally. The data of the ADC can be automatically transmitted, and the timer can also send out the correct PWM signal. The priority of DMA has already
In my embedded software project, I need to write a bootloader. I wrote an application code for the bootloader and testing, and everything is fine so far, but the delay function in the application code is not working. I think the reason for this is the Vector Table. I wrote the vector table to the RAM address, but it didn't work at all. It jumps to the application code, turns on the LED, but does not toggle. I would really appreciate your help. (STM32f030c8t6 board)#define APP_START_ADDRESS 0x08006000 // User application start address #define APP_START_ADDR 0x08006000 #define SRAM_BASE_u 0x20000000 #define VECT_TABLE_SIZE 0xC0 // 48 vectors * 4 bytes void JumpToApplication(void) { // 1. Dsiable all interrupts __disable_irq(); // 2. Deinit HAL and RCC (optional if bootloader did init) HAL_DeInit(); HAL_RCC_DeInit(); // 3. Copy vector table memcpy((void*)SRAM_BASE_u, (void*)APP_START_ADDR, VECT_TABLE_SIZE); // 4. Remap SRAM to 0x00000000 SYSCFG->CFGR1 &= ~SYSCFG_CFGR1_
Hi everyone,I'm new to STM32 solutions. My goal is to use the RTC Wake-Up Timer (WUT) to wake the MCU from Standby mode. I'm starting with a simple test:Cold Boot - Program the WUT to wake the MCU in 5 seconds and enter Standby.Warm Boot - Blink an LED, increment a counter (in BKPSRAM), and go back to sleep for 5 more seconds.The Problem: The MCU enters Standby, but it never wakes up.I am calculating the WUT for ck_spre (256 Hz) as follows: wakeup_counter = 5 (seconds) * 256 (Hz) = 1280.HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_RTC_Init(); if (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) { // LSE FAILED! while (1) { //(error) HAL_GPIO_WritePin (LED_RED_GPIO_Port, LED_RED_Pin, GPIO_PIN_SET); HAL_Delay (100); HAL_GPIO_WritePin (LED_RED_GPIO_Port, LED_RED_Pin, GPIO_PIN_RESET); HAL_Delay (100); } } uint32_t time_wkp_seg = 5; uint32_t wakeup_counter = time_wkp_seg * 256; if (__HAL_PWR_GET_FLAG(PWR_FLAG_SBF) != RESET) { // 1. Woke up from Standby // 2.
I am designing a system that will utilize the dual bank feature of the STM32 devices to make a robust system for OTA updates. I am currently using a STM32U545 for my project and have questions about writing to the FLASH_OPTR to change the SWAP_BANK bit.My setup has an external microcontroller connected to my STM32U545 that interfaces through UART and has control of the BOOT0 pin and the RST pin of the STM32 device. I was confused by the statement in the AN3155 pg. 20 when it talked about the Write Memory command and said "If the Write Memory command is issued to the option byte area, all bytes are erased before writing the new values, and at the end of the command the bootloader generates a systemreset to take into account the new configuration of the option bytes". What does it mean by all bytes are erased? My current plan was to use the read memory command and read the register FLASH_OPTR at 0x4002 2040 and then read bit 20 of that register(SWAP_BANK bit) then perform an operati
I have an other issue at the moment. I cant use the GPIOD, VSSI02 is on 3.3V. Im using stm32g0b1kb. It wont toggle it wont read, it does nothing. I have created a small application far away from my main app just to test the GPIO functions.Hi, I a already Figured it out. But Thank you for the response. I have an other issue at the moment. I cant use the GPIOD, VSSI02 is on 3.3V. Im using stm32g0b1kb. It wont toggle it wont read, it does nothing. What am I missing.I cant toggle, read or write them? PB9 PB6, and PD1 to PD3/* 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
Hi, In my UI project I need a vertucal boxProgress while all available backgrouds and images are horizontal while w&h are greyed out. When I create a custom background, the progress bar is not working. Same for circleProgress (size control). Can you help please.
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.