Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
cubeMX version 6.13, generating for CMake.Hi there,I'm configuring an STM32H7S3 nucleo board. I can build, flash, run, and debug code.I am adding a UART for logging and now am getting the titled error when generating:Edit: This problem appears the moment I go to the Memory Management tab! If I reset to previous .ioc state, the code generates happily. If I open the project and simply open the memory management tab, this error appears.In tools>Memory Management it looks like my bootloader and app both live in the 64kB onboard flash I want the bootloader to use the onboard flash, and do execute-in-place for code on the provided NOR flash.I have followed these guides, which seem relatively up-to-date:Getting started with MMT(Memory Management Tool) - stm32mcustm32h7s_workshop/1_external_memory/external_memory.md at main · ST-TOMAS-Workshop/stm32h7s_workshopIn particular, section 6.2.5.1 of the first link shows how application flash will be moved to XSPI. In spite of my fo
error: cube firmware cannot be installed into repository.a file or directory with name same already exist.The cause of this error = old time add firmware and not remove with stm32cubeIDE or stm32cubeMX.(manually removed or uninstalled stm32cubeIDE / Stm32CubeMX before remove firmware with stm32cubeIDE or stm32cubeMX).solution: Note: 1) not need any program mode: administrator.2) not need any program close and open or pc restart.------------------1) if use stm32CubeMX:Download any firmware for MCU. (exp: for stm32f4xx need download STM32CubeF4_FW_Vxxx)(for find address go to "ST" site and search "STM32CubeF4" for stm32f4xx & etc.) after download you have a zip file.open stm32CubeMXclick Help -> updater Setting -> copy "Repository Folder" address and in pc go to this address.copy zip file into this address and extract here(result: is created a folder with name "STM32Cube_FW_Fx_Vx.x.x")delete copy zip file.now change mian zip file address on pc to new desired address o
I am using the STM32F723 with custom, self-powered PCB interfaced to a host using USB HS. Everything worked fine with with CubeMX 6.12, but after upgrading to more recent versions, I noticed that the following functions are no longer generated within HAL_PCD_MspInit() (file usbd_conf.c): __HAL_RCC_USB_OTG_HS_CLK_ENABLE();__HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE(); and also the corresponding clock-disabling functions in HAL_PCD_MspDeInit(). If I manually re-insert these calls, everything works again.Anyone knows the reason why these functions are not generated, and if I am missing any USB_HS setting in more recent CubeMX versions that should be taking care of this issue? Thanks!
I'm using the latest versions of Keil uVision and STM32CubeMX but when I try to run the CubeMX from the Run-Time Environment screen of Keil, I'm facing with "Error instantiating RTE components" and "Error #545" errors.I think, Keil cannot run the CubeMX because of the launcher error. When I try to run the STM32CubeMxLauncher.exe manually, it pops STM32CubeMX Launcher V1.0.7.0Copyright (C) 2015-2019 ARM Limited (or its affiliates). All rights reserved.*** Error: STM32CubeMX could not be found !CubeMXLauncher termiates with error code 3error. To overcome these errors, I tried many methods.I deleted and reinstalled, changed from "for only me" to "for all users", added the path to the System Environment Variables, tried previous versions etc. None of them worked.
Hello,I'm working with the new STM32N6570-DK series. But I can't generate the code with MDK ARM.Thanks,Pierrick Dupont
Hi everyone,I’m currently working on an I2C communication setup using the Nucleo-H753ZI DK but the cubeMx document is for the STM32H743BIT (the MCU for my custom board) and aiming to run it in Fast Mode (400 kHz). However, when configuring the I2C clock speed to 400 kHz, the CLK signal becomes unstable, as shown in the attached image.To ensure the setup is functioning correctly, I ran tests with I2C configured at 100 kHz, and the communication works perfectly in that case. I’ve also included an image of the system clock configuration in case there’s something that could be optimized. Does anyone know what might be causing the instability in the CLK signal, preventing proper communication at 400 kHz? Thanks in advance for your help!
Hello,In CubeIDE I try to generate RTC code which has decimal parameters. However in code generation I realized that it converted to hex value by itself.You can check screen shots in the attachment.
I'm using ThreadX on a STM32H743 MCU. I'm trying to setup a USB Host_only on the USB_HS device, and a USB Device_only device on USB_FS. The peripheral configuration is okIn the AzRtos settings, it defines 2 seperate byte_pools for each device (one for the host and one for the device). So far so good.In the USBX configuration, everything seems to be setup properly as well. Everything seems to be configured properly.... so now lets get CubeMX to generate the code....In the app_azure_rtos.c file, CubeMX generates the 2 separate instances of USBx, with 2 memory pools. (this is good) /**************************************************************************/ /* UsbX Host Pool */ /**************************************************************************/ #if USE_USBX_HOST == 1 syslog(SYSLOG_INFO, "USB Host memory pool Addr [%08x] size=[%d]", (UINT)ux_host_byte_pool_buffer, (UINT)UX_HOST_APP_MEM_POOL_SIZE); memset(ux_host_byte_pool_bu
Hello, Hope you're well. I started a project with CubeMX to use makefiles. I am able to compile and flash to the board but the code does not run properly on the f4 discovery board. To debug, I used Keil on a windows system and the code is actually working as expected(no changes made). Getting back to using make on my linux machine, the same code does not work properly on the board.I then tried CubeIDE on linux and uploaded the code without any modifications and it works. So it leads me to believe that the problem is the cubemx generated makefile or it could be something else I am unaware about. I appreciate any help figuring this out, thank you.Here is the current makefile ########################################################################################################################## # File automatically-generated by tool: [projectgenerator] version: [4.5.0-RC5] date: [Mon Mar 10 15:10:23 EDT 2025] ####################################################################
Hi,when configuring the LTDC for a 800 x 800 display, the Window Horizontal Start is by default set to 0 which suggests it is a 0-indexed range. So do you set the Window Horizontal Stop and Window Vertical Stop to 800 or to 799? As a separate question, if you use TouchGFX, are those values changed according to what you put on various pages and/or by some settings there? Thank you :)Rick
Missing 4bit and 8 bit bus options for eMMc. I am using stm32cubeide1.17.0, completely empty project, shows no conflicts. What am I doing wrong?
Hello: I am trying to use VS Code. below message will always pop up. With the generated codes I had another set of errors at VS Code. Error at VS Code I need some guidance. Regards Simon
Hello everyone,I recently encountered an issue after updating the STM32H5 MCU Package from v1.0.1 to v1.3.0. Some peripheral pin assignments have changed, and previously available pin options are no longer configurable.I started my project in 2024 using STM32H5 Series and developed my hardware based on MCU Package v1.0.1. Recently, I needed a simple peripheral modification and accidentally migrated my IOC file to v1.3.0. After doing so, I noticed that some pin assignments had changed.For example, on STM32H563VGTx, in RMII Ethernet mode, the ETH_TXD1 pin was originally assigned to PB13 in v1.0.1, but in v1.3.0, this option is no longer available (it has been removed from the possible pin mappings).I couldn’t find any release notes explaining why these changes were made. If this is a critical update, I would like to understand the reason behind it so I can decide whether I need to update my PCB design accordingly.Has anyone else encountered this issue, or does anyone have insights
A new question moved from this thread to the correct forum board (to be answered by CubeMx team) Hi If STM32U5 has no support for Ethernet why in configurator i can enable the Middleware NetxDuo? The question start from this point, NetxDuo support, as documented, the LAN8742 component. The STM32U5 can enable NetxDuo. So STM32U5 can be equipped with ethernet port. If this is not true the configurator cannot give the possibility to enable this sw component. Looking at example present in other MCU as F4/H7 series, the pins used to drive ethernet component are GPIOs the only difference is the presence of interrupt drived from Eth block. but in the code seems, if im not wrong, not used in connection management.
MacOS 15.3.1. CubeIDE 1.18.0. Firmware STM32Cube FW_U5 V1.7.0.I was tracking down an issue with SD cards on SDMMC2 on an STM32U5G9N not wanting to start.I found that HAL_SD_MspInit calls:__HAL_RCC_SDMMC1_CLK_ENABLE();instead of:__HAL_RCC_SDMMC2_CLK_ENABLE();
a picture is worth a 1000 words...Attached is the .ioc file
Posted on October 17, 2017 at 12:08When using CubeMX, with STM32L476, for setting LSE drive capability other than 'Low Drive' the setting will not be implemented. This is due to the fact that the write access using bit DBP in PWR->CR1 is not set prior to setting RCC->BDCR value.The code generated in SystemClock_Config is:void SystemClock_Config(void){RCC_OscInitTypeDef RCC_OscInitStruct; RCC_ClkInitTypeDef RCC_ClkInitStruct; RCC_PeriphCLKInitTypeDef PeriphClkInit;/**Configure LSE Drive Capability */ __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW);/**Initializes the CPU, AHB and APB busses clocks */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE|RCC_OSCILLATORTYPE_MSI; RCC_OscInitStruct.LSEState = RCC_LSE_ON; RCC_OscInitStruct.MSIState = RCC_MSI_ON;....}where HAL_PWR_EnableBkUpAccess must be executed prior to __HAL_RCC_LSEDRIVE_CONFIG#cubemx #lse
Hi,looking at the screenshot below of CubeMX in the LTDC, the total Width and total Height are non-editable (i.e. auto calculated) but they are one pixel less?For example, for the attached display datasheet:- Horizontal Sync Width (Editable) = 8 pixels- Horizontal Back Porch (Editable) = 7 pixels- Active width (Editable) = 800 pixels- Horizontal Front Porch (Editable) = 6 pixelsSo the total is 821 pixels instead of 820. But CubeMX displays 820 and it is not editable.Did I miss something? Do I need to change some other setting?Thank you :)
New in CubeMX, so read this with "nonexpert" flag set ;)If HSE is used as source for RTC on STM32L072 device, it fails to initialize clock source for RTC.Running RTC with LSI or LSE both work fine, but with HSE it fails, regardless of prescaller setting.I think problem is in HAL_RCCEx_PeriphCLKConfig() function, it fails to set HSE as RTC source because HSE is allready enabled and this block of code fails: /* Check if user wants to change HSE RTC prescaler whereas HSE is enabled */ temp_reg = (RCC->CR & RCC_CR_RTCPRE); if ((temp_reg != (PeriphClkInit->RTCClockSelection & RCC_CR_RTCPRE))#if defined (LCD) || (temp_reg != (PeriphClkInit->LCDClockSelection & RCC_CR_RTCPRE))#endif /* LCD */ ) { /* Check HSE State */ if ((PeriphClkInit->RTCClockSelection & RCC_CSR_RTCSEL) == RCC_CSR_RTCSEL_HSE)
Hi。A simple yet glaring bug that persists: when you open stm32cubeMX and enter information in the 'Commercial Part Number' field, you'll notice that the letters you type appear twice. For example, if you type 's', the input box shows 'ss'; if you type 't', the input box shows two 't's. -----warmest greetings。
Hello,When a user adds a peripheral (for example I2c), CubeMx picks some default and/or available pins for the device.It would be really nice if CubeMX can list all the Alternative pins that this peripheral can use. So by right clicking on "I2C_SCL" in the image above, a popup can appear with a list of possible pins [ PB6 (green) because it is selected, PA0 (possibly yellow) because it is used by another peripheral, and PF6). Then the user can click on the new pin in the popup list and change the pin number. In my opinion, this would make pin selection a lot easier.ThanksMatthew
HII just upgraded MX 6.14The SAI configuration panel fail to load, all other configurations panel are available. The existing SAI configuration is not changed but MX. It also report an error before the code generation for SAI not correctly configured.
STM32Cube IDE 1.18.0fw : STM32Cube_FW_H7RS_V1.2.0brd : NUCLEO-H7S3L8* main issue is :Once project created : SAI configuration not provided in CubeMX after activation, therefore no setting can be adjusted in this section ( see picture )This problem also appreared after migration from a similar project edited with cube 1.17.0 and implying SAI to 1.18.0 with STM32Cube_FW_H7RS_V1.2.0.* other issue :- C/C++ indexer errors popups appearing along while creating a new projet from scratch.-> deleting workbench.xmi (as suggested as a workaround in found other post : https://community.st.com/t5/stm32cubeide-mcus/c-c-indexer-has-encountered-a-problem-1-11-2/td-p/84723 ) file located at : \STM32CubeIDE\workspace_1.18.0\.metadata\.plugins\org.eclipse.e4.workbench-> rebuil index.Thanks for your cooperation in resolving.
When DCache is disabled, CubeMX still generates this:#define __DCACHE_PRESENT 1U /*!< CM7 data cache present */If you comment out this line, CubeMX will uncomment it, causing some peripherals to fail.Using 6.14 and the STM32H743 cpu.
When unchecking "Generate Code" for MX_LWIP_Init, the code is still generated anyway. It's very annoying because I have to delete the generated function every time I generate code. Using CubeMX version 6.14.
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.