Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi @st_it Team,We had observed some unknown behaviour with respect to flash.MCU => STM32U073CC.Tools => STM32Cube ProgrammerWe need to write this mentioned value @last page of flash @address = 0x0803F800.After doing multiple connect/disconnect, The mentioned value got disappeared abruptly.Please refer the below after disappeared.Note - the probability of this issue occurance is much higher.Please help us to diagnose this issue.Best regards,Shubham M.
I am currently implementing a dual-bank flash concept on the STM32WLE5CCU6 microcontroller, which features 256 KB of flash memory. I have divided the flash into two logical blocks, each of 128 KB. Both blocks include their own independent In-Application Programming (IAP) bootloader code. Additionally, each block contains identical application code, but mapped to different memory locations.In the linker script for each block, I have modified the flash and SRAM start and end addresses accordingly. I have also updated the vector table by setting the __ICFEDIT_intvec_start__ symbol to match the start of the respective flash block.The first block (Block 0 or B0) functions correctly. Upon reset, it correctly jumps to the application code located at the corresponding address.However, when executing code from the second block (Block 1 or B1), the application does not function as expected. Furthermore, upon issuing a hard reset, the system always jumps to the start address of Block 0, rat
How to create a soft start in the initial operation when generating a PWM signal with STM32
hi, am using stm32u585iot dev board i need all power code stop and shutdown and standby code for that board?
P-Nucleo STM32WB55I have two 3-axis accelerometers & toe temperature sensors on an I2C bus. I taking measurements at 1 Hz.I would like to send this data over BLE. Every tutorial so far seems to skip how to read the data into a characteristic & then send it. At this point I am only interested in broadcasting.I've managed to set up an attribute for reading, given the service its names. I can see the device & the service advertised on my phone via ST's BLE app. So how do I get the data into the service?I'm going around in circles here!!Please no "have you looked at the examples", yes I have they aren't making any sense to me, I need to talk to a human about this.
Question about Electrical Angle Synchronization in MCSDK v6.4.0Hi everyone,I'm using MCSDK v6.4.0 with an STM32G4, a 42BLF01 motor, and a high-quality incremental encoder with Z-index.My goal is to accurately correct the electrical angle on each Z-pulse to avoid long-term drift after 100 rounds.In previous SDK versions, there was a function called ENC_SetElAngle() which allowed setting the electrical angle directly.In MCSDK v6.4.0, however, this function no longer exists – and the corresponding enc_driver.h file is also missing.Main Question:Is there any official or recommended way in MCSDK v6.4.0 to directly set or correct the electrical angle at the Z-pulse – without using ENC_SetElAngle()?If not:What’s the recommended strategy for drift-free synchronization while the motor is running?Is MC_SetCtrlPositionAngle1() the intended method – even though it may cause stepping or jitter?Thanks for any insights
Hi.I like to make a little spreadsheet/graphic for MCUs that shows all of the available pins and the functions available on them. You can sort of view it in CubeMX, but not in a table. Makes selecting pins and layouts easier.I do them by hand but it's a chore, especially on MCUs with a lot of peripherals. Is the data available in some form that I can process automatically? There is a table in the reference manual of each part, but it's not easy to convert to something like CSV.Thanks.
HiI'm testing a FMC connection between the mcu on a STM32H753I-EVAL2 board, and a FPGA acting as a SRAM device.Write operations looks OK, but when I try to perform a read operation, it looks like that even thought the nxe and noe behave as expected, the mcu is driving the data bus with random data, not allowing the FPGA to drive desired data.I tried various timing settings, and also changed to PSRAM, in regular and muxed mode, but nothing changed.I also turned on the MPU, with a allow all transactions setting. Can you please point me to what I'm missing here?
I'm working with a NUCLEO-WB15CC board (MB1641C-01) and am trying to use three independent serial ports for my project.I have found that the D8 and D2 pins on the board are not working for serial communication. I believe this is due to a pin conflict with the on-board ST-LINK debugger, as a table in the board's documentation shows PA9 and PA10 are routed through jumpers to the ST-LINK (JP5 pins 13-14 and 15-16).My question to the community is whether D8 and D2 pins are indeed unavailable for user applications due to the ST-LINK routing.Thank you for your help.
i have successfully make some basic module in stm32l552 nucleo in register level and in asm , successfully programGPIO, TIMER, UART RX,TX,. But stuck in interrupt section for few days. i am tring to toggle onboard led(PA9) using user button PC13. my hal code running successfully using call backvoid HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin) &void HAL_GPIO_EXTI_Rising_Callback(uint16_t GPIO_Pin)But failed to get into ISR without using HAL. Athough EXTI->EXTICR[3] , IMR1, RTSR1 value is same as my HAL auto generated code.please help. here is my simple code...................... //user button PC13(NUCLEO BOARD MANUAL PAGE NO.33 ) input STM32L5 Series//pa9 onboard led//board : NUCLEO L552ZET6Q#include "stm32l5xx.h"volatile int userbuttoncounter; //for monitoring //void EXTI13_IRQHandler(void)void EXTI13_IRQHandler(){//if (EXTI->RPR1 & EXTI_RPR1_RPIF13) orif ((EXTI->RPR1 & (1U<<13)) != 0 ) {//clear PR flagEXTI->RPR1 |= (1U
Hello ST Community, I have designed a custom PCB using the STM32H750XBH6 microcontroller. After soldering the chip to the PCB, I attempted to connect it via ST-LINK using the standard SWD interface, but the device is not being detected. I have verified the following points: VDD, VDDA, and VDD_LDO are supplied with 3.3V VSS and VSSA are connected to GND PDR_ON is tied to VDD (as recommended) VCAP1 and VCAP2 are connected to 2.2µF capacitors to GND BOOT0 is pulled down to GND SWDIO, SWCLK, and NRST are correctly connected to the ST-LINK Voltages and connections are checked with a multimeter — all seem fine Despite this, ST-LINK shows "Target voltage: 0.0 V" and fails to detect the core ID. Additionally, I noticed that in the official STM32H750 Nucleo board schematic, some NC (Not Connected) pins are routed either to 3.3V or GND, even though the datasheet specifies these pins as NC. This seems contradictory, and I’d like clarification on whether NC pins must be left unconn
I want to check and ensure the option bytes are correct from with my executing program. But writing the option bytes is very flaky if the IWDG is active. For some reason, there is a stall at "FLASH_CR_OBL_LAUNCH". Or maybe it makes it past but not soon after the watch dog resets the MCU and the option bytes are not written. This is an ongoing cycle forever.If I disable the IWDG then things work normally. Any idea why? void CodeProtect() { bool needsUpdate = false; // Unlock FLASH if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0x00U) { /* Authorize the FLASH Registers access */ WRITE_REG(FLASH->KEYR, FLASH_KEY1); WRITE_REG(FLASH->KEYR, FLASH_KEY2); } // Unlock Option Bytes if (READ_BIT(FLASH->CR, FLASH_CR_OPTLOCK) != 0x00U) { /* Authorizes the Option Byte register programming */ WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY1); WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY2); } // --- Check and update RDP level --- uint32_t optr = FLASH->OPTR; const uint32_t c
Hello STM Community,I am currently working with the STM32C031C6 Nucleo board to implement various power reduction techniques, including Sleep, Stop, and Standby modes. At this stage, I am trying to wake the MCU from STOP mode using the RTC wakeup timer without relying on any external triggers such as the user button.While several working examples and tutorials exist for other STM32 families like STM32L4 and STM32F4, I have found that those approaches do not directly apply or work as expected on the STM32C031C6.If anyone has successfully implemented RTC wakeup from STOP mode on this MCU, I would greatly appreciate any guidance, insights, or a minimal working example to help move forward.Thank you in advance for your support!
Hello there!I am on my first foray away from HAL and into bare-metal programming, and am trying to configure LPTIM1 and LPTIM2 on my stm32u031 to periodically trigger interrupts. I am experiencing bizarre behavior that I'm struggling to understand how to troubleshoot. I have two config functions for these timers, one of them looks like: static void configure_lptimer2() { RCC->APBENR1 |= RCC_APBENR1_LPTIM2EN; if ((RCC->CSR & RCC_CSR_LSION) == 0) { RCC->CSR |= RCC_CSR_LSION; while ((RCC->CSR & RCC_CSR_LSIRDY) == 0); } RCC->CCIPR &= ~(RCC_CCIPR_LPTIM2SEL); RCC->CCIPR |= RCC_CCIPR_LPTIM2SEL_0; LPTIM2->CR &= ~LPTIM_CR_ENABLE; LPTIM2->CFGR &= ~LPTIM_CFGR_PRESC_Msk; LPTIM2->CFGR |= (0x0 << LPTIM_CFGR_PRESC_Pos); LPTIM2->ICR = 0xFFFFFFFF; LPTIM2->DIER |= LPTIM_DIER_ARRMIE; NVIC_EnableIRQ(TIM7_LPTIM2_IRQn); NVIC_SetPriority(TIM7_LPTIM2_IRQn, 0); LPTIM2->CR |= LPTIM_CR_ENABLE; LPTIM2->ARR = 1333
Hello everyone, I've designed a custom board with STM32H723ZG, previously based on STM32F767ZG. When I connect board with ST Link V2 prog through SWDIO, SWDCLK and GND, I get response that no target has been detected. I'm currently using ST-Link Utility software. If I desolder H723ZG and replace it with F767ZG, board works completely fine, without any issues. What could possibly be issue, should I order ST-Link V3 prog for the H723 MCU?Please check attached schematic of the board, MCU related stuff is on second page.Thanks everyone in advance! :)
Hi,I encountered a behavior contrary to Reference Manual while erasing FLASH page on STM32G473xB (128 KiB of FLASH memory).The scenario is that I use several pages at the end of FLASH for classic eeprom emulation, so there are flips between two halves for wear leveling and we need to erase some page(s) before we re-use them.I made sure DBANK=1 and all the protections are disabled (all areas start>end). Anyway if DBANK was 0, the page numbering would be the same, we only wouldn't use BKER bit in FLASH_CR and only the page size would be different.Here is related table from RM:What I observed... No problem with writes to uninitialized FLASH pages. I tried to erase the very last four pages (so in the 2nd bank) using BKER=1 and page numbers 28..31, this is described in RM as a proper way to do it, but it never worked. When I was stepping the code (the code is pretty simple and straight-forward) in the debugger, there was absolutely no problem indicated in FLASH_SR, the operation complete
I'm programming a STM32H503CBUx Timer3. NVIC settings are such that the count down event is trapped in void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef* htim)This is a global interrupt routine that takes care for other timer interrupts as well and on has to decide from the handle that is being passed, which interrupt has to be served.My requirement is that this interrupt has high priority and is handled as fast as possible.Timer CLK is 250MHz. The timer counts down with pre divider 1 and count down of around 15,000.In the ISR the counter htim3.Init.Period =14999 is being set to 1000 and should generate the next interrupt. Then follows another chain of such countdowns from 1000. The interval between the two subsequent interrupts is 4 µs. Can an ISR be served with such time constraints?How many instructions can be handled by the MCU at 250MHz clock? Alone the handle testing costs me valuable instruction time. Could I use a timer that has a uniquely asserted ISR?
I try to create code, which flashes LED2 ( few flashes , not one toggle ) in response of one press of Blue button.What could be wrong in my code ? Selected two pins PA5 ( input for LED2 ) and PC13 (EXTI for Blue button with External interrupt Mode with Rising edge trigger detection + no pull up no pull down ) NVIC EXTI line checkbox - marked.And Cube IDE generated code with EXTI callback function etc.In my main.c file, I added this code only:/* USER CODE BEGIN 4 */ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { /* Prevent unused argument(s) compilation warning */ UNUSED(GPIO_Pin); if (GPIO_Pin == GPIO_PIN_13) // If The INT Source Is EXTI Line9 (A9 Pin) { HAL_NVIC_DisableIRQ(EXTI15_10_IRQn); // Disable EXTI interrupt Flash_LED2(); HAL_NVIC_EnableIRQ(EXTI15_10_IRQn); // Re-enable EXTI interrupt } } void Flash_LED2(void) { //HAL_NVIC_DisableIRQ(EXTI15_10_IRQn); // Disable EXTI interrupt for (int i = 0; i < 7; i++) { HAL_GPIO_WritePin(
Hi everyone,I am currently working with the NUCLEO-H7S3L8 board and using STM32CubeMX version 6.14.1 to generate code. I've kept everything at default settings and only added pins to toggle LEDs for testing. However, when I try to debug the code, I run into an issue where the boot subproject gets stuck at the SCB_EnableDCache(); function for a while, before eventually jumping to Error_Handler(void).I haven’t modified anything else in the generated code, so I'm wondering if there’s a configuration setting I may have missed or something I need to tweak in order to resolve this issue.Has anyone encountered this behavior or know what steps I should take to fix it?Thanks in advance for your help!
Dear community,In STM32G0 or maybe in STM32 family in general, is there a possibility to disable the debug module permanently, the idea is that when the code is loaded and tested, then the next step is to disable SWD/JTAG port so that debug or loading another firmware is not possible anymore.Thank you in advance for your support.Best regardsB.T
I'd like to draw rounded corner rectangles (e.g. buttons) where the background/fill colour can be changed by the application as well as opacity/alpha channel. The current shape tools don't seem have this option (rectangle or circle). It's possible to place SVG files, but that doesn't seem to allow for colour and alpha changes. Is there a way to use vector renderer and give it a path and the change the fill colour by the application? -a
I am using the USB CDC driver code provided by ST in stm32cubeide, and am trying to figure out a proper minimum heap size. I have found various slightly conflicting answers, but the consensus seems to be that 512 bytes is not enough.In the same application, I also use FATFS, but I'm not 100% sure if that is supposed to use the heap.Now I wanted to test just how much of the heap is in fact overwritten. To do this, I brutally stored the byte sequence AA BB CC DD over and over in the first 1 KB of the heap. I did that with this piece of code inserted in main.c, immediately after the entry point:uint32_t *heapPtr; uint32_t *heapOrigin; (...) /** * @brief The application entry point. * @retval int */ int main(void) { /* USER CODE BEGIN 1 */ uint16_t i; heapOrigin = malloc(4); free(heapOrigin); heapPtr = heapOrigin; slDebug6 = (uint32_t)heapOrigin; for (i = 0; i < (1024 / sizeof(*heapOrigin)); i++) { *heapPtr = 0xDDCCBBAA; heapPtr++; } /* USER CODE END 1 */The malloc(4
How does this work with a ClickListener?I have a view with 10 custom containers. How can I tell the view when a custom container has been pressed and which one? Do you have a simple example?ThanksRegards, Roger
Hello, I am designing a device that will have an STM32L4 or maybe an STM32U and will communicate with an ESP32 for internet connectivity. However, at some point, I would like to update the firmware remotely, and have the ESP32 stop executing its conventional software and act as a programmer for the STM32. Is this possible? And if so, where can I find detailed information on how to do it? I hope you can help me, thank you.
Hi everyone, I’m working on a project involving STM32L476 chip, and I’d appreciate your guidance on a few key points:Out-of-box USB flashingI'll soon have a brand-new STM32 chip that hasn’t been flashed yet, is it possible to use STM32CubeProgrammer to load firmware via USB directly — without using ST-Link or other hardware programmers? Does the internal bootloader support DFU mode by default?Software-only firmware flashingOne of our goals is to allow our in-house C# application to flash firmware over USB, without requiring any manual hardware intervention like pulling the BOOT0 pin. Is it feasible to force DFU mode or update firmware entirely via software once the chip is already running a custom firmware? Are there recommended DLLs or APIs that support this in C#?Recommended libraries/toolsIf software-based flashing is possible, are there any ST-provided or third-party libraries (.DLLs, wrappers, or tools) that are well-suited for integrating STM32 USB flashing with a C# applicationD
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.