Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello, I made a lot of project with Touchgfx . I started a new project with STM32U599ZI, IAR 9.60.3 , Touchgfx 4.26.1 , CubeMx 6.17.0 , STM32CubeU5 MCU package V1.8.0. I created project from Cube, than I double clicked touchgfx file under TOUCHGFX folder.I created a dummy project with only a red box and I clicked generate code on TouchGFX as I always do. But when I open IAR project I cannot see TouchGFX folder on IAR workspace window and when I try to build project, IAR gives a lot of erros about not founded Touchgfx files. Touchgfx files and folders ara exist in my project folder but not in IAR workspace window.My colluage has same proglem with STM32L4R5A mcu . I tried rebuild all, clean project, creating project from CubeMX from zero, but I could not find a solution.Can you give any solution.
Thread split from this post. I am using STM32CubeIDE version 2.1.0. CubeMX generates a project for STM32F769I-DISCO without BSP, but the BSP for this board clearly exists in STM32CubeF7 and is used in official examples. Is there a way to add BSP directly from CubeIDE? If not, what is the correct way to integrate BSP into the project? Thank you.
Hi, I have two questions regarding ST-Link V2 programming: 1. For connecting and programming via SWD, is it safe to connect only NRST, GND, SWCLK, SWDIO without the Target VDD pin? We might “fake” the voltage for space reasons. Could this cause any issues? 2. I assume ST-Link flashes the MCU memory directly via SWD, not through the bootloader like USB DFU. Can anyone explain in detail how each pin behaves during programming, and if NRST can be omitted in some cases? It would be helpful if there is an official ST document explaining this. Thanks!
Hi everyone,I'm trying to use OTG in FS Mode with DMA enabled (I know it's not a consistent use case, as FS datarate is pretty low)But still, I changed the code in Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd.c :...#if defined (USB_OTG_FS)/* Disable DMA mode for FS instance */if (USBx == USB_OTG_FS){ hpcd->Init.dma_enable = ENABLE; //FGE: try to use OTG FS with DMA enabled}#endif /* defined (USB_OTG_FS) */...But it does not enumerate. This is the only change I brought to the CubeMX generated code Any hints ?ThanksFabrice
Hoping someone can assist.I have a 2 x 8 segment numerical glass LCD that I want to drive from the MCU.See two images below & uploaded files with this request.snippet from LCD data sheet.snippet from CubeMX pin out view.This display is Static with total of 16 segments.Is there a convention when connecting LCD segments to the MCU pins?I cannot seem to find any guidance to show which physical pin on the glass segment LCD module needs to connect to which LCD_SEGxx pin on the MCU. If anybody has trialed this, could they provide any related information please. Thank you.
Hi, I am using the STM32U5G9 and trying to control a QSPI Flash (MX25L51245GXDI) using the HSPI peripheral. I am confused about which official HAL library and functions I should use for this specific configuration. Since the hardware is named HSPI but the Flash is QSPI, it is unclear which driver is the intended one. Could you please clarify which of the following should be used? HAL_SPI_... (Standard SPI functions) HAL_XSPI_... (Expanded SPI functions) HAL_QSPI_... (Quad SPI functions) HAL_OSPI_... (Octo-SPI functions) There is no stm32u5xx_hal_hspi.c provided in the firmware package, and using HAL_QSPI_... or HAL_SPI_... functions with the HSPI1 instance results in type-casting errors and compilation failures. Please provide the official recommendation on which HAL driver is mandatory for driving a 4-line Quad SPI Flash through the HSPI interface on the STM32U5G9 series. Best regards,
Hi Support Team, I am currently using the STM self-test library to ensure compliance with IEC 60730 Class B requirements. Specifically, I worked with the example package X-CUBE-CLASSB-G0 v4.0.0 on the NUCLEO-G071RB platform, utilizing the provided STL_Lib.a library into my projects. However, I am encountering an issue related to limited RAM availability. The library appears to consume a significant amount of memory, leading to a global variable corruption. Could you please advise if there is a lighter or more memory-optimized version of this library available that would still allow us to meet IEC 60730 Class B compliance requirement
Post edited by ST moderator: title and post edited to translate the content. 我在stm32F412RGT6的数据手册的6.1.6部分看到关于滤波电容的描述,2. The 4.7 µF ceramic capacitor must be connected to one of the VDD pin.从图中来看是以144PIN的芯片为例,但我使用的是64PIN的封装,是否也需要在其中一个VDD引脚放置4.7uf的电容,如果需要,是单独放置一个4.7uf还是与一个0.1uf并联放置 Translation: "In section 6.1.6 of the STM32F412RGT6 datasheet, regarding filter capacitors, it states: "2. The 4.7 µF ceramic capacitor must be connected to one of the VDD pins." The diagram shows this for a 144-pin chip, but I'm using a 64-pin package. Do I also need to place a 4.7 µF capacitor on one of the VDD pins? If so, should I place a single 4.7 µF capacitor or connect it in parallel with a 0.1 µF capacitor?"
Please confirm the origin country of the STSPIN9P15TR&STSPIN9P23TR.I ordered the STSPIN9P15TR&STSPIN9P23TR from ST.com. Customs is requesting confirmation of the product's origin.
I am developing firmware with a Boot region and Application region split for OTA firmware update on STM32F469AIHX.[Environment]- MCU: STM32F469AIHX (Max core clock: 180MHz)- IDE: STM32CubeIDE- HAL Library: STM32CubeF4- Flash layout: Bootloader (Sector 0~N) / Application (Sector N+1~)[Problem]When the flash is split into Boot and App regions, the system does not operate correctly at 180MHz.However, setting the core clock to 128MHz works fine.Also, the Application running alone from address 0x08000000 works fine at 180MHz.[What I have already tried]- Reset CubeMX configuration to default, only changed flash memory layout- Verified VTOR is correctly set to APPLICATION_ADDRESS- Verified SysTick_Handler calls HAL_IncTick()- Confirmed uwTick does not increment when running at 180MHz after jump- Removed HAL_RCC_DeInit() / HAL_DeInit() before jump in bootloader- Tried setting SCB->VTOR before HAL_Init() in application main()[Bootloader jump code]__disable_irq(); SysTick->CTRL = 0; SysTic
Hi,I'm getting info on playing mp3 files with my custom Nucleo-U5A9 (originally a NUcleo-U575, I replaced the MCU and added xtal). I'll be using the audio codec TLV320AIC3110 with I2C and SAI from the U5A9. I'll be using ThreadX, FileX an a uSD card. The mp3 files would be in the uSD.I read here about X-CUBE-AUDIO. But the decode spirit mp3 libraries seem to be for the core M3, M4 and M7. Will any of these work with the U5A9 (core M33)? If not, what other options are there?Thanks
Both 'U5 ADCs contain the LFTRIG bit; however, I could not find in either 'U5 datasheet the Tidle value above which this bit has to be switched on.JW
I'm using the STM32G474 at 170MHz. Is it possible to simulate hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV512; since the G474 only recognizes up to ADC_CLOCK_ASYNC_DIV256; I need very slow readings from the ADC. Thank you Valter
Hi,I'm using two STM32WLE5 LoRa as TX and RX and added AES-ECB Encryption with Hardware Accelerator in the TX side and receive and decrypt it in RX side with the same Key. Now I want to change the TX module and want to implement same logic of AES Encryption in the TX side. Is there any documentation on how that can be implemented in the C/Python code for sending the same data with different module? I have used PyCryptodome Python library for sending the data with encryption but it didn't work as expected. So, Is there any other library or documentation for implementing Encryption by which Receiver can be able to decrypt as before?Configuration of AES in Both TX and RX sidesAny insights or guidance would be greatly appreciated.Thanks in Advance.
Hello,I'm working on the STM32H735G-DK and try to change LTDC pixel format mode on the fly, but it doesn't work. I'm using the BSP example from example board pack in CubeMX for this board. After reset is possible setup the first time pixel format, but whatever I did after it never work. I tried even did full deinit with HAL_Deinit(), but it simply doesn't work. Pckage version is STM32Cube_FW_H7_V1.12.1For example this functionality (changing LTDC pixel format) working without any problem on the STM32U5G9J-DK2. The main() function where I tried doing this looks like:int main(void) { MPU_Config(); CPU_CACHE_Enable(); HAL_Init(); /* Configure the system clock to 520 MHz */ SystemClock_Config() HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_1); BSP_LED_Init(LED1); /*##-1- Initialize the LCD #################################################*/ /* Initialize the LCD */ //BSP_LCD_Init(0, LCD_ORIENTATION_LANDSCAPE); BSP_LCD_InitEx(0, 1, LCD_PIXEL_FOR
Hi I am using an STM32N6570-DK board. For my project, I need to measure the total MCU power consumption (core power plus the power consumed by the I/O pins while interfacing with the SDRAM and OSPI flash). I have reviewed the documentation regarding power measurement, but I am confused because there are multiple power supplies. Which pins on CN2 should I use for my measurements, and is there a common point to measure the total power?How to measure power on the STM32N6 - STMicroelectronics Community
Hello,I am using STM32U575RGT6 with CubeMX 6.17 and the bundled X-CUBE-FREERTOS v1.4.0. After enabling USE_TICKLESS_IDLE, I observed that the tick period becomes inaccurate.Specifically, the delay appears to be consistently shortened to about 0.875× of the expected value.void StartDefaultTask(void const *argument) { while (1) { HAL_GPIO_TogglePin(LED_RED_GPIO_Port, LED_RED_Pin); vTaskDelay(400); } }With USE_TICKLESS_IDLE disabled, the delay is approximately 400 ms as expected.After enabling it, the delay is reduced to about 350 ms.I have created a minimal project to reproduce the issue, and it shows the same behavior consistently. The project is attached.Could anyone help explain the cause or suggest a fix?Thank you.
Hi, I’m working with the STM32H7S7L86H and using the SAES peripheral to encrypt and decrypt data stored in an SPI flash .I currently have the peripheral working correctly using HAL functions in polling mode. I also managed to get it working with interrupt mode, including proper input/output callbacks.However, I would like to use DMA to offload the CPU, but I haven’t been able to find any HAL-based examples for SAES with DMA. When I try to use DMA, the transfer does not seem to complete and no callback is triggered.Could you help me understand how to properly configure SAES with DMA using HAL, or point me to a working example?void HAL_CRYP_MspInit(CRYP_HandleTypeDef* hcryp){ if(hcryp->Instance==SAES) { /* USER CODE BEGIN SAES_MspInit 0 */ /* USER CODE END SAES_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_SAES_CLK_ENABLE(); /* SAES DMA Init */ /* GPDMA1_REQUEST_SAES_OUT Init */ handle_GPDMA1_Channel13.Instance = GPDMA1_Channel13; handle_GPDMA1_Channel13.Init.Request = GPDMA1_R
Hi,I am working on a custom Battery Management System (BMS) using STM32L476RG as the MCU, interfacing with an external battery monitor AFE (BQ79656‑Q1).I first validated the MCU hardware and basic firmware by testing the on‑board LEDs and UART communication via test points using USART2. These tests were successful and confirmed that the STM32 configuration and standard UART peripheral are working as expected.After this initial validation, I started implementing the communication between the STM32 and the AFE. For this communication path, LPUART1 is used, while USART2 remains dedicated only for basic UART testing and debug output.As part of this implementation, I took a Single Device Read command frame from a reference software design document for a similar AFE and directly programmed the frame transmission in STM32CubeIDE using HAL UART APIs.While debugging the firmware in STM32CubeIDE, I consistently encounter a “Target not available” issue during execution, particularly when reaching
Dear Community, I am researching how to use a 50Mpx MIPI CSI-2 2 LANE RAW 10 sensor with stm32N647.The idea is not to use the full sensor, instead using analogue/digital crop and windowing on the sensor to capture a specific part of the image and downsize it to a smaller size before entering the ISP of the MCU. The sensor doesn't have scaling.So after all steps I am left with a frame size that varies from 11.4 to 2.4 Mpx depending on cases.From there the image needs to be downsized to a buffer with a maximum size of 1024x768 px for the display.The question is whether the scaling of the ISP of the STM32N647 can handle downsizing and at what cost. The ISP is rated at 5Mpx 30fps but specifies it is possible above, the datasheet is vague about this.Thanks for the help.
Hello, I am experiencing an issue with my STM32U5G9J-DK2 board. Description: Board powered through STLINK USB LED LD7 is ON LED LD6 is ON LED LD1 is OFF I measured about 0.8 Ω between 3V3 and GND Component U16 overheats a few seconds after power-up No external circuit is connected I already tried: Another USB cable and power source Disconnecting all external peripherals My question:Could someone help identify where the problem might come from?Could U16 be defective or indicate a short circuit on the 3.3V rail? Thank you for your help.
Hello,I have STM32F7 controller, using Free RTOS, trying to interface external NOR flash, S29GL128S10TFIV13.I have one source file say testCode.cpp, which I want to move completely in external NOR flash, but every time I ran then code it give Hardfault.MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K EXT_FLASH (rx) : ORIGIN = 0x64000000, LENGTH = 16M EXT_SRAM_HEAP (xrw) : ORIGIN = 0x60000000, LENGTH = 256K EXT_SRAM_STACK (rw) : ORIGIN = 0x60040000, LENGTH = 256K } SECTIONS { .isr_vector : { . = ALIGN(4); KEEP(*(.isr_vector)) /* Startup code */ . = ALIGN(4); } >FLASH .ext_flash_code : { . = ALIGN(4); _sextflash_run = .; *(.ext_flash_data*) *(.ext_flash_data*) . = ALIGN(4); _eextflash_run = .; } > EXT_FLASH /* 2. SECTION FOR MANUAL ATTRIBUTES (For Arrays) */ .ext_flash_data : { . = ALIGN(4); *(.ext_flash_data) /* Targets __attribute__((section(".ext_flash_data"))) */ *(.ext_flash_data*) . = ALIGN(4
Hello,I was trying to create two heap regions, sing internal RAM and external SRAM. So I tried below, but the code at some point crash and generate hardfault error. Just want to know does the procedure is correct or am I missing something?//in .ld file MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K EXT_SRAM (xrw) : ORIGIN = 0x60000000, LENGTH = 512K EXT_PSRAM(xrw) : ORIGIN = 0x6C000000, LENGTH = 8M } _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */ _Min_Heap_Size = 0x0; _Min_Stack_Size = 0x400; ._user_heap_stack (NOLOAD) : { . = ALIGN(8); PROVIDE ( end = . ); PROVIDE ( _end = . ); . = . + _Min_Heap_Size; . = . + _Min_Stack_Size; . = ALIGN(8); } >RAM .heap_internal (NOLOAD): { . = ALIGN(8); _heap_internal_start = .; . = . + 0x2000; /* 8 KB internal heap */ _heap_internal_end = .; . = ALIGN(8); } >RAM .heap_ext (NOLOAD) : { . = ALIGN(8); _heap_start = .; . = . + 0x40000; /* 256 KB for heap */
As is well known, the ADC sampling rate is on the order of microseconds, while the display task may only refresh once every 100 milliseconds. In an RTOS, how can the display task and ADC sampling values be synchronized? With such a long display refresh cycle, how are the numerous ADC sampling values handled—should they be discarded or stored in a buffer? If stored in a buffer, would it occupy substantial memory space? How do people handle this issue in actual applications?
Hi, I have an STM32H7S78-DK board and am working on encryption. I’ve looked at the example files for STiROT_OEMuROT: https://github.com/STMicroelectronics/STM32CubeH7RS/tree/main/Projects/STM32H7S78 -DK/ROT_Provisioning/STiROT_OEMuROTI’ve tried that out, and now I’d like to generate my own keys, but what I’m missing are the OEMuROT_Data.obk and STiROT_Data. obk files. I can generate the OEMuROT_Config.obk and STiROT_Config.obk files with their corresponding XML files using STM32TrustedPackageCreator_CLI, but how do I generate the _Data. obk files? They don’t have any config files, and I can’t find anything online either. The batch script uses them, though, as you can see here: https://github.com/STMicroelectronics/STM32CubeH7RS/blob/main/Projects/STM32H7S78-DK/ROT_Provisioning/STiROT_OEMuROT/obkey_provisioning.batPlease help – do I need them? If so, how are they generated and where can I find the corresponding .xml file?
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.