Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi, where can I find a working One-Wire protocol? Is there an example provided by STM? I wrote code for a program to detect the temperature from a DS18B20 sensor, but I can’t detect the sensor, even though the debug shows everything is fine. Can someone help me? Thanks
Hello,I am using the VENC_USB example from the STM32N6570-DK repository.The example enumerates correctly as a UVC device — I can see the device in Windows Device Manager without any issues.The descriptors in the example are configured for H.264 format only.When I run the demo, the stream is visible in ffplay (so the encoder and USB transfers seem to be working).However, the video is not visible in Windows Camera or VLC. Both detect the device, but no image is shown.My Questions:1.Why is the image visible only in ffplay but not in Windows Camera or VLC?2.What changes need to be made in the UVC descriptors or stream configuration to allow Windows Camera and VLC to properly display the H.264 encoded stream?
Hi everyone,How can I use the LwIP stack to enable Ethernet on the STM32N6 board? I found a tutorial, but it was for the H5 series. Additionally, I couldn't find the LwIP middleware component in the STM32CubeN6 folder.Thanks in advance!
Hi EveryoneGreetingsWe are using an STM32U585 MCU and need to maintain a log of about 200 KB using FileX. Once the 200 KB storage is full, I don’t want LevelX to reclaim the entire file and erase it. Instead, I need the log to behave like a circular buffer, where only the oldest block of log data is erased and overwritten with new data. How this requirement can be achieved. For this requirement how much size shall be allocated by fileX(im using an external flash of 8MB).Thanks and Regards Philip
Each time I enable SPI, it works fine.However, whenever I include USART, SPI freezes, and this issue affects multiple chips I've tested.SPI and USART both work well individually.The problem seems to stem from CubeMX, which doesn't generate the code correctly.Coding directly in Keil or CubeIDE might solve the issue, but it's time-consuming—which is exactly why we use CubeMX in the first place.Does anyone know if this could be a simple issue, like an interrupt conflict or shared resource problem?I looked at bunch of options like making sure the interrupt priority for USART and SPI is different.Making sure SPI does not kick in while USART (DMA) is still processing data, ectIt's definitely a CubeMX code generation issue.Any suggestions on how to make SPI and USART work together?
Hello,I have STM32H747I board. using Ethernet, I have connect MQTT on 1883 port successfully. Now I want to connect 8883 port but after configuration, this kind of error occurs also I have included path for the same. can you please check and give me step to resolve this.Thank you.include patherror
Hello, I am developing a bootloader which communicates with an external flash memory (AT45DB041E) in order to check if a file is written inside the flash. This file that my bootloader is searching for is written from another program which is on the eclipse and uses mbed for LittleFileSystem functions and the BlockDevice. When this program finishes its work my bootloader starts and fails to mount the flash memory and every time I am getting this error message:Corrupted dir pair at {0x0, 0x1}However, I have checked my functions in littlefs that I use for reading and writing data to a specific file with a dummy code which was making the below steps:1) Mounting the flash (Success) 2) Opening a file for reading writing (Success) 3) Writing 160KB of data (as the file size that mbed uses) (Success) 4) Closing the file (Success) 5) Opening the file again only with reading (Success) 6) Start reading the data from the file (Success) 7) Close the file (Success) 8) Unmount the file system (Su
Hi, This might seem like a dumb comment, but I am reading UM1884, Description of STM32L4/L4+ HAL and low-layer drivers, and I find numerous references to "hal_ppp" or "HAL_PPP" such as the file name "stm32l4xx_hal_ppp.c" (Table 2, page 8) or "HAL_PPP_STATE_RESET" (P2566).When grepping the generated file structure, I also find a few references to "HAL_PPP" or "hal_ppp" peppered around a few header and c source comments but no actual functional code.So, I think, perhaps, that "HAL_PPP" is a placeholder for peripheral modules such as "HAL_RTC..." or "HAL_PWR..." peripheral names.My bone to pick is this: that "hal_ppp" or "HAL_PPP" are placeholders is NOT stated anywhere in the documentation. You have to assume that is the case. Sorry, but I am a literal thinker and the lack of an explanation about the meaning of "ppp" or "PPP" is a cause of concern, distraction, annoyance and doubt, so much so that I was compelled to write this.Please, to the doc
Post edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code. Hi all, I am working with STM32H723VGT6, using ETH and SPI4. I have configured Ethernet following this ST Community guide:https://community.st.com/t5/stm32-mcus/how-to-create-a-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308 When I follow the instructions exactly, I noticed that memp_memory_RX_POOL_base is located at 0x24000000. Current problem When running my program, the crash occurs at: struct pbuf *q; q = pbuf_alloc(PBUF_TRANSPORT, length, PBUF_RAM); Inside pbuf_alloc, in the case PBUF_RAM: p = (struct pbuf *)mem_malloc(alloc_len); In mem_malloc, the program fails at: /* Scan through the heap searching for a free block that is big enough */ for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size; ptr = ptr_to_mem(ptr)->next) { mem = ptr_to_mem(pt
HIAt what temperature the TS_CAL2 value for the STM32G431 is detected?In the datasheet it is reported 130 degrees while in the library "stm32g4xx_ll_adc.h" TEMPSENSOR_CAL2_TEMP is 110 degrees Thanks
Hello I want the STM32 to transmit data to the FPGA via the FMC. However, when I use the manufacturer's example and modify the return line in the FPGA, the LCD displays the modified value from the STM32 instead of the expected return line value. What configuration setting in the FMC_Test project am I overlooking that is preventing the correct value from appearing on the LCD?
STM32H7S3L8 – XIP app HardFault on vector fetch from XSPI (BFAR/MMFAR=0x70000004, VECTBL)MCU: STM32H7S3L8Tooling: STM32CubeIDE (HAL/CMSIS + FreeRTOS)External flash: NOR on XSPI2 (XSPIM Port 2). Bootloader sets XSPI to memory-mapped; application is linked for XIP at 0x7000_0000.What worksBootloader brings up XSPI, reads SFDP (initially had a DMA/IRQ config issue; fixed).Bootloader successfully puts the NOR in memory-mapped mode and jumps to the app:VTOR = 0x7000_0000MSP/PC loaded from 0x7000_0000 / 0x7000_0004Branch to Reset_Handler at 0x70005A44 is observed.The problemImmediately in the application I hit a HardFault. ST’s Fault Analyzer shows:HardFault: FORCEDConfigFault: VECTBL (Failed vector fetch)BusFault: IBUSERR/PRECISERR setBFAR = 0x70000004MemManage: DACCVIOL setMMFAR = 0x70000004So the core tries to read the vector table entry at 0x7000_0004 and it gets blocked → HardFault right at exception entry. This is my main.c in Appli: /* USER CODE BEGIN Header */ /** ********
Building upon my previous post, "Bidirectional Serial Communication with ST-Link using FreeRTOS on NUCLEO Boards," this code demonstrates a Simulator component and an Application component operating on two separate NUCLEO-C092RC boards. Please note that this project is intended for educational use and is not designed as robust production code; some errors or omissions may remain that users will need to address. This initial demonstration should function as described when configured according to the provided instructions, and it may serve as a foundational template for future development and enhancements. Val Gretchev
Dear ST Team,I am an embedded developer working with STM32 MCUs in various projects, and recently I have been exploring the use of Zephyr RTOS due to its growing adoption and strong ecosystem.I noticed that companies like Nordic Semiconductor provide a dedicated SDK (nRF Connect SDK) which deeply integrates Zephyr with their MCUs, making it easier for developers to use advanced RTOS features, drivers, and middleware.I would like to ask if ST has any plans to:1. Support the migration of more ST sensor drivers into Zephyr RTOS.2. Offer a dedicated SDK or integration layer (similar to Nordic’s nRF Connect SDK) that makes Zephyr development on STM32 more streamlined and accessible.Such an initiative would greatly benefit the developer community and strengthen STM32’s position in modern IoT and embedded software ecosystems.Best regards,
Hi,I am using W25Q64JV NOR flash of size 8MB on ST STM32U5A9ZJ board. On the flash I have created a file system using LevelX and FileX. I have enabled fault tolerant option in FileX. I am writing 128bytes of data every 500ms to a file. Initially the write operation is taking around 70-80 ms, however after some time (after around 3000 writes) the write operation occasionally is taking around 3-4 seconds. This is after every few writes. Following is the fx_media_format parameters I have used status = fx_media_format( &flashMedia, fx_stm32_levelx_nor_driver, reinterpret_cast<VOID *>(LX_NOR_OSPI_DRIVER_ID), reinterpret_cast<UCHAR *>(mediaMemory), sizeof(mediaMemory), "FLASH_DISK", 1, // Number of FATs 32, // Directory Entries 0, // Hidden sectors (0x800000 - 0x10000)/ 0x10000, // Total sectors minus one 512, // Sector size 8, // Sectors per cluster
Hello everyone,I am using the STM32N6570-DK.BackgroundThe example STM32CubeN6/Projects/STM32N6570-DK/Applications/DCMIPP/DCMIPP_ContinuousMode at main · STMicroelectronics/STM32CubeN6 · GitHub is just a FSBL project. So the application is part of the FSBL and limited to 512 KB memory. I want to use this example for my project but I don't want to be limited to the 512 KB. Thats why I tried to migrate this example to an FSBL with load & run application.What have I done so far?At first I created a new project and tried to blink a LED in the main.c file of the _Appli project. This worked and I knew the project setup was correct. Then I set up everything what I need for the DCMIPP_ContinuousMode in the .ioc File and also copied the code from the example. So I copied more or less everything thats in the main.c of the DCMIPP_ContinuousMode example to the main.c of my _Appli project. As soon as I could build the _FSBL and _Appli project with no errors I tried to debug it. Bu
Hi everyone,I'm developing an application for the STM32H755I-Q board in which I'm using the LwIP library (without an OS) to leverage the TCP/IP stack (for the configuration, I followed How to create a project for STM32H7 with Ethernet ... - STMicroelectronics Community).After verifying that everything was working correctly, I decided to add log management via UART3 printing (according to the reference manual, USART3 supports the Virtual COM Port).Unfortunately, when I try to print "Hello World", I only see unreadable characters in the terminal.Below is the main:/* 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 o
im trying to implement peak current mode contorl using stm32G474 i have a question about PCMC. in PCMC, if the sensed voltage from Current trasnformer does not reach to target value, does the switch remain continuously on, or does it turn off according to the original switching frequency? if neither is the case, does it turn off for a very short moment that matches the switching frequency and then turn on again to chasing target voltage? (==> duty ratio nearly 0.99) thank you for infomation
Not an issue, just a recommendation for ST HAL developers...STM32H7 firmware package, SPI_Receive (polled) does not consider the state of the SUSP flag.During a polled SPI transfer that is larger than the receive fifo size, if the code is pre-empted (maybe a long interrupt or task switch) and the SPI rx fifo fills up, the SUSP flag is set and automatic clocking of SPI data is suspended. The SPI transfer stops. When handing returns to the SPI_Receive function, it reads the rx fifo, then hangs waiting for more data which will never come due the SPI clock being suspended. Eventually the function times out and returns error.I would recommend clearing the SUSP bit after each reading of the fifo to kick off data transfer again.I don't need a workaround, just wanted to bring this to attention as could be quite confusing for some people who expect a blocking transfer to never timeout when in master mode.
Hi,I am running my Zephyr application from an OSPI external flash and would like to write to the same flash. The MCU is an STM32H730, and the flash is an IS25LP128.However, the flash_stm32_ospi_write method in zephyr/drivers/flash/flash_stm32_ospi.c causes my application to hang. The issue seems to be that the relevant semaphores are not initialized in the flash_stm32_ospi_init function.To address this, I added the following two lines to flash_stm32_ospi_init: k_sem_init(&dev_data->sem, 1, 1); k_sem_init(&dev_data->sync, 0, 1); After this modification, I am having problems in aborting the ongoing memory-mapped operation.Could anyone provide guidance on properly handling flash write in XIP mode. Any pointers or suggestions would be greatly appreciated! Thanks.
Hi!I need to know if there is library that allow to manage the file system ext4 with STM32U575 microcontroller.I found the FATfs and FileX libraries but in their documentation i noticed that they can handle FAT16, FAT32 and extFAT but there aren't informations on their compatibility with ext4 FS. Can you give me some information about?Thank you in advance.Best Regards,Stefano
Hello everyone,i want to dected PVD but when i enable __HAL_RCC_PWR_CLK_ENABLE Iits showing error in stm32h753vit6 why?
In this example, if instead of using HSI I enable HSE, I can’t get memory-mapped mode working on XSPI2.Baord I am using is NUCLEO-N657X0-Q-C01I replaced this functionhttps://github.com/stm32-hotspot/STM32N6_FSBL_Modes/blob/main/LoadAndRun/FSBL/Core/Src/main.c#L119-L198with my SystemClock_Config SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Configure the System Power Supply */ if (HAL_PWREx_ConfigSupply(PWR_EXTERNAL_SOURCE_SUPPLY) != HAL_OK) { Error_Handler(); } /* Enable HSI */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1; RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; RCC_OscInitStruct.PLL1.PLLState = RCC_PLL_NONE; RCC_OscInitStruct.PLL2.PLLState = RCC_PLL_NONE; RCC_OscInitStruct.PLL3.PLLState = RCC_PLL_NONE; RCC_OscInitStruct.PLL4.PLLState = RCC_PLL_NONE; if (HAL_RCC_OscConf
I am using the STM32N6570-DK kit, and I want to use the camera to capture 224*160 size image, but I don't know how to do this, the sample programs are all about 800*480,and I can't understand the configuration of the downsize.The lines below can change the original 2592*1944 size into 800*480, but how? When initializing the IMX335 sensor, it was set to capture the 2592*1944 size image./* Configure the downsize */DonwsizeConf.HRatio = 25656;DonwsizeConf.VRatio = 33161;DonwsizeConf.HSize = 800;DonwsizeConf.VSize = 480;DonwsizeConf.HDivFactor = 316;DonwsizeConf.VDivFactor = 253;
Hi everyone,I am trying to implement Micro-ROS over UDP on an STM32F7 (Nucleo-F767ZI), but I keep running into hard fault errors. I am using LWIP with FreeRTOS in STM32CubeIDE.So far, I have:Successfully built and integrated Micro-ROS into my project using serial transport.Configured LWIP for UDP and able to ping the board.Initialized Micro-ROS with a UDP transport, but the system crashes with a hard fault.Has anyone successfully gotten Micro-ROS over UDP working on an STM32F7? If so, could you share:Any specific LWIP settings that need to be changed?The correct way to handle memory allocation (heap/stack sizes) for Micro-ROS?Debugging tips for tracing the cause of the hard fault error?Any insights or working examples would be greatly appreciated!Thanks in advance!
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.