Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I've run into an interesting problem and curious if anyone knows a solution. I am adding TFTP support to an amateur radio project (soon to be published as open source). All the other code is based on LWIPs netconn API and I want the TFTP code to use netconn as well. Almost all the embedded LWIP examples I can find are for a TFTP server, not a client and all seem to be the native API too. Undeterred I'm off writing my own, but I've run into what seems a fundamental incompatibility between the TFTP protocol and how I understand basic IP comms work!The weird part about TFTP is that while the client sends a UDP packet from it's "upper" port to the well know TFTP port on the server (69), for a read request, by spec the TFTP server responds not from its well-known port, but a new random upper port! With LWIP (and this seems normal and correct), if you set up a connection to another device and it's port, only replies back from that port come back to you. A
Hello,We have developed a product based on STM32M4 and would like to enable our clients to do DFU firmware update. We have develop a Windows based app which will include STM32_Programmer_CLI and make use of it. Although we would need our client to install also DFU windows drivers. Is there an official installer somewhere which will install only the STM DFU drivers?Thanks for your help,Andrea
Hello, everyone.So, I want to assign a serial number/device number to all my devices, and each device has a different serial number/device number. My question is, how can I change the serial number/device number with the same firmware without having to change the string in the source code as the serial number/device number and rebuild it?Is that possible to do in STM32?Thank you:).
Hi everybody!I started programming ARM microcontrollers after watching Mr. Patrick Hood-Daniels' tutorials on YouTube. I am using a Nucleo F334R8 development board to control a Puppet animatronic I am making for my niece. You can see it here:https://youtube.com/shorts/40tsBrCdnOg?si=NuuiD9RuRrL3VxnXI want to share the code I used with everyone, hope you find It useful // PUPPET head servos many positions#include "main.h"void SystemClock_Config(void);int main(void){int headServo;int neckServo;int handServo;int armServo;int pulsecounter;HAL_Init();SystemClock_Config();RCC->AHBENR |= RCC_AHBENR_GPIOCEN;RCC->AHBENR |= RCC_AHBENR_GPIODEN;GPIOD->MODER |=GPIO_MODER_MODER2_0;GPIOD->MODER &= ~(GPIO_MODER_MODER2_1);GPIOD->OTYPER &= ~(GPIO_OTYPER_OT_2);GPIOD->OSPEEDR |= GPIO_OSPEEDER_OSPEEDR2;GPIOD->PUPDR &= ~(GPIO_PUPDR_PUPDR2);GPIOC->MODER |= GPIO_MODER_MODER4_0;GPIOC->MODER &= ~(GPIO_MODER_MODER4_1);GPIOC->OTYPER &= ~(GPIO_OTYPER_OT_4
Hi ST team,I'm working with the Nucleo-N657X0-Q board (STM32N657X0H3Q MCU) and running the nx_iperf example from NetX Duo. I’d like to understand what the SRAM clock frequency is during this example's execution. In the release notes, it’s mentioned that the core clock is set to 600 MHz, although the maximum supported core clock is 800 MHz. I’m trying to determine:What is the default clock source and frequency for the SRAM in this MCU?Is the SRAM clock configurable separately from the system clock?Any guidance or documentation references would be greatly appreciated. Thankyou, A. Sharma
Hi everyone,I’m working on an audio recording project using the STM32H747-DISCO board with its built-in PDM microphone. The recording works — I can clearly hear my voice — but there’s a constant background white noise in the recording. I’m trying to figure out what’s causing it and how to reduce or eliminate it.I’m using STM32CubeMX + HAL, with a standard SAI + PDM2PCM configuration. The WAV file is saved to an SD card using FATFS.Here are some key details:I’m not using any prefix or divider for the sampling rate — I simply feed the microphone with a 3 MHz clock via SAI4A with "User Set Master Clock Devider Value".I’ve achieved the most satisfying results so far with these settings:SAMPLE_RATE 24000UPDM_DECIMATION 128UPCM_SAMPLES 1024see my config below:#define BUTTON_DEBOUNCE_MS 200U static uint32_t last_button_tick = 0; #define SAMPLE_RATE 24000U #define BITS_PER_SAMPLE 16U #define NUM_CHANNELS 1U #define PDM_DECIMATION 128U #define PCM_SAMPLES 1024 #define PDM_HALFWORDS_PER_BLOCK
I have selected the STM32H743ZIT6 MCU for our project. Our application requires storing 22-byte data for approximately 1.5 lakh entries in RAM. Based on our calculations, we need an external memory of at least 4 MB to 8 MB. The previously considered IS61WV102416BLL-10MLI SRAM does not meet our capacity requirements. Therefore, we require a larger SRAM or PSRAM module that is fully compatible with the STM32H743ZIT6 MCU, supports memory mapping, and can interface via QSPI or asynchronous SRAM. Please provide suitable part numbers and availability details for memory options that meet these specifications.
Hi,I'm having a project that uses LTDC (565) UART4 (for printf debugging purposes) and ETH/LwIP. The issue i'm having is an infinite loop in `LAN8742_Init` : ```while(regvalue & LAN8742_BCR_SOFT_RESET)```always evalute to true and ```if((pObj->IO.GetTick() - tickstart) <= LAN8742_SW_RESET_TO)``` evalutes to true as well (tickstart is 0 and pObj->IO.GetTick() also returns 0).STM32CubeMX warns me about possible conflicts with PIN - but I don't think LTDC and UART/ETH are using the same pins. Ater enabling ETH CubeMX warned about Clock but autoresolver fixed the issue.
Hello,I'm encountering an issue when trying to write data to the flash memory on the STM32WL5C8U6. I'm using the official driver implementation (V1.3.1) and the following sequence of commands:HAL_FLASH_Unlock()FLASH_Program_DoubleWord(0x08030000UL, <data>)HAL_FLASH_Lock()The problem is that the data is only written to flash the first time I run this sequence on the chip. On subsequent attempts, no data is written. I’ve also tried calling FLASH_PageErase(0x30) before writing, but that didn’t resolve the issue. Additionally, I attempted to reset the flash to 0xFFFFFFFF manually, which seemed to help intermittently, but I have been unable to reproduce this reliably.Does anybody have any suggestions on what might be going wrong? Are there any working examples for this chip?Thank you in advance!
I am trying to set up a basic USB project on a NUCLEO-H7S3L8. It works okay with the HSI, but I need the HSE. I can see that the board has a 24MHz crystal fitted and resistors on SB14 and SB15. It's unmodified from the factory.HAL_RCC_OscConfig() always returns with a timeout when trying to activate the HSE. I've tried various settings but can't get it to work.I have attached my .ico file. The code is just what CubeMX generates. Thanks.
Edited by a ST moderator to follow the community rules especially for code sharing. So please use </> to share your code Hello, I am using the STM32WBA, and I am interested in persisting data to start after waking up from standby mode.I am unable to keep the data in memory. Here is how I am configuring the linker script and main.c.Can you please help me with how to keep the data when waking up? I am configuring a pot for wakeup GPIO_PIN_13.My goal is for the MCU to wake up, perform some actions, and go back to sleep repeatedly. STM32WBA55CGUX_FLASH.ld MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K BKPSRAM (xrw) : ORIGIN = 0x40024000, LENGTH = 2K } ## after .bss: ## .bss_bkpsram (NOLOAD) : { . = ALIGN(4); KEEP(*(.bss_bkpsram)) . = ALIGN(4); } > BKPSRAM main.c typedef struct { uint32_t magic_number; uint16_t device_id; } PersistentState_t; __attribute__((section(".bss_bkpsram"))) volatile Persistent
I am currently working with the STM32U5G9J-DK1 development kit interfacing with a Tianma-based display. I have successfully managed to update the display using adaptive command mode with DSI long and short write commands. However, I am encountering issues related to the refresh rate and switching modes:Issue with Refresh Rate:While updating the display using long write DSI commands, I observed that the refresh rate is significantly slow. To optimize this, I attempted to change to High-Performance (HP) mode after the initialization commands.Problem Switching to High-Performance Mode:After the initialization commands and sending a pixel memory write command, I disabled the DSI long write command from low power to check if the display would operate in HP mode.However, when I disable the low power (LP) mode for long write commands, the display shows nothing. The display only works if I enable LP mode for the long write.Configuration Details:I am using FIFO while writing pixels in long writ
I want to initialize and drive 24 bits LCD display with the driver ST7282. I did not find any driver file online. Can someone please suggest me the similar driver that I can use to drive the display????
Hello,I am using an STM32F769I-DISCO board to implement USB HS in my TouchGFX project, but it is not working as expected. I have already tested USB functionality with FreeRTOS CMSISv2 without TouchGFX, and it works fine. However, when I try to run both TouchGFX and USB HS host (MSC) together, the application state remains stuck at APPLICATION_START when the USB disk is connected and never make transition to APPLICATION_READY.I have tried adjusting the priorities of the USB and TouchGFX tasks and increased the stack size for the USB task, but the issue persists.Any suggestions to help get both working together properly would be greatly appreciated ?Best regards.
Hello All,I'm trying to keep my MSC + CDC USBX connection alive on my STM32U575. When I connect the device via USB cable, Windows Explorer opens and displays the files on the W25Q NOR Flash. I can select a file and open it from the flash. I can also open Tera Term and connect to the device. I created a ThreadX task to write out text over CDC every 5 seconds. After a random amount of time, Tera Term stops writing out the text and lock up and even though the device is displayed in Windows Explorer, if I try to open a file, it fails, with a timeout error.I've explored the U5 samples, but I can't find any differences between the MSC or CDC projects and my project. None of the samples, that I've found, are doing anything in the callbacks or change methods that would indicate the handling of some kind of "timeout" issue from the USB host.Any guidance to why the device just stops communicating with the windows machine would be greatly appreciated. If
Hi,need information about the soldering profile for LQFP100 pin package in case, soldering the IC manually with temperature controlled soldering station
Greetings, So, I am developing a bootloader, that receives a firmware, using a similar protocol to xmodem (128 bytes), through the USB. I followed this tutorial to implement the USB and adapted it to make it work on a B-U585I-IOT02A board. The USB communication works. So I am making something like this (some minor details have been omitted, but the big picture is here): #define APP_START ((uint32_t)0x0800C000 #define OFFSET 128 uint32_t addr = 0; uint8_t buff[OFFSET] __atribute__((aligned(4))); // 32-bit aligned int main(void) { Flash_Erase(bank, page); for(;;) { if(!lastPacket) { GetPacket(&buff); Flash_Firmware(APP_START+addr, buff); addr += OFFSET; } else { Flash_Firmware(APP_START+addr, buff) break; } jumpToApp(); } static HAL_StatusTypeDef Flash_Erase(uint32_t _bank, uint32_t _page) { HAL_StatusTypeDef status = HAL_FLASH_Unlock(); if(status != HAL_OK) { return status; } FLASH_EraseInitTypeDef erase = {0}; uint32_t PageError = 0;
To secure USB against unauthorized usage while maintaining regular operation, implement authentication and encryption for all USB communication, ensuring only authorized devices or users can access the interface for parameter and log management, open-source information, and updates.1. how to enable and disable the stm32 for booting using a debug probe / stm32 flasher from unauthorized access2. How to enable and disable the USB access from Unauthorized access3. Even after locking also authorized user can read and write in the stm32we can do it manually by setting the RDB for read access and WRP for write access but we want it to do it at runtime in software.
Dear all,I am using the cube programmer in order to set WRPA_PEND, WRPA_PSTRT and uncheck the unlock to actually lock the area defined by the WRPA field. It works fine and I can actually see that the memory region is protected.I am unable to restore the situation and change back the unlock bit to 1 for this same region.The cube programmer returns the following errors:Error: Expected value for Option Byte "unlock_a": 0x1, found: 0x0Error: Expected value for Option Byte "wrpa_pend": 0x0, found: 0x7FError: Option Byte Programming failed Or modified by application after OB_LAUNCH The RDP level is set to 0xAA (not set at all nor changed). Can anyone help me out with this issue?
I am running an application with Azure RTOS, and CAN bus. All was well until I needed to increase the tick time to 2000/second (from 1000/second). When I did this the CAN Interrupts stop working. To make things even worse, when I change the tick time back to 1000/sec within CubeIDE, it still doesn't work and I have to pull and older version off Github to get it going again. I'm not overly familiar with Azure RTOS, usually I just do my own OS. CAN interrupts are priority 0, RTOS 15. TIM6 is used for tick for RTOS. CAN Initilization: /* Configure Rx filter */ sFilterConfig.IdType = FDCAN_STANDARD_ID; sFilterConfig.FilterIndex = 0; // sFilterConfig.FilterType = FDCAN_FILTER_DUAL; sFilterConfig.FilterType = FDCAN_FILTER_MASK;//Classic filter sFilterConfig.FilterConfig = FDCAN_FILTER_TO_RXFIFO0; sFilterConfig.FilterID1 = 0x7F1; sFilterConfig.FilterID2 = 0x7F1; if (HAL_FDCAN_ConfigFilter(&hfdcan1, &sFilterConfig) != HAL_OK) { Error_Handle
Hi, i would need information about setLineSpacing (int16 space) method in textarea widget.Documentation says that it's used for increasing space between lines, but the parameter "space" defines the space in pixel or other unit measurement ?Thanks a lot anyone can help me
Hey all,I would like to confirm some current consumption figures present within the STM32N6570 datasheet.I am particularly curious about the current consumption numbers in the various sleep modes.Table 31 (Current consumption in Run mode) suggests IDD is ~0.3mA in typical conditions. This seems extremely low for normal operation. Also, when referring to Table 33 (Current consumption (core) in Run mode), it is entirely possible to have an IDDCORE of 100mA, which is 300x that of IDD. How can this be so high?Thanks everyone!Edit: I noticed several other interesting measurements but I was looking at datasheet Rev 2 instead of Rev 6 (most recent), which resolved several questions. The Rev 2 datasheet was sent to me by a coworker who downloaded it from the ST website a few days ago, so Rev 2 may still be up somewhere?
Hello,I am using the STM32F429I-Discovery board with an MT9M001 camera module, and I am developing with STM32CubeIDE.I would like to display the live camera image on the built-in LCD of the F429 board.I have already connected the camera and can read image data through DCMI, but I am not sure how to configure LTDC (and possibly DMA2D) to display the image in real time on the LCD.Could you please provide guidance or an example on how to:1. Configure LTDC for displaying a frame buffer2. Transfer camera image data from DCMI to the LTDC frame buffer using DMA3. Match the resolution and pixel format between camera and LCD4. Set up these peripherals correctly in STM32CubeIDEThank you for your support.
Hello team, We are using STM32WL55 MCU. I haven't found any information about resistance value of its internal pull-down resistance. As far as I know it is typically 40k. But could you tell what is the tolerance of this value? Best regards, Vladislav
Hi, I’m implementing a self-powered USB 2.0 Full-speed device with an STM32H753XI and a USB-C connector.Could you please confirm that the attached schematic: Uses STM-recommended resistor values for the VBUS-sense divider on PA9 to prevent MCU damage if the USB is connected while the MCU isn't powered (MCU is self-powered) Omitting the 22 Ω series resistors on USB_P/USB_N is acceptable for device-only operation. Provides complete ESD/over-voltage protection for the MCU. Contains all capacitors / resistors required for reliable enumeration and long-term robustness. Thanks in advance for your feedback. Best regards,
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.