Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
On nucleo_u575zi_q below observations has been captured.Issue: - when IWDGRSTF flag is cleared by writing to the RMVF bit still watchdog reset occurred.Expected Behavior: - When the IWDGRSTF flag is cleared by writing to the RMVF bit, the watchdog reset should not occur.Please find the below snippet of sample code of STM32cubeIDE.Also find the reference of user Manul and data sheet of nucleo_u575zi_q board.Please provide appropriate solution for the above issue.
/* 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 file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include <stdio.h> #include <string.h> #include "time.h" /* USER CODE END Includes */ /* Private typedef ---------------------------
Hello everyone, I’ve encountered some strange behaviour with my PCB using an STM32H563VGI MCU. The setup includes an array of 10 LEDs, where one additional LED turns on every 2 minutes. Initially, the system worked fine, but after about 10 minutes, I noticed the LED sequence stopped progressing, it got stuck at LED 2. To investigate, I connected a SEGGER J-Link debugger. Surprisingly, as soon as it was connected, the system resumed normal operation: the MCU printed all messages correctly, and the LED array advanced to LED 5, which was the expected state at that moment. It’s as if simply connecting the debugger “unstuck” the MCU. I’m using ThreadX as the RTOS. Has anyone experienced similar behavior? Any ideas what could be causing this? Thanks in advance for your help!
Dear ST Community, Dear ST Team.To implement a small USB Device i working with STM32F412 MCU and a Flash Chip mt25ql512.The Good Part is, that the QSPI Communication works absolutly fine and i can read, write the flash and erase the Chip.Next Step is to Implement a small Filesystem with FATFS.After the Standard settings and configure the user_diskio.c, i stuck in the HardFault_Handler after the call f_mkfs() function. So im sitting on a dead end and im glad to hear some ideas or information about that topic.Thanks for your help.Thx RSheetz/********************************************************************************************/void FatFS_USB_init(void){// FATFS_LinkDriver(&Flash_Driver, USERPath);FRESULT res = f_mount(&USERFatFS, USERPath, 1);// If FatFS fails mounting process, create new file systemif (res != FR_OK){f_mkfs(USERPath, FM_FAT32, 0, workBuffer, sizeof(workBuffer));res = f_mount(&USERFatFS, USERPath, 1);}}/***************************************************
Dear ST Experts,I hope this message finds you well.My current requirement is to implement Azure IoT Middleware for FreeRTOS on an STM32F2 series board. As I am relatively new to IoT development, I would appreciate your guidance and support in getting started.I have a few specific questions:Compatibility: Does the STM32F2 series support Azure IoT Middleware for FreeRTOS?Configuration: If supported, what are the key parameters or middleware components that need to be enabled in STM32CubeMX or CubeIDE?Documentation Gaps: I have reviewed the available Azure and ST documentation, but I couldn’t find specific guidance or porting examples for the STM32F2 series. Could you please point me to any relevant resources or examples?Your assistance would be extremely helpful for my development efforts.Thank you for your time and support.Best regards,Amara Rakesh
Hi all.I am using printf() in my USB-CDC VCP based stm32cubeide project, for printing the messages via USB to the serial terminal. But it prints only once in CDC_ReceiveCallBack () function and then i do not see other messages printed. In fact in while loop (in main function), i get all printf function results (all messages getting printed on serial terminal).Moreover, I tried to use flush function - fflush(stdout) after printf() function, but the result is the same..May be i did not use it properly.?Can anyone please help me out for this. ?Many thanks in advance,
I am setting up my first m55 STM32 project using the NUCLEO-N657X0 dev board with the CMSIS DSP libraries. I have copied the CMSIS DSP libraries into my project and I have added the CMSIS-DSP include paths into my project, but I am receiving the following build error message, arm_vec_fft.h: error: incompatible types when assigning to type 'uint32x4_t' from type 'int32x4_t'Can you please provide a recommendation to resolve this error? Thank you.
@Tesla DeLorean @Amel NASRI @Andrew Neil Hi! I am starting to implement RTOS in my program, and I wonder if someone could help me to figure out what is happening with my MCU routine. I am starting my program with baby steps. I initiated four threads that I intend to use (Main - UART - LCD - ADC). At first the code worked just fine and suddenly stopped working. The way the MCU is behaving seems to vary and is giving me a hard time to understand why. My threads are the following: void mainFunction(void *argument) { /* USER CODE BEGIN 5 */ /* Infinite loop */ for(;;) { char msg8[100]; sprintf(msg8,"Main Function ###### MAIN #####\n"); HAL_UART_Transmit(&huart8, (uint8_t *)msg8, strlen(msg8), 1000); osDelay(500); } /* USER CODE END 5 */ }void uartFunction(void *argument) { /* USER CODE BEGIN uartFunction */ /* Infinite loop */ for(;;) { char msg8[100]; sprintf(msg8,"Uart Function ###### UART #####\n"); HAL_UART_Transmit(&huart8,
..
Hello ST Community,I'm developing a simple bootloader for the STM32U599 that requires USB serial communication (CDC class) for firmware updates.Current Situation:STM32CubeMX only offers USBX middleware for STM32U5 series.We have an existing, working USB driver implementation based on the classic STM32 USB Device Library (CDC class)Questions:Is it possible to use the classic STM32_USB_Device_Library with STM32U5 series instead of USBX?Can we port our existing USB CDC driver to STM32U5 without major architectural changes?Are there any STM32U5-specific examples using the classic USB Device middleware for bare metal applications?Requirements:Bare metal implementation (no RTOS)USB CDC Virtual COM Port functionalityMinimal flash/RAM footprint for bootloader useCompatibility with existing USB driver codebaseI've seen references to the STM32U5 Classic CoreMW package on GitHub, but wanted to confirm the best approach for our use case.Any guidance or examples would be greatly app
Dear All,I am working on the STM32U5A9 platform. I am migrating to this MCU a project that was developed on the STM32F7, that was using the HAL_SPI_DMAPause and HAL_SPI_DMAResume functions.Looking into the HAL of the U5 I see this:Why are these functions deprecated? What would be the best course of action in order to achieve the same functionality as before on the U5?Thank you in advance.
Hi everyone,I'm working on a project where I want to connect the STM32U5G9J microcontroller to the internet using a 4G module. For this, I purchased the STM32U5G9J-DK2 development kit and a 4G network module that supports USB CDC ECM device mode.To get started, I referred to the example STM32Cube_FW_U5_V1.7.0\Projects\STM32U5G9J-DK2\Applications\USBX\Ux_Host_HID and configured USB and the USBX stack in STM32CubeMX accordingly. However, the STM32 DK2 does not detect the USB device when it's plugged in — no insertion event is triggered.I'm a beginner when it comes to both USB and STM32 development. Could anyone suggest what documentation, examples, or guides I should refer to in order to complete this project?Any help would be greatly appreciated.Thanks in advance!
Hi , I am using STM32H725 board, I want to get the size of each directories present in my MMC chip.I am using FileX for file and directory operations on an MMC chip. The chip is accessed via USB MSCThank you.
TCP server is running on a STM32 board and TCP client is running on a PC. problem:netx duo not sending acknowledgement for the packet received immediately even if the NX_TCP_IMMEDIATE_ACK is defined.here after receiving the packet its sending the acknowledgement only when we call the nx_tcp_socket_send . here i need to process the incoming packet and do some time consuming operation so since am not calling the send function immediately after receiving the packet so acknowledgment sent is delayed so the the other peer(PC) is retransmitting the packet since its not received the acknowledgment from the board and its disconnecting the socket after 5 retransmission(since am using windows). so how can i resolve this issue here. wireshark log with regards sabarinath
I have a Nucleo-L433RC-P board and would like to be able to play audio voice prompts which are stored in external flash (W25Q128) and output using the internal DAC. The voice prompts are only short and will call out number digits, so there is plenty of space on the flash to store these in WAV format raw PCM.However, I cannot find any example code that will do this. The only exapmple I've tried tis shown in the following link where the audio is stored in the internal flash, but I cant even get that to work. https://community.st.com/t5/analog-and-audio/tkb-p/analog-audio-knowledge-baseThe sound played just screeches, despte following the instructions step by step, including converting the WAV file to IMA ADPCM etc. I never got as far as trying the example which uses the external flash, because I could not get it working on the internal flash !I just need an example that plays the voice prompts (preferably raw PCM) from the external flash using the internal DAC.
I am trying to configure the STM32L4A6 to act as an I2C slave on its I2C3 peripheral (PB4 - SDA, PC0 - SCL) with 7-bit addressing (address 0x42). The master is a Raspberry Pi CM4 configured on a software-defined I2C bus (i2c5, using GPIO10/11).Both devices are connected through a TXS0102 level shifter, with proper pull-up resistors (2.2kΩ to 3.3V and 1.8V on both sides).When the CM4 is scanned without the STM32 connected, the I2C bus is idle (~3.16V) and normal clock signals are observed during i2cdetect -y 5.When only the STM32 board is powered but not connected to CM4, the PB4 and PC0 lines are idle at ~3.16V as expected.When both CM4 and STM32 are connected together on the bus:The bus voltage drops to ~960mV.No clock signal is seen during i2cdetect from the CM4 side.Bus appears stuck low.STM32 firmware setup:I2C3 is initialized with HAL_I2C_Init()Slave address is set correctly (0x42, 7-bit)HAL_I2C_EnableListen_IT() is calledInterrupt callbacks (HAL_I2C_AddrCallback, HAL_I2C_ListenCp
What instructions do you follow to implement a C++ class and use it in "main.c"?Suppose it's a simple project, like blinking the LED.
Hi all, I'm trying to implement the Independent Watchdog Timer (IWDT) on a TrustZone-enabled STM32U5 controller. My goal is to configure and run the IWDT from the Non-Secure (NS) area. Here’s what I’ve done so far: I have an Azure RTOS ThreadX-based application. I've created a thread that runs every 10 seconds. Inside this thread, I’m initializing the IWDT and then calling HAL_IWDG_Refresh(). I’ve configured the IWDT for a timeout of 11 seconds. However, I’m getting a Hard Fault when this thread executes. What I'm looking for: A working reference or example of IWDT implementation in a ThreadX thread in the Non-Secure area on a TrustZone-enabled STM32 (e.g., STM32U585). Guidelines on how and where to initialize the IWDT (Secure vs Non-Secure). Any TrustZone-related permission issues I should be aware of (e.g., Secure access required to certain RCC or watchdog registers?). Any best practices on refreshing IWDT from a thread instead of an interrupt or bare-metal loop.
Hello Team,Issue Summary:The QSPI flash is not functioning correctly when used with an external loader on my custom board. I utilized the MT25TL01G_STM32H750_DISCO.stldr loader, but the erase operation fails, and the flash does not behave as expected.in above statement. we have enabled QSPI bank-1 as in below picture Using the specifications mentioned above, I successfully implemented custom firmware to enable read and write operations on the MT25QL512ABB8ESF-0SIT flash memory. I followed the "W25Q Flash PART 7 -> QuadSPI Mode" tutorial to achieve this functionality. The implementation has been thoroughly verified and is working as expected.custom board details:-> MCU: STM32H750IBT6-> flash memory: MT25QL512ABB8ESF-0SITUpon comparing the hardware connections, I noticed some differences. Please review them and let me know if there are any mistakes in either the hardware setup or the software configuration. below i have added screen-short of schematic.Circuits:Cu
Hi, I am trying to code up for creating text file in sd card (CN13) and I am implementing this in STM32H757I Eval. I am using STM32 Cube IDE v 1.18.1. I have followed this tutorial,https://community.st.com/t5/stm32-mcus/how-to-create-a-file-system-on-a-sd-card-using-stm32cubeide/ta-p/49830 but the text file is not created in the SD Card when verified through PC. What could be the reason? I have attached the code and ioc file. /* USER CODE BEGIN Header */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "fatfs.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ #
Hello, We are preparing a system based on STM32H7 series with FreeRTOS, and the memory configuration includes: External SDRAM External Serial Flash (QSPI) We plan to use a large static library (.a) with code and data totaling several megabytes. We have the following questions: Q1. Handling Large Static LibrariesWhat is the recommended way to use large .a libraries in STM32 environments?Are there common approaches to load/execute them from external memory such as SDRAM? Q2. Dynamic Loading via QSPI Flash and File SystemIs it feasible to store the library as a binary file in QSPI Flash (with a file system), then load it into SDRAM at runtime and execute it dynamically ? We’d appreciate any suggestions, best practices, or examples. Thanks.
Hi,I recently purchased a STM32U5G9J -dk board. When I power up the board, TouchGFX demo application is running.Can you please provide the source code of this demo application.
I'm a beginner for MCU developmenet and am developping a product with STM32G071EBY6, and wanna make it support the USART2 to upgrade firmware. But seems needing bootloader customization. But I didnot find where to fetch the sample codes, and also nowhere found some guides. Ask for help!!! Best Regards!
Hi,I'm currently using STM32CubeMX V6.12.0 to initialise the peripherals on an STM32H753 processor, and I had a couple of questions:1. How do I enable & then configure the CAN Transciever Delay Compensation within CubeMX?2. Is there a mechanism for limiting the number of auto-retransmissions in the event of a CAN Error? I currently have that option unchecked but when doing bench-top testing it's clogging up the processor and causing it to run slowly. Many Thanks, Crispin
Hello,I am trying to enable the USB IP DMA mode on an STM32U5A5. Without DMA, I have it working as a USB device and it transmits and receives data without apparent issues. To start using DMA, my understanding is that all I need to do, in CubeMX, is change the "Enable IP DMA" setting for the USB OTG HS peripheral to ENABLED. From there I expect the USB peripheral to take care of itself.Unfortunately, in DMA mode, the device transmits exactly three 512-byte packets and then hangs.In my short test, I request four packets. The fourth one never moves. The PC host receiver never gets the fourth packet. The first three arrive intact. I tried tests where the buffer containing the transmit data is set to either 512 bytes long, 1024 bytes long or 2048 bytes long. Each test moves 3*512 bytes and stops.[After posting the above, I did some additional tests by breaking the data into small chunks, as small as 4 bytes at time. The magic limit of the number of bytes is about 1700. Every permutati
ST Community highlights – April to June 2026
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.