Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello,Does anyone know how to setup the clock source for the N657 processor? I want to use an oscillator for the HS clock input and setup HSE = Bypass clock source...using Bypass clock it should only use PH0 (clock in) and free up the PH1 pin (clock out). But it seems the IDE / cubeMx always wants to use both pins regardless of the clock configuration.am I missing something or is this a bug?thanks, Matt
Generating code for the STM32WLE5CBU.In timer_if.c:extern RTC_HandleTypeDef h;but in rtc.c:RTC_HandleTypeDef hrtc; It happened in CubeMx 6.16.1 and STM32Cube_FW_WL_V1.4.0 and is still happening using CubeMX6.17.0 and STM32Cube_FW_WL_V1.5.0
Hi. ST There is an error in the code that is generated by CubeMx when you use 16bit in SPI DMA transfer. Can be solved in the stm32h5xx_hal_msp.c file: /* USER CODE BEGIN SPI4_MspInit 1 */ memcpy(&handle_GPDMA1_Channel1.Init,&NodeConfig.Init, sizeof(NodeConfig.Init)); /* USER CODE END SPI4_MspInit 1 */ maybe ST will look into it? Using: STM32Cube FW_H5 V1.3.0 STM32CubeMX: 6.12.1 MCU: STM32H573IIKxQ Best regards.
Hi everyone, I’m new to STM32 development and need some help configuring CLion for working with STM32 microcontrollers. I have installed STM32CubeMX (version 6.13.0) and am trying to generate a project for my STM32F411CEU6 microcontroller. However, I’m encountering an issue where the Eclipse launcher fails to work, and I can’t proceed further. I’m using macOS Sequoia (version 15.2). Could anyone guide me through the process of setting up CLion on macOS to work with STM32? Any advice, steps, or resources would be greatly appreciated! Thanks in advance!
The HSEM option is not found in "System Core" in STM32CubeMX (version 6.15), and the configuration option for HSEM interrupt is only found in NVIC. How to configure HSEM in STM32CubeMX. When I selected the LL library environment, the generated source code did not import the HSEM LL library header file. How to solve these two problems? If it is not possible to configure and import the HSEM related library files into the project file in STM32CubeMX, please let us know.
Hello, I trying to use DMA on USART6, but in handle list USART6 is unavailable: I ques what there is some CubeMX error because in stm xxx_hal_dma.h file this uart is added to list: #define GPDMA1_REQUEST_USART6_RX 117U /*!< GPDMA1 HW request is USART6_RX */ #define GPDMA1_REQUEST_USART6_TX 118U /*!< GPDMA1 HW request is USART6_TX */ For now I will try to setup manually, but I still on question about this issue ?
Hi,Both Region 1 and Region 2 are configured with ALL READS/WRITES access permissions.The resulting initialization code is as follows: /** Initializes and configures the Region 1 and the memory to be protected */ LL_MPU_ConfigRegion(LL_MPU_REGION_NUMBER1, LL_MPU_INSTRUCTION_ACCESS_ENABLE|LL_MPU_ACCESS_INNER_SHAREABLE, LL_MPU_ATTRIBUTES_NUMBER1, 0x08030000, 0x0807FFE0); LL_MPU_EnableRegion(LL_MPU_REGION_NUMBER1); /** Initializes and configures the Region 2 and the memory to be protected */ LL_MPU_ConfigRegion(LL_MPU_REGION_NUMBER2, LL_MPU_INSTRUCTION_ACCESS_DISABLE|LL_MPU_ACCESS_INNER_SHAREABLE, LL_MPU_ATTRIBUTES_NUMBER0, 0x20010000, 0x20043FE0); LL_MPU_EnableRegion(LL_MPU_REGION_NUMBER2);The second parameter should also include the LL_MPU_REGION_ALL_RW attribute but it is missing.The .ioc configuration file is attached.
Hello,With CubeMX version 6.16.0 and FW package version STM32Cube FW_N6 V1.3.0, the GPIO configuration's are missing from the generated HAL_I3C_MspInit and HAL_I3C_MspDeInit functions in stm32n6xx_hal_msp.c, when I3C is set to application context.Application context stm32n6xx_hal_msp.c/** * @brief I3C MSP Initialization * This function configures the hardware resources used in this example * @PAram hi3c: I3C handle pointer * @retval None */ void HAL_I3C_MspInit(I3C_HandleTypeDef* hi3c) { RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; if(hi3c->Instance==I3C2) { /* USER CODE BEGIN I3C2_MspInit 0 */ /* USER CODE END I3C2_MspInit 0 */ /** Initializes the peripherals clock */ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I3C2; PeriphClkInitStruct.I3c2ClockSelection = RCC_I3C2CLKSOURCE_CLKP; if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) { Error_Handler(); } /* Peripheral clock enable */ __HAL_RCC_I3C
Subject: Linker Error: Multiple definitions of BLE assembly modules when using CubeMX v6.16.1 CMake generator on STM32WB09Environment:MCU: STM32WB09CubeMX Version: 6.16.1Toolchain: CMake / arm-none-eabi-gcc 14.3.1IDE: VS Code with STM32CubeIDE Extension v3.7.0Middleware: STM32_BLE (Bluetooth LE Stack)Description: I am experiencing a linker failure when building a project generated with STM32CubeMX using the CMake toolchain option. While the project compiles and links correctly when using the standard STM32CubeIDE (Eclipse-based) workflow, the CMake-based build in VS Code fails during the linking stage.The linker reports multiple definitions for several symbols located in the BLE Middleware assembly files. It appears that the same source files are being compiled into different targets and then linked together, causing collisions.Key Error Logs:[main] Building folder: C:/Users/reginaldo.lopes/Desktop/ble_test/build/Debug [build] Starting build [driver] NOTE: You are building with preset
Hello ST,FYI - It appears CubeMX was not updated since DP-FPU capability was added to the STM32N6 data sheets.Regards,Dave
I have set XSPI1 to "Hexa SPI" mode. I'm using EXTMEM_MANAGER to manage the memory. I'm unable to select the setting EXTMEM_LINK_CONFIG_16LINE for "Number of memory data lines". Instead there is a info textbox which says "Active only when XSPI enabled in Hexa SPI mode.". The only available option is EXTMEM_LINK_CONFIG_1LINE. This results the EXTMEM_DRIVER_PSRAM_Init function to fail in the Config switch case, as the only options in the switch case are EXTMEM_LINK_CONFIG_16LINE and EXTMEM_LINK_CONFIG_8LINE.If i manually force the Config to be EXTMEM_LINK_CONFIG_16LINE before the switch case, it seems to work.I believe that i should be able to select EXTMEM_LINK_CONFIG_16LINE with MX if my XSPI is configured to Hexa SPI mode.
CubeMX 6.16.1MacOS 15.7.3STM32F469NIHXMultimedia - DSIHOST - Data and Clock Lanes - click,click,clickShow Advanced Parameters - checkHS Transmission fine tuning and LP Transmission fine tuningTransmission Delay on Clock Lane and Transmission Delay on Data LanesThese items refer to 2-bit wide fields in DSI_WPCR1 but CubeMX allows values from 0-10, which would be 3.32-bits wide. By setting the clock transmission delay to, say, 10, the data clock delay gets overwritten as well. Data delay overwrites the low power clock delay, and so on.The actual data range for these items should be [0,3], and HAL_DSI_SetSlewRateAndDelayTuning should probably sanitize the parameter Value before using it.
Hello, We appear to be experiencing a severe code generation bug with CubeMX. After naming and sizing application regions in the memory management tool, what used to generate a correct linker script now generates bad output.Upon generation the linker script STM32U575XX_FLASH.ld now shows:/* Specify the memory areas */ MEMORY { RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 768K FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /*start of MX regions Auto-generated By STM32CubeMX*/ RAMBK (rw) : ORIGIN = 0x20000000, LENGTH = 768K RAM4 (rwx) : ORIGIN = 0x20000000, LENGTH = 768K SPIFLASH (rwx) : ORIGIN = 0x08000000, LENGTH = 2048K /*end of MX regions*/ }Given that we cannot downgrade the IOC and have performed more work this is an awkward situation and we will manually manage regions in the meantime. This was not an issue before. Please advise what may be going on. Host: OS X 26.2CubeMX: 6.16.1Target: STM32U575xx
I am using cubemx to generate a CMAKE project for a NUCLEO_144 based board (NUCLEO_H563).Project generation creates a cmake/stm32cubemx/CmakeLists.txt file that generates a macro define "USE_NUCLEO_144".it also auto creates a stm32h5xx_nucleo_conf.h file that also creates the same define: /** @defgroup STM32H5XX_NUCLEO_CONFIG_Exported_Constants Exported Constants * @{ *//* Nucleo pin and part number defines */#define USE_NUCLEO_144/* #define USE_NUCLEO_64 */ This creates a duplicate redefinition warning upon build in many places as this header is included throughout my project in many places.This is extremely annoying.I can suppress the warning by adding: #if !defined (USE_NUCLEO_144)#define USE_NUCLEO_144#endif /* USE_NUCLEO_144 */ to the stm32h5xx_nucleo_conf.h filebut of course, this change gets wiped out upon next cubemx code regeneration. It would be so helpful if this guard was included if whatever mechanism you use to generate the _conf.
Dear STMicroelectronics,This is a bug report on the UI for STM32CubeMX 6.16.0 running on Windows 11 Pro 25H2.Please report this internally so that it may be fixed in some future version. Steps to reproduceStart STM32CubeMXFile / New ProjectSelect MCU STM32H563RIT6Click button Start ProjectSelect with TrustZone activated and click OKUnder Categories, expand Middleware and Software PacksFor ThreadX, click the greyed out radio button in column M33NSClick it againExpectedThe popup is readable.ActualAfter the second click, the popup is shown partially obscured by the table and is not readable.If you select the row for ThreadX and click the radio button you can get the popup very much obscured - see attached screenshot.Further infoThe screen resolution doesn't seem to affect the behaviour.I have also reproduced this problem when running the Linux variant of 6.15.0 on Debian bookworm. Best regards, Jesper
Split from this thread. Yes, but No!CubeMX V6.16 now allows only exactly 32 TX Buffers ((TX Buffer Nbr + TX Fifo Queue Elmts Nbr) == 32).But less then 32 TX Buffer is allows by the Hardware, and some times, required if You want to maximize the RX Buffers.
There's a bug in latest STM32CubeMX v6.16.1. When enabling RAMCFG for Appli on STM32N6 MCU, the IOC file becomes unloadable.I attached the demonstration IOC file. I created new project for STM32N6570-DK board, enabled RAMCFG peripheral for Appli, checked the AXISRAM3-6 areas, defined single continuous area for those SRAMs in MMT and saved the project. After this CubeMX fails to load this IOC file. I get popup:In textual form the error is: Cannot invoke "com.st.microxplorer.mcu.memorymap.MemoryMapService.getInRangeAppRegions(long, long, com.st.microexplorer.mcu.Context)" because "this.mMemoryService" is null.The workaround is to not enable RAMCFG in CubeMX, rather control the peripheral manually.
Hi everyone,I am attempting to set up the new CubeMX version (6.16.0) inside a Docker container, but I am running into issues.Setup:Base Image: Ubuntu 24.04Target Software: STM32CubeMX 6.16.0Goal: Headless installation (auto-install), since CubeMX is no longer bundled with CubeIDE 2.0.0.The Issue: The headless installation fails. According to the User Manual "UM1718", this mode should still be supported. However, the installation process differs from the manual and aborts with an error. Note: The current manual still uses version 6.11.0 in its examples.What I have tried so far:Verified with v6.11.0: I tested the headless installation with the older version 6.11.0. This works perfectly and follows the manual exactly.Quiet Mode: I tried installing v6.16.0 using the -q operator, but this triggers an error as well.Error Log: I receive the following output/error trace:user:/# ./SetupSTM32CubeMX-6.16.0Check exe path on linuxFullExe path1 is: /SetupSTM32CubeMX-6.16.0Exe path is: /Search java
Hi everyone,I am experiencing an issue with STM32CubeMX version 6.16.0 while working on an STM32U375xx based project.When I set the Toolchain/IDE to CMake, the code generation process completes successfully, but the linker script (STM32U375xx_FLASH.ld) is missing from the project structure. I have checked both the root directory and the cmake/ folder, but the file is nowhere to be found.Interestingly, if I switch the Toolchain to STM32CubeIDE, the .ld file is generated as expected. This suggests a potential issue or a change in behavior specifically for the CMake generator with the new U3 series in this version of CubeMX.Environment details:MCU: STM32U375xxSTM32CubeMX Version: 6.16.0Toolchain: CMakeHas anyone else encountered this problem? Is there a specific configuration I should check in the Project Manager to ensure the linker script is included in the CMake output?Thanks for your support!Best regards,Gianni
We are pleased to announce that version 6.17.0 of STM32CubeMX is available. What is new in 6.17.0: Added support for new microcontrollers across the STM32WBA, STM32H5, and STM32U3 series Added support for new boards: NUCLEO-WBA25CE1, NUCLEO-H5E5ZJ, STM32H5F5J-DK, and NUCLEO-U3C5ZI-Q Added the Start From Board feature for NUCLEO-U3C5ZI-Q, NUCLEO-H5E5ZJ, and NUCLEO-WBA25CE1 Added support for new features: PLAY on STM32H5 devices with 4 Megabytes of flash memory HSP on STM32U3 devices with 2 Megabytes of flash memory STM32CubeMX Notification Service: allows users to subscribe to notifications, updates, or premium content when downloading or installing STM32 software. The subscription to this service is entirely optional and is not mandatory for downloading or installing the software. Enhanced the memory management tool for the STM32N6 series Implemented the use of the CMake build generator with STM32MP2 projects Enhanced the build process using CMake
Folks,I have FreeRTOS running on an H563, trust zone not used. Created the basic setup from an ioc. I have an ocassional task starvation issue and want to double check there's no stack overflow (unlikely but must check).If I set configCHECK_FOR_STACK_OVERFLOW to 1 in FreeRTOS.hIn cmsis_os2.c, vApplicationStackOverflowHook is still greyed out and hovering over configCHECK_FOR_STACK_OVERFLOW claims it's set to 0. control clicking on it takes me to the defintion where it is set to 1. Anyone know what is going on here please? And why is it set in FreeRTOS.h, not FreeRTOSConfig.h? Thanks
I am trying to build a project using STM32CUBEMX 6.16.0 and 6.16.1 but the ioc file doesn't export the full supporting header file for the touchgfx.
HiI recently started using STM32CubeMX on MacOS and noticed that navigating through the (sub)-folder is kind of buggy or I am doing something utterly wrong.I want to create a project inside my documents folder. But everything that is inside my documents folder is not shown in the STM32CubeMX GUI when selecting a project folder. See attached picture. Can you please attempt to recreate this? I use a MacBook Air M3 16GB/265GB, Mac Tahoe V26.2 should that matter.
Eval board used: Nucleo-U385RG-Q Software tools:STM32CubeIDE Version: 2.0.0 Build: 26820_20251114_1348 (UTC)STM32CubeMX Version: 6.15.0The provided project for the eval board builds without errors.But when I modify the MCU to add a GPIO or I2C using STM32CubeMX,multiple build errors are generated after using "GENERATE CODE" command.These errors are:unknown type name 'HAL_StatusTypeDef'unknown type name 'HAL_LockTypeDef'Although these definitions are defined in the following *.h file:stm32u3xx_hal_def.h/** * @brief HAL Status structures definition */ typedef enum { HAL_OK = 0x00, HAL_ERROR = 0x01, HAL_BUSY = 0x02, HAL_TIMEOUT = 0x03 } HAL_StatusTypeDef; /** * @brief HAL Lock structures definition */ typedef enum { HAL_UNLOCKED = 0x00, HAL_LOCKED = 0x01 } HAL_LockTypeDef;Apparently, the errors are created from define guards not allowing other filesto access and use the “typedef enum HAL_StatusTypeDef and HAL_LockTypeDef in stm32u3xx_hal_def.h.To correct the problem:I had to m
Hello!I'm trying to set up a program via STM32CubeMX. The MCU I'm trying to use is the STM32WBA65CIU6 with the SMPS Pinout.source: datasheet page 72 (https://www.st.com/resource/en/datasheet/stm32wba62ci.pdf).However this configuration seemingly isn't available in STM32CubeMX, only the SMPS_USB Version.source: STM32CubeMX with STM32WBA65CIUx chosen as MCU.There's only one MCU listed in the MCU/MPU selector. Just in case if there are supposed to be multiple.source: STM32CubeMX with search-string STM32WBA65CIU6 in commercial part number.Is there an option that I'm missing? Or will I have to address this manually in code?Thank you in advance!
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.