Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Dear Sir/Madam,X-CUBE-AI 9.1.0 has been installed in the STM32CubeMX on my laptop. However,there is an issue: When I try to select one of applications (SystemPerformance/Validation/ApplicationTemplate),they are grey and seem those choices are not active. I have tried to reinstall the X-CUBE-AI, but no luck. I do appreciate your advice to help me overcome this issue. Many thanks Q Shan
HiI setup a new cube project using cubeIDE for NUCLEO f429ZI.iselected the NUCLEO f429ZII added LWIP + no DHCPI added Freertos CMSIS V2I compiled the code. Problem 1: ping was not working. I solved it by increasing the stacksize of default task to1024 bytes.With this I could Ping the board.Problem 2: after some minute ping would no longer work. My code would hang here: xQueueSemaphoreTake::::-> configASSERT( pxQueue->uxItemSize == 0 );I solved this by giving the defalt task "osPriorityAboveNormal"Atleast it didnt hang for the last 20 minutes. is this a bug, or am I missing something?I also attached my cube ioc file.Would be nice if some could help out.
Hi guys,Just wonder if there is anyone tried LwIP on the newer version of stm32cubeIDE (1.12 and above). I am trying to integrate stm32F4 series with LAN8720.There is a "Platform settings" which requires us to select the driver_PHY. I am using LAN8720 but I can only see "Undefined, LAN8742 and DP83848" as options.I went thru UM1709, UM1713, UM1718 and AN3966 but still could not find the solution. At least UM1718 section 19.10 still mentioned there should be a "user PHY" but this option is not available in my current version of IDE.Maybe I should just try to modify LAN8742's BSP driver's code? or is there anyway I could manually include the component drivers to be used in my project? If yes, may I know how? (Newbie to ethernet protocol)
I found that the ADC sample is wrong when I use LL library, and it is correct when using HAL library.By comparing the registers, I found the code generated for LL library missing a sentence; LL_ADC_SetChannelPreSelection(ADC1, LL_ADC_CHANNEL_19); And when I config the ADC using DMA to transfer, it doesn't work;I added the following code manually, and it works. LL_ADC_REG_SetDataTransferMode(ADC1, LL_ADC_REG_DMA_TRANSFER_UNLIMITED); I configure the VREFBUF to use externel reference, but this seems generate nothing.I added the following code manually, and it works. LL_APB4_GRP1_EnableClock(LL_APB4_GRP1_PERIPH_VREF); SET_BIT(VREFBUF->CSR, VREFBUF_CSR_HIZ); Can these bugs get fix?
Hello,How can I transfer the configuration of an existing project to a new project?Unfortunately, the Project Manager does not allow a name change.
It is really hard to read pins when editing a BGA chip.vertically or horizontally flipping will brighten the view, but keep pins in their nature position will help in PCB planning / layout.I know this has been there for years, but please consider the diversification of user habits.Thanks!
This error occurs in the compilation of the project generated by stm32ubemx. How can I solve it.thank you.
Does anyone know what is the "PLL 1" parameter on STM32CubeMX clock tree?I am using STM32H563 Nucleo board and found that there is "PLL1" parameter.When I change this 0 to 1, SYSCLK was changed a little bit, 125 to 125.000122.I would like to know why this change happen, and found the PLL1VCOSEL.Is this bit relevant to the setting?Let me know why the change happen and what register related to "PLL1".
Hello,I have a problem with configuring some GPIO as input for the ADC4:While they appear to be available in the documentation (and in the pop-up window associated with GPIO), the choice is grayed out in the tab associated with ADC4.I'm using STM32CubeMx version 6.13.0 (but it's the same with previous versions).Is this a bug or did I forget something?Sincerely,Jean-Louis
I am a beginner.How do I login?I can't login MX program.
Hello everyone,I was trying to design a Hyperbus RAM based PCB for one of my projects but I realized that when I configure Hyperbus under the OCTOSPI1 settings I do not get the DQS(RWDS) line. Here are the configuration pictures. Thanks,Burak Önemli
Used STM32CubeIDE version: 1.15.1Used driver library: STM32Cube_FW_G0_V1.6.2, LowLevel-DriversMicrocontroller STM32G0B0xx LL Drivers have been selected for DMA and all other peripherals as far as possible. There are several bugs in the generated code.Bug #1Even though LL drivers should be used, MX_DMA_Init() looks like this: /** * Enable DMA controller clock */ void MX_DMA_Init(void) { /* Init with LL driver */ /* DMA controller clock enable */ LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_DMA1); __HAL_RCC_DMA2_CLK_ENABLE(); // <- Should be LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_DMA2) instead! /* DMA interrupt init */ /* DMA1_Channel1_IRQn interrupt configuration */ NVIC_SetPriority(DMA1_Channel1_IRQn, 1); NVIC_EnableIRQ(DMA1_Channel1_IRQn); /* DMA1_Channel2_3_IRQn interrupt configuration */ NVIC_SetPriority(DMA1_Channel2_3_IRQn, 1); NVIC_EnableIRQ(DMA1_Channel2_3_IRQn); /* DMA1_Ch4_7_DMA2_Ch1_5_DMAMUX1_OVR_IRQn interrupt configuration *
I'm checking the PVD example from STM32G0 repository in CubeMx and something looks backwards to me unless I'm misunderstanding it. I'm expecting the rising callback when the voltage is ABOVE the threshold not below like the code shows. Likewise, I'm expecting the falling callback when the voltage is BELOW threshold. But the code behaves the opposite, that is, the falling callback comes in when the voltage is above ~2.6V and rising callback when is below ~2.5V.Part of the code:/* Configure the PVD Level to 3 and generate an interrupt on rising and falling edges(PVD detection level set to 2.5V, refer to the electrical characteristics of you device datasheet for more details) */ sConfigPVD.PVDLevel = PWR_PVDLEVEL_3; sConfigPVD.Mode = PWR_PVD_MODE_IT_RISING_FALLING; void HAL_PWREx_PVD_PVM_Rising_Callback(void) { /* Turn Off LED1 as voltage is below threshold */ BSP_LED_Off(LED1); /* Set uwToggleOn global variable to zero to disable toggle */ uwToggleOn = 0u; }
Used STM32CubeIDE version: 1.15.1Used driver library: STM32Cube_FW_G0_V1.6.2, LowLevel-DriversMicrocontroller STM32G070xx I found a bug in the generated MX_ADC1_Init() function. The delay loop index variable misses the volatile keyword. Consequently with optimization turned on the loop is optimized away and the delay is shorter than expected. This may lead to unexpected ADC errors, for example if the calibration is performed directly after MX_ADC1_Init(). void MX_ADC1_Init(void) { ... /* Enable ADC internal voltage regulator */ LL_ADC_EnableInternalRegulator(ADC1); /* Delay for ADC internal voltage regulator stabilization. */ /* Compute number of CPU cycles to wait for, from delay in us. */ /* Note: Variable divided by 2 to compensate partially */ /* CPU processing cycles (depends on compilation optimization). */ /* Note: If system core clock frequency is below 200kHz, wait time */ /* is only a few CPU processing cycles. */ volatile uint32_t wait_loop_index; // &l
Hi,I am using STM32F105RC. CubeMX does not seem to configure PLL2 at all in SystemClock_Config(). Below in the clock configurator it is clear that I have enabled PLL2 to be used for PLLCLK and USB clock.Seems like a CubeMX bug. Or if someone can point me to what I am doing wrong that would be appreciated. void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV5; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.Prediv1Source = RCC_PREDIV1_SOURCE_PLL2; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLMUL = RCC_PL
I come from the world of web development, where we are spoiled by probably the best DX experience in the world in many cases, if using modern toolchains. Unfortunately C/C++ and embedded development lags far behind.STM32CubeMX can improve this situation slightly for the STM32 ecosystem.In STM32CubeMX, under Project Manager -> Toolchain /IDE it is only possible to select one toolchain. This is a not-so-modern way of working.If there is a team working on a software project, one should never force users to stick to one IDE, they should be able to use any IDE of their preference. As such, STM32CubeMX should have a multi-choice menu to generate the proper files for all IDEs that people want to use in a project. As IDE files are committed, it means other users can easily clone a repo and get started in their IDE immediately.This is possible today as well, by re-generating the project for each IDE variant and committing the files, but it is cumbersome for a few reasons:- STM32CubeMX rename
Hi, when I generate code for the SMT32L412RBTxP using TSC with CubeMX I get duplicated entries in tsl_user.h.One channel does not work. So I edit Channel 2 to use the missing group and IO:It now works, but when code is regenerated with CubeMX it overwrites this back to the first image.Is this a bug or am I doing something wrong?Thanks, Lance.
Greetings, I've been using FDCAN on STM32G0B boards at 64Mhz. I'm trying to configure an STM32H745 and it seems that the maximum clock frequency for FDCAN is 50MHz? 50Mhz itself is a very strange frequency and bitrates cannot be solved well using this frequency.With some clock tweaking I was able to get it to 48Mhz. But I wasn't able to send/receive on my FDCAN network (I'm not sure if that is related)Just looking for some thoughts on that. I am going to try 32Mhz next.
When I change a pin configuration, the user-label I'd previously given the pin is removed and it reverts to the default.That seems to me to be a wrong behaviour ... I think it should stick be default, or should have an option to lock it.This was raised by Arnold Bischoff back in 2016 and seemed acknowledged, but I think nothing has since happened on it.
Hi,I use the memory management function to generate a custom ld file, but the generated ld file is wrong.
I need UART to use printf, but it's showing as disabled. How can I enable it, and I also need an example code for printf.
Important Notice for STM32CubeMX Users Current Release: STM32CubeMX 6.12.1 Purpose: This release primarily addresses issues related to STM32MPUs. Problem: Issues introduced with the generated code for Makefile and CMake projects. Recommendation: For MCU Users: If you are using an MCU (not an MPU), it is recommended to stay on STM32CubeMX 6.12.0. For MPU Users generating code for MCUs: follow the instructions below. Issue Description: Problem: When compiling a CMake or Makefile project, a build error occurs due to a syntax error related to the linker file. Cause: The .data, .bss, and ._user_heap_stack sections are not attributed to the RAM memory region. Additionally, the RAM attribute is missing from the highest address in the user stack calculation formula. Solution: Attribute Memory Sections: Ensure that the .data, .bss, and ._user_heap_stack sections are attributed to the appropriate RAM memory region. Update Stack Calculation: Add the RA
Hello, I am upgrading a software from an existing project for (f7 mcu). Software is generated by an old version of stm32CubeMX installed in 2018 (never updated) (firmware version V1.14.0 ), and is using some middlewares, like FATFS. However I noticed that on each code generation, the files of the middleware folder are not getting updated.Theferore I would greatly appreciate any help to answer the following :-Why are those files not getting updated ? Is there a parameter somewhere in CubeMX that handles an eventual activation of the middleware files generation ?-I plan to bring the project on modern tools (up to date stm32cubeIDE), will I be able to choose if the middlewares get generated ? Will a 2018/2019 version of a file like ff.c still work in a more recent environment ? Kind reguards, PF.
Dear ST Hello,what is the best way to use CubeMX without any deleting functions in CubeIDE?For code added to the main file, it's clear to use /**User */ comment guidelines but, for functions, should i create another file or module for my functions?Thank you in advance,S.Tairk,
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.