Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi.I am trying to create STM32G0 projects with the uVision IDE, but the configuration option using CubeMX does not work. When creating a new project in uVision, and selecting the STM32CubeMX option within Manage Run-Time Environment, CubeMX does not run, and the following error message is displayed:Error #545: Required input file from generator STM32CubeMX: 'C:/……………/FrameworkCubeMX.gpdsc' is missingI have done a search, and it seems that this problem appeared years ago, but it was solved with new software versions.I am using µVision V5.40.0.0, C compiler V6.22, and STM32CubeMX Version 6.11.1 Where is the problem? Could someone help me?Thanks
When i try to set ADC sequencer to not fully configurable, ADC shows ADC_Regular_conversion_Mode error after migration of the .ioc file from previous version of CubeMx. In the previous version of CubeMx everything worked well. Help please!
I am using the STM32G031 MCU, and if you look at the picture below in the STM32 CubeMX,there are no NRST and BOOT0 settings at the PF2-NRST and PA14-Boot0 Pin I am curious as to whether it is set as default even if I do not configure it, or if there is a way to set it separately. help!!
Some bugs and caveats observed with STM32CubeMX V6.12.0 for an STM32H7S78-DK board, preparing a STM32CubeIDE project, using STM32Cube_FW_H7RS_V1.1.0 and with ‘Initialise all peripherals with the default Mode’ enabled...RM0477 Rev 7 and DS14359 Rev 2 descriptions of XSPI; ‘JDES251C’ should be ‘JESD251C‘.After generating, the STM32CubeIDE’s Project Explorer doesn’t show the include directories or header files of the enabled Middlewares. Without them, they’re not included in file-searches and they’re difficult to find and open in the IDE. The fix is to manually add suitable links in the linkedResources element in the .project.Re adding source and include directories to a project...If directories are manually added to the .project’s linkedResources element, and for C source file directories, to the .cproject’s sourceEntries element:A subsequent STM32CubeMX generate will remove them.If they’re added via the Project Explorer’s context menu:The .project’s linkedResources element is amended, b
This is a question about automatically generated code.When we change the ioc file in STM32CubeIDE, there is some code that We don't want to be overwritten by the automatic generation. How can we avoid this?Specifically, We have changed the value of HAL_StatusTypeDef in stm32f4xx_hal_def.h as follows. We don't want this to be overwritten. typedef enum { HAL_OK = 0x01U, HAL_ERROR = 0x02U, HAL_BUSY = 0x04U, HAL_TIMEOUT = 0x08U } HAL_StatusTypeDef;
CubeMX does not provide the option to choose whether GPIO pins should be initialized from the CM0+ or CM4 core. As a result, the generated code lacks GPIO clock definitions, GPIO ports, and pins. This prevents further progress and requires manual description of GPIO port initialization for each of the cores.If for each STM32 core, CubeMX generated at least a list of ports and assigned pins as definitions, GPIO initialization according to requirements would be faster.
As long as my .ioc file has the linesVP_EXTMEM_MANAGER_SIG_Activate_EXTMEM.Mode=Activate_EXTMEM VP_EXTMEM_MANAGER_SIG_Activate_EXTMEM.Signal=EXTMEM_MANAGER_SIG_Activate_EXTMEM in it, CubeIDE and CubeMX will be unable to open it with the error:Cannot invoke "java.util.List.iterator()" because "destList" is null. Deleting these two lines make it work. I am using 6.12.1 with an STM32H7R3I8Tx.
Hello, my problem, that uIP-Stack has TCP-Retransmissions with HTTP-trafic. That was observed with Wireshark. The same uIP-Stack works at STM32F7 properly. I'm not sure about Settings in CubeMX with Descriptor Address and Size. My settings are like follows: with this setting I have followed Error inside uVision5 (compiler version 5):Spoiler (Highlight to read)Error: L6984E: AT section main.o(.ARM.__AT_0x2400060F) has required base address 0x2400060f which is not aligned to section alignment 0x00000004.Error: L6984E: AT section main.o(.ARM.__AT_0x2400060F) has required base address 0x2400060f which is not aligned to section alignment 0x00000004.Could someone explain how to set Descriptors inside CubeMX properly and get Ethernet work reliable for HTTP trafic?
I can't seem to get CubeMX to install the CMSIS package. I have tried downloading directly from CubeMX, downloading .pack file and installing it from local (from Keil, arm, and even ST's github).I get an error "Problem during load of selected file... Unzip attempted beyond top-level directory:I tried both before and after the 5.5.0 update to no avail.And to make things worse I'm trying to migrage from Keil to IAR and really need the LL drivers to keep me from having to re-write a large portion of my code. Any help is greatly appreciated
So after having a firmware update, this popped up on my screen. What do I do next. NB, I've probably chosen a wrong label because I don't even know what to label this with
I am use STM32L431RCT6,and my CubeMX config is this:And my code is:```uint32_t data = 128;ret = HAL_DAC_SetValue(&hdac1, DAC_CHANNEL_1, DAC_ALIGN_8B_R, data);if(ret) {HAL_Delay(10);}ret = HAL_DAC_Start(&hdac1, DAC_CHANNEL_1);if(ret) {HAL_Delay(10);}```And if my Trigger method use None, measure is OK(middle with VCC).I do not know why.
Background:Using an specific MCU, and after a board build, found that needed more memory. But a part in the "F" family with same pin out did not exists. To find another part, used the selector to select certain features to get close to a number of parts. Then went with CubeMx to check each part for the specific configuration. Found only ONE "L" family part that support the identical configuration and ONE other in the L family with just one pin to relocate.Request:It should be feasible for CubeMX (perhaps with AI, linear regression or just logical code) to take a certain configuration (& package) and match with the different configuration. As the main inputs such as package and function are limited it should be quick to nail down the number of potential alternativesImplementation:1. Load a ioc file.2. User provided number of maximum mismatches pins3. Code matches configuration with alternate parts4. CubeMX list full pin to pin compatible, and also the one within th
I have an IOC for an STM32L433 that has TIM6 and TIM7 enabled, with interrupts enabled for both. In the NVIC settings for these two interrupts, I have deselected "Generate Enable in Init".However, when the code is generated, the interrupts are still enabled in Src/stm32l4xx_hal_msp.c.This seems like a bug.
I just spent several days (luckily not full time) failing to get a simple PWM output working. I could get it working using the HAL drivers, but not able to get it working with the LL drivers. After spending most of my time assuming it was user error I finally resorted to full register dumps of the Timer registers comparing the HAL code vs the LL code and found the discrepancy.In the LL-code, somehow the MX_TIM17_Init() generated by CubeMX clears the MOE bit in the BDTR register, disabling outputs even though I have break mode disabled in the UI. Generating HAL code with exactly the same settings correctly sets the MOE bit.This seems to be a bug. After isolating the issue, it was a simple case of adding the callLL_TIM_EnableAllOutputs(TIM17) ; to my code to enable outputs and all is well. Double checking all the LL examples, there are no calls to the above routine, so don't think it is expected.Did I miss something somewhere or is this a CubeMX bug?wil
Hello Everyone,I have read several posts on this forum for the same problem that I am posting.I cannot download CubeMX, CubeIDE, CubeProgrammer from the Developer zone.I have tried several browsers (Firefox, Brave).I have tried 2 desktop computers (HP and Dell). OS is Win7 on both.On the HP, I can't even log in to st.com. When I enter my credentials, it takes me to a page that says, Sorry that page does not exist (404 error).On the Dell I can log in and here is what happens:Your website takes me around in circles.I log in and proceed to the page for software download.I select CubeMXI select WindowsI Accept agreementThen it takes me back to the page that I started at.This is second day that I haver been going around in circles.I have tried logging in as guest with no downloading success.Any HELP is MUCH appreciated.I have a Nucleo board and would like to start programming it !Are the software tools available somewhere else like github or sourceforge?Many thanks,robert &
When executing RSTDAA and ENTDAA once, it succeeds, but when executed more than twice, it does not work properly. Since RSTDAA is being performed, I think there should be no problem, but is it not possible to execute it more than twice?//1st rstdaa+entdaa/* Assign dynamic address processus */if (HAL_I3C_Ctrl_DynAddrAssign_IT(&hi3c1,I3C_RSTDAA_THEN_ENTDAA) != HAL_OK){/* Error_Handler() function is called when error occurs. */Error_Handler();}// This function is succeedwhile (HAL_I3C_GetState(&hi3c1) != HAL_I3C_STATE_READY){}// This function is succeed //2nd rstdaa +entdaa/* Assign dynamic address processus */if (HAL_I3C_Ctrl_DynAddrAssign_IT(&hi3c1,I3C_RSTDAA_THEN_ENTDAA) != HAL_OK){/* Error_Handler() function is called when error occurs. */Error_Handler();}// This function is succeedwhile (HAL_I3C_GetState(&hi3c1) != HAL_I3C_STATE_READY){}// This function is Failed
Hi, I am facing strange problem with Cubemx 6.12.1 installation on my windows 11 (64bit), installation package but does not proceed. Any idea
I have an STM32U535RET6 chipset and I'm trying to enable it's voltage reference buffer, but I can't. I have the latest version of the STM32 Cube IDE, and I'm stuck at the "VREF+ is double bonded with VDDA in this package" message. What's interesting is that a colleague of mine, somehow can enable the VREFBUF-er. I've attached 2 screenshots below, as well as the .ioc file. It's the same chipset, so I'm relay confused about the actual problem. Can somebody help me out please?
Hi,Id need to measure the frequency of an input signal using TIM4. My device is a STM32L475RCT and to do this I've used the TIM_InputCapture example from CubeIDE. In my application TIM1 is not available.The problem is for the TIM4 I'm not able to set the Input Capture Interrupt from NVIC Interrupt table. How can I do this? I've also observed the TIM17 is available and I think this timer can be linked to TIM1 somehow. The Input Capture Interrupt for TIM1 is feasible.Any idea?regards,gaston
My board has ethernet PHY Micrel KSZ8721.I use STM32F407, RMII, LWIP, noRTOS.CubeMX 6.7, STM32Lib 1.27.1Although this is no exotic PHY, it is not listed in the supported BSP PHY as LAN8742 and DP83848.How can I write a mock driver so that custom calls to support the PHY are integrated into the auto-generated LWIP.c functions.I see some potential problems in the current CubeMX setup:1) PHY must be setup in Ethernet AND LwIP tab. As the single responsibility theory says: one should setup only in 1(one) place.2) If USER_PHY is selected , then USER_PHX calls should be generated, and not omitted as now.3) USER_PHY creates warning, but it should be an accepted solution ...Thanks, Adib.
Hi,after upgrading the whole suite to last release (as 09-jul-2024), code generation breaks code in function MX_FLASH_Init (main.c file).If without condition is generated at line 19, no indentation on following block (which closes at line 53)./** * @brief FLASH Initialization Function * @PAram None * @retval None */ static void MX_FLASH_Init(void) { /* USER CODE BEGIN FLASH_Init 0 */ /* USER CODE END FLASH_Init 0 */ FLASH_OBProgramInitTypeDef pOBInit = {0}; /* USER CODE BEGIN FLASH_Init 1 */ /* USER CODE END FLASH_Init 1 */ HAL_FLASHEx_OBGetConfig(&pOBInit); if () { if (HAL_FLASH_Unlock() != HAL_OK) { Error_Handler(); } /* Option Bytes settings */ if (HAL_FLASH_OB_Unlock() != HAL_OK) { Error_Handler(); } pOBInit.OptionType = OPTIONBYTE_USER|OPTIONBYTE_BOOTADDR; pOBInit.USERType = OB_USER_BOR_LEV; pOBInit.USERConfig = OB_BOR_LEVEL_4; pOBInit.BootAddrConfig = OB_BOOTADDR_NS0; pOBInit.BootAddr = 0x08000000; if (HAL_FLASHEx_OBProgram(&pOBInit) != H
I've been using the recently added CMake generation feature of cubemx, as of now it creates an INTERFACE library for both project related and drivers related sources, the problem is that those sources get propagated for every external library that needs stm32cube drivers.One workaround is creating a STATIC wrapper library like this:# Retrieve properties from the INTERFACE library generated by STM32CubeMXget_target_property(STM32_SOURCES stm32cubemx INTERFACE_SOURCES)get_target_property(STM32_INCLUDE_DIRS stm32cubemx INTERFACE_INCLUDE_DIRECTORIES)get_target_property(STM32_COMPILE_DEFINITIONS stm32cubemx INTERFACE_COMPILE_DEFINITIONS)get_target_property(STM32_LINK_DIRECTORIES stm32cubemx INTERFACE_LINK_DIRECTORIES)get_target_property(STM32_LINK_LIBRARIES stm32cubemx INTERFACE_LINK_LIBRARIES)# Log the propertiesmessage(STATUS "STM32_SOURCES: ${STM32_SOURCES}")message(STATUS "STM32_INCLUDE_DIRS: ${STM32_INCLUDE_DIRS}")message(STATUS "STM32_COMPILE_DEFINITIONS: ${STM32_COMPILE_DEFINITIONS}"
Hi there;I'm extremely new to the world of ST, and trying to get my feet under me with it, coming from a few years' experience developing for esp32 microcontrollers using the esp-idf framework. I have an Adafruit stm32f405 feather; I understand this isn't the same as a proper ST development board, but I am trying to learn with it nevertheless. The board has an onboard neopixel - out of the box, the board can be plugged into USB and the neopixel begins cycling through colors. I *think* it comes configured with circuitPython, but I am interested in getting it working using ST's tools and workflows, and so I'm trying to figure out how to get that neopixel working in cubeIDE. Studying the schematic, I can see the neopixel is connected via pin PC0. This is where I'm getting a bit lost - I *think* what I need to do is configure PWM using some timer settings somewhere (?), then connect this pin PC0 to that timer/pwm generator. But it's not clear to me how to do this in the cube
Hi there!Opening an H7.ioc file FW_H7 V1.11.1 in CubeMX 6.11.1 containing a LWIP secition and upgrade to FW_H7 V1.11.2 removes LWIP section.Cheers!open the attached .ioc file in CubeMX 6.11.1migrate to FW version FW_H7 V1.11.2do not change anything and save the .ioc fileobserve missing LWIP secition in .ioc fileobserve the missing / not found LWIP files in CubeIDEpre uppgrade FW_H7 V1.11.1post upgrade FW_H7 V1.11.2LWIP is not availabe for single core (M7 / M4)delta of .ioc
For my project I'm using an STM32L476 MCU with CubeIDE 1.15.1 and CubeMX 6.11.1In this project I'm using ThreadX / Azure RTOS.For a new feature I doubled the speed of the MSI, which doubles the system clock, but the HCLK stays the same (by changing the prescaler).Now when I click regenerate code in CubeMX, the values for the systick are doubled in the tx_initialize_low_level.sSo as an overview Old valueNew valueMSI1 MHz2 MHzSysClk1 MHz2 MHzHClk1 MHz1 MHzSYSTEM_CLOCK var in tx_initialize_low_level.s1 MHz2 MHzThe SYSTEM_CLOCK var in tx_initialize_low_level.s is used to configure the SysTick.To me this looks like a bug in the generator as the System clock does not affect the SysTick (the HClk does)?
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.