Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
This had me stumped for a while - Thought I was going blind for a second LOL.PCLK1 and PCLK2 identifiers are missing from the clock tree diagram for the STM32H723.(They are present in the trees for F103, G431, F446 and F723).
Hello,Regarding CubeMX 6.17, I'm trying to configure a STM32N657 project from scratch. I'm looking for the driver for the ASP256 SRAM memory chip found in various examples and the STM32N6570-DK discovery board. If I search the "Software Packs" I can't seem to find the device listed there. Are these files missing or am i looking in the wrong place? I found them on Github here: https://github.com/STMicroelectronics/stm32-aps256 but I figured that it should be available in CubeMX (or it would be nice if it was available). If they are available from CubeMX, how do I extract and add the component to the project? ThanksMatt
CubeMX does not generate .project and .cproject files for cubeIDE, when in CubeMX project it is selected to not use default firmware location, and path set to folder with STM32Cube FW from github. To reproduce:1 Open CubeMX2 Select File->New Project 3 Select chip, in my case stm32g491ceu64 Open Project manager tab, enter name and location for the project, toolchain - stcubeide5 Uncheck "Use Default Firmware Location", Click Browse and navigate to a folder with github repository with cude FW package6 Go to "Code Generator" sub tab, select radio button "Add nevessary library files as reference in the toolchainproject configuration file"7 Click generate8 Observe folder content in the file explorer - .cproject and .project are missing. CubeMX version 6.16.1
Hello ST Community, I am working on an ultra-low-power project using STM32 MCUs and I have a question regarding the current capabilities of STM32CubeMX. Current Situation: I am aware that STM32CubeMX has an option to "Set unused pins to Analog" to save power. However, this is not sufficient for complex low-power management. In many cases, pins that are actively used in "Run" mode need to be reconfigured into specific states—not necessarily Analog—before entering a low-power mode (e.g., keeping a specific Pull-up/Pull-down for an external sensor, or maintaining a specific Output level to prevent leakage through external circuitry).Currently, CubeMX generates a single initialization function (e.g., MX_GPIO_Init()). To manage transitions for these "used" pins, we must manually write wrapper functions to change their states before sleep and re-initialize them upon wake-up. This manual process is time-consuming and prone to configuration errors. My Question: Is there an exist
Hi,I am using the following environment and found two bugs.OS : Ubuntu 20.04 LTSSTM32CubeMX : 6.15.0Toolchain / IDE : CMakeBoard : NUCLEO-H563ZIBug 1 : After reconfiguring the memory address and size with Memory Management Tool following code generation, the .ld file does not follow the configuration.This bug can be reproduced by following the steps below:Configure the FLASH region on MMT. Generated code and .ld filesUpdate the FLASH configuration on MMT. (e.g. change the start address of the FLASH region)Re-generated code and .ld files Bug 2 : The vector table offset value is not updated from 0x00U even if the ISR vector checkbox is enabled and the start address of the FLASH region is changed from 0x08000000The VECT_TAB_OFFSET value in system_stm32h5xx.c is not updated after generating code. I think this value should be updated according to FLASH region configuration./************************* Miscellaneous Configuration ************************/ /*!< Uncomment the f
With HPDMA configured for SAI1A, no DMA setup code is generated with CubeMX 6.17.0. See attached IOC file as an example. Possible that I'm missing a required setting, but I can't find anything.Edit: Fully deleting and re-creating project seems to have fixed it :shrug:.
Hello, I have a question about STM32CubeMX regarding the STM32U5G7VJT6 MCU.STM32CubeMX 6/17.0 indicates that a non-existent SMPS power supply must be enabled for the STM32U5G7VJT6.However, this is the version without the 'Q' specified in the part number:Q = Dedicated pinout supporting SMPS step-down converter.When I call SystemPower_Config(), the microcontroller does not work; without calling this function, it works fine.Is this a bug in the STM32CubeMX, assuming only Q versions of this MCU exist?Best regards, Jack
Hello,When I try to change the supply source in power parameters STM32CubeMX 6.17.0 does not seems to generate anything when LL is selected. With HAL the configuration is changed in the generated code. Am I missing something ?Thank you for your help !
Hi ,I am creating an LCD test project for the STM32N6570-DK using STM32CubeMX and STM32CubeIDE.I have started the cube mx project by selecting 'Access to board selector' menu from the cube mx. After enabling the LCD (LTDC) peripheral and generating the project, the build fails because required BSP files are missing in workspaces.The error observed is:fatal error: stm32n6570_discovery_conf.h: No such file or directory#include "stm32n6570_discovery_conf.h"The error is caused by:#include "stm32n6570_discovery_conf.h"#include "stm32n6570_discovery_lcd.h"#include "stm32_lcd.h"However, CubeMX does not generate or populate the required BSP LCD files and dependencies automatically. Fixing one missing file leads to additional LCD-related build errors, indicating incomplete code generation.Please let me know solution for this other than copy in all the required files manually. I looking for solution related to stm cube mx.
Hi,peripheral handles, either the dedicated ones or the labeled ones are usable only during runtime, they're filled with data at the initialization. However, it would be practical to also get a compile-time usable definition as well.So, for example if I label timer 3 as 'MyTimer', we'll get#define MyTimer htim3It would be practical to also get something like this:#define _MyTimer_ TIM3This would give access to e.g. register addresses at compile time. For example, if I want to create a pointer table to the timer CCRs, I can write:volatile const uint32_t *TabCcrPtr[] = { &_MyTimer_->CCR1, &_MyTimer_->CCR2, &_MyTimer_->CCR3, &_MyTimer_->CCR4 };The idea is to have shorter code using tables because it's not needed to use switch statements, etc.Regards
Hello, I'm using CubeMX version 6.17.0 on MacOS, with an STM32H503CBT6 mcu.I'm trying to use an external audio crystal with a frequency of 24.576mhz, after setting the new frequency in the clock configuration tab, I get the right value in the .ioc file. However, "EXTERNAL_CLOCK_VALUE" doesn't seem to be defined in the stm32h5xx_hal_conf.h file, and the default 12288000UL value will be used instead. This makes audio all choppy and distorted, unless I manually define "EXTERNAL_CLOCK_VALUE" in this file to 24576000UL.I tried with other MCU families like the G0B1 and it will correctly generate the clock in the hal files.Is this a bug for the h5 series?
Please note that maintenance on the user authentication service is scheduled for 26 February. During this period, some disruptions may occur. The impact is limited to versions earlier than STM32CubeMX V6.16 and STM32CubeIDE V2.0.0. The service returns to normal soon after maintenance is complete. What to do if you encounter a problem If you experience issues during the maintenance window, please use st.com or try again after one hour. If the problem persists after that time, contact us through the Community for further assistance. Update 27 February 2026: The maintenance was successfully completed as scheduled on 26 February. If you encounter any issues, please do not hesitate to contact us.
STM32CubeMX v6.14.1 (Firmware Package is STM32Cube FW_G0 V1.6.2) has removed the option for peripheral I2C2 to select SMBus-two-wire-interface.This prevents me from migrating my project as only SMBus-Alert-mode is available but can't be used as the alert pin is already allocated for GPIO. So the CubeMX migration changes I2C2 to I2C mode.The original project is from STM32CubeMX v6.10.0 and the Firmware Package is STM32Cube FW_G0 V1.6.2I tried creating a project from scratch and the SMBus-two-wire-interface option just isn't available.
Hi,I am implementing DCMIPP configuration in that I am enabling the CSI but when I trying to enable the pin I cannot enable the the camera pins those pins are showing red. And I am unable locate .ioc file for DCMIPP interface is there any .ioc file configuration please provide that.
Question for STM.Could you please advise what to do to make the environment generate audio files?Could anyone of you show me how to generate these files?They are generated for all classes except audio.I guess there should be these too.Alternatively, please show me how to create an AUDIO Device using the STM32H5 processor.Please for the msc class even adds storage_configuration_number = USBD_Get_Configuration_Number(CLASS_TYPE_MSC, 0); storage_interface_number = USBD_Get_Interface_Number(CLASS_TYPE_MSC, 0); if( ux_device_stack_class_register( _ux_system_slave_class_storage_name, ux_device_class_storage_entry, storage_configuration_number, storage_interface_number, &storage_parameter) != UX_SUCCESS) { return UX_ERROR; }Edited to apply source code formatting - please see How to insert source code for future reference.
In the update to CubeMX version 6.17, the SD card initialization (in my case, SDMMC2) was changed, and the software goes into "Error_Handler()". In my project I use STM32H7B0VBT6, FATFS, not RTOS.Specifically, version 6.17:static void MX_SDMMC2_SD_Init(void) { /* USER CODE BEGIN SDMMC2_Init 0 */ /* USER CODE END SDMMC2_Init 0 */ /* USER CODE BEGIN SDMMC2_Init 1 */ /* USER CODE END SDMMC2_Init 1 */ hsd2.Instance = SDMMC2; hsd2.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING; hsd2.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE; hsd2.Init.BusWide = SDMMC_BUS_WIDE_4B; hsd2.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE; hsd2.Init.ClockDiv = 10; if (HAL_SD_Init(&hsd2) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN SDMMC2_Init 2 */ /* USER CODE END SDMMC2_Init 2 */ } In previous versions:static void MX_SDMMC2_SD_Init(void) { /* USER CODE BEGIN SDMMC2_Init 0 */ /* USER CODE END SDMMC2_Init 0 */ /* USER CODE BEGIN SDMMC2_Init 1 */
Version 6.16.1I have identified a number of bugs - collecting them here. Note that these are time wasters, but there are workarounds - so they are not critical but would definitely aid in the usability/productivity of users.-If you use the XCube.AI software package to generate a template application, the template application will not build. To fix it you have to add #include "ai_platform.h" at the top of the file under the other existing includes.-In the configuration for the individual networks for the XCube.AI, if you select the first profile "internal-memories-only--default" it will hang when analyzing and never complete. The workaround is to use the n6-noextmem option which appears to accomplish the same thing-When first starting up CubeMX, when you select the XCube.AI option (the actual selection of the components for inclusion), even if you have "FSBL" selected for the context, many times it will add it with ExtMem context in
I used CubeMX to generate the "LoRaWAN_AT_Slave" example for the B-WL5M-SUBG1 board.I had some issues with it waking up from sleep and upon a few hours of debugging i found that the LSE Driver Config was set to LOW in the example application, but the datasheet recommends HIGH.Just letting other people with the same issue know and hopefully the ST-Team can fix the example configuration in future releases.
Environment DetailsMicrocontroller: STM32C091CBTx (LQFP48)STM32CubeMX Version: 6.14.1LL-DriverConfiguration: An STM32CubeMX project is configured for an STM32C091CBTx MCU, with DMA channel 6 assigned to a peripheral (ADC).Generated Code (stm32c0xx_it.c): Upon code generation, CubeMX creates the shared interrupt handler for DMA channels 4, 5, 6, and 7 in the stm32c0xx_it.c file. The function is defined as:void DMAMUX1_DMA1_CH4_5_6_7_IRQHandler(void)Startup File Vector Table (startup_stm32c091xx.s): However, the default startup file provided with the project contains an incorrect entry for this interrupt vector. The handler name in the vector table is listed as:DMAMUX_DMA1CH4_5_IRQHandlerConsequently, the `DMAMUX1_DMA1_CH4_5_6_7_IRQHandler` function is never invoked when an attempt is made to trigger DMA Channel 6.Confirmed WorkaroundThe issue can be resolved by manually editing the startup file:In the `startup_stm32c091xx.s` file,Search for the incorre
Hello I found this issue, I drop you my report (with IA helping to write it :) )**Component/Tool:** STM32CubeMX (code generation)**MCU:** STM32C071KBT3 (STM32C0 family)**FW Package:** STM32Cube FW_C0 V1.4.0**Configuration:** USB Device with USBX CDC-ACM class, bare-metal (no RTOS / no ThreadX)**Description:**When generating code for a USB Device project using USBX middleware (CDC-ACM class) in bare-metal mode (without RTOS), STM32CubeMX generates the peripheral initialization calls in `main()` in the wrong order:Generated code (incorrect):MX_USB_PCD_Init(); // Called FIRST MX_USBX_Device_Init(); // Called SECOND**Expected code (correct):**MX_USBX_Device_Init(); MX_USB_PCD_Init(); **Root cause analysis:**`MX_USBX_Device_Init()` calls `ux_system_initialize()` and `ux_device_stack_initialize()` which set up the USBX system memory and device stack. The `MX_USB_PCD_Init()` function's USER CODE section then calls `_ux_dcd_stm32_initialize()` which registers the STM32 DCD driver with the USB
Since there is no caregory to post for the MCU Finder tool I'm posting here. On Windows, the stand-alone app, as well as the Android app, do not show any content when filtering by the H5 range in the series field. Could this please be fixed? It's been like this for multiple months now. Thanks.
Hello,I'm using the STM32N657 on a new project, and its not clear how users are supposed to setup GPIOs that are used in different domains (FSBL, Application, ExtMemLoader). For example I am using pin PN12 as a LED output and defined it in FSBL. Why doesn't this definition carry over to the other domains, and how can I get CubeMX to carry it over to the other domains? thanksMatthew
Hello,I’ve noticed a difference in behavior between STM32CubeMX configurations for STM32H7 and STM32N6 series.On STM32H7, when configuring CAN bit timing, the parameters such as Nominal Time Quantum, Nominal Time for one bit, and Nominal Baud Rate update dynamically based on the settings.On STM32N6 (using STM32CubeMX v6.16.0), these values remain constant. For example, even when using the official STM32 example with a nominal bit rate of 1 Mbit/s, CubeMX still shows a fixed value of 1000 bit/s and does not adjust the timing parameters.My question is:Is this a bug in STM32CubeMX v6.16.0 for STM32N6 series?Or is this a new feature specific to STM32N6 where the tool no longer recalculates these values?I’d appreciate clarification from ST or anyone who has encountered the same behavior.Thanks in advance!
I have an ST32CubeMX project for a STM32H7 mcu generated with STCubeMX 6.4 and using STM32Cube FW_H7 V1.9.1 where the project files are generated via cmake. Now I want to use STM32Cube FW_H7 V1.12.1, but apparently, in order to be able to generate the new files, I have to migrate the project to STM32CubeMX 6.16.1:The problem is that, once I click in "Migrate", it removes two important lines from my code:So, I went to CubeMX to check, and apparently, at a first glance, the field to configure ADC3 Prescaler is gone ( I do not have any other ADC on):Also, the clock configuration tab was showing a problem. I went to check and apparently ADC clock is not allowed to be more than 100 MHz anymore:Unfortunately, I can not slow PLL2P down, since it is used for other peripherals (e.g. SPI), but I could maybe change the clock source to PER_CK and then derive it from HSI to have it as 25 MHz ( 150 MHz + Prescaler of 6 ), although I do not know which other implications it could have.I looked up some
Hello,I was playing around with different versions of MCU and I've notice STM32H7B3LIH has no Graphic Accelerator mentioned in Product Selector.But as soon as I'm selecting it in CubeMX I can enable DMA2D in Multimedia.And think there are more MCUs with Chrome-ART Graphic Accelerator which are not correctly shown in Product Selector.
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.