Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I have an IOC file from an older CubeMX. Since I could not find the MX version number in either mxproject or ioc file, I cannot tell the exact version. It should be about one or two years old.Now I want to open it in MX 5.4 from CubeIDE 1.1.MX asks to migrate the file, which I do but then the project has a lot of errors in its configuration and cannot generate code. Almost all items in the Connectivity section are conflicting with something. The IOC project is in production use with Atollic TRUESTudio so I doubt that it is broken.Has anyone migrated an IOC file successfully and can give some advice?Thank you.
I want to configure the maximum clock rate for the timers of 240MHz so I need to use the PLL block. However the CubeMx clock configuration tool doesn't seem to work. It keeps resetting my PLL settings to /32, x129, /2. When I change these settings it doesn't seem to have any effect.What am I doing wrong?
Hi,After generating code using STM32CubeMX 5.4.0, the Register Callbacks selection section is reset. e.g.:#define USE_HAL_SAI_REGISTER_CALLBACKS 1Ubecomes#define USE_HAL_SAI_REGISTER_CALLBACKS 0Uin the stm32xx_hal_conf.h file after generating code with STM32CubeMX 5.4.0.Is there a way to save the register callback configuration in CubeMX ? Or to prevent CubeMX from overwriting it ?Thanks,Frank
I have followed many of tutorials on the web.I have problems using SPI via DMA and IT. There is no data flow. But it works using polling.In addition to this, UART also is not functional over DMA.My CubeMX version is 5.4.0.I have watched tutorials below:https://www.youtube.com/watch?v=L_sEt8-Mj3w&t=385shttps://www.youtube.com/watch?v=0XMS86bdzEoI did the same but no result, please let me know furher.
Sometimes related pins get automatically mapped in different physical locations on the chip. When possible given alternate pin map choices, I would like related pins near each other for PCB routing purposes. It takes a long time to search all the pins of the chip. Is there a more automatic way to optimize pin placement? If not, would ST consider adding this to CubeMX as a new feature?
Im currently using last verison of CUBEMX , when I creating project keil project file have been generation problem.I re-installed program,Changed path of CUBEMX as C/: as well as shorth pathway with english characters.Thanks A lot
1. Some background---------------------------------I'm working in a startup designing a new free IDE named Embeetle (https://test.embeetle.com). We support many ST-microcontrollers and even built an importer for CubeMX projects. Besides this importer, we also maintain a few "standard blink-LED" projects for some Nucleo-boards.To maintain these "standard blink-LED" projects, I wrote a script for each Nucleo board to generate the corresponding CubeMX project automatically. Whenever there's an update in CubeMX, I simply run these scripts to get new fresh projects. This saves me a lot of time.2. The CubeMX CLI-----------------------------The scripts consist of commands for the CubeMX CLI (Command-line interface). I found some documentation in the CubeMX user manual (UM1718). However, this documentation is largely insufficient. Take for example the set mode command:set mode <Periph> <Mode Name>I know how this command works, but usually I don't know what to put in the placeholder
Hello,I have the Nucleo-H743zi board and I am trying to use lwip+rtos to create a socket client, but I can't get IP. I added FreeRTOS, but there are no specifications on the parameters used in order to get IP address. I tried to use the parameters that I consider important to het IP, but I still can't. I use the default function, the MX_LWIP_init(). Also I couldn't find any examples that show how to get IP with Stm32cubeIDE. The examples, that I found don't have any specifications on the parameters by stm32cubeMX or have the ioc file. Do you know weather there are any other examples specified for stm32cubeIDE?Thanks in advance,Angelos
Hello,i have problem for using STM32H743VI. start from the basic problem, that is transmit UART standard. i use latest firmware of STM32H7 version 1.5.0, latest update STM32CUBEIDE 1.1.0 and latest update STM32CUBEMX 5.3.here the code:int main(void){ /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_UART8_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ HAL_UART_Transmit( &huar
The generated code for MX_ETH_Init() has changed. Previous generated code: uint8_t MACAddr[6] ; heth.Instance = ETH; MACAddr[0] = 0x00; MACAddr[1] = 0x80; MACAddr[2] = 0xE1; MACAddr[3] = 0x00; MACAddr[4] = 0x00; MACAddr[5] = 0x00; heth.Init.MACAddr = &MACAddr[0];New code generated by CubeMX 5.4.0: heth.Instance = ETH; heth.Init.MACAddr[0] = 0x00; heth.Init.MACAddr[1] = 0x80; heth.Init.MACAddr[2] = 0xE1; heth.Init.MACAddr[3] = 0x00; heth.Init.MACAddr[4] = 0x00; heth.Init.MACAddr[5] = 0x00;But as far as I can see, MACADDR is still declared as a a uint8_t pointer (see stm32h7xx_hal_eth.c) and this pointer is never initialized.So how can this work correctly?Best regards,Harrold
I am following the instructions in the 'UM1718 User manual", section 10.9, "Switching to another MCU".In STM32CubeMX I opened a new project and chose the F303RETx MCU option. Then I imported a working .ioc file into STM32CubeMX that was originally set for the F303RCTx, then, as described in the instructions, did Try Import, which worked, then named the project, and clicked Generate Code, for the STM32CubeIDE, which worked, no errors reported.But, when I open the project in STM32CubeIDE, and try to compile, I get the error about missing files as follows:compilation terminated.make: *** [Drivers/STM32F3xx_HAL_Driver/Src/subdir.mk:81: Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal.o] Error 1In file included from ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h:46:0, from ../Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_adc_ex.c:55:../Inc/stm32f3xx_hal_conf.h:206:12: fatal error: stm32f3xx_hal_exti.h: No such file or directory &
after generating the code with cubeMX in order to have 490Hz output PWM for all TIM3 4 channels inside the main if I call (using HAL)Hal_Tim_Base_Start(&htim3);Hal_Tim_Pwm_start(&htim3, TIM_CHANNEL_1);Hal_Tim_Pwm_start(&htim3, TIM_CHANNEL_2);Hal_Tim_Pwm_start(&htim3, TIM_CHANNEL_3);Hal_Tim_Pwm_start(&htim3, TIM_CHANNEL_4);i2c not works correctly and I cannot read the mpu6050.I2C is configured in fastMode (400KHz).If I comment the 4 pwm_start line above I can read correctly the sensor when TIM3 is active and PWM is not enabled.if I change TIM3 with TIM1 I can read correctly the mpu6050 and I can generate the PWM.So the question is: why i2c not work when I use TIM3 and works correct when I use TIM1 ?thanks
On my i7-4Core Notebook with SSDs and 32GByte RAM,newest Java Version:Starting Program: 5-7 MinutesOpen existing Project (F767zit, All 144 Pins used): 10 MinutesDeactivating TIM7: 1-2 MinuteChanging Pin Function: 1-2 MinuteGenerating Code is normal in timing.Is there any Solution to this. CubeMx 5.3.0 was perfect in time behavior.regards Knut
I'm using STM32CubeMX 5.4.0. When I enable LTDC and DMA2 interrupts (for example) in the NVIC tab in NVIC Mode and Configuration, when I switch to the Code Generation tab there are no entries for either LTDc or DMA2D. See attached screenshots. What is preventing Code Generation ?
I am using CubeMX Version 5.4.0.I tried MMC 4bit and SD 4bit for SDIO configuration but both did not enable SD card mode for FATFS. What are the exact conditions that need to be fulfilled to allow FATFS using SD card mode?
HiI am trying to correctly include the CMSIS DSP Library into Cubemx project. I went threw the forums and look at what ever documentation I could find.IDE used STCUBEIDE.I have noticed that the F4 and F7 that has DFSDM support allow enables the CMSIS DSP lib with example, however that is not the case with smaller F4 and the H7 uC. I have done it on the F401RE/H743ZI(Nucleo) and M4/M7 discovery kit.Is there a Document on how include to correctly the CMSIS DSP LIB?The FPU must be enabled(This is automatically enabled with the CUBEMX) and ARM_MATH but other details are vague.Anyone who can show me how to correctly install this lib it would be appreciated.Kind Regards
Hi,My board is STM32F411RE Nucleo.Currently, I'm using a timer (timer 2, channel 3 to be exact) in output compare (no output), using TIM_OCMODE_TIMING mode, interrupt enable. My understanding is the timer will tick until it is overflowed (in this case, the overflow value is 2^32-1, as TIM2 is 32 bit) , and an event will trigger when the timer tick pass the period value. And since this period is a set value, the event will only trigger once.So if my understanding is correct, in order to achieve what I want, I should also increment the Period to a new (that is multiple of the original value) every time an event is triggered.Is this logic correct, and is there a better way to do this?
Can someone explain to me how I can do to be able to view all the settings? The cursor is on the edge and there are still too many settings to list that I can't see.Since they released version 5, CubeMX has become increasingly confusing and difficult to use ...
While you are at the CubeMX improvements...Please preserve the user label, when the pin mode changes.Often times I need to fix wrongly assigned mode - analog to input or output or EXTI and so on.The Cube resets the user label when the mode changes. I'd like to keep it.Thanks, -- pa
Hi !I'm working on a project using STM32CubeMx and FreeRTOS (version 9.0.0, MEMORY_ALLOCATION = STATIC) and running into trouble as soon as the new operator is used (in my case implicitly be the library function gmtime()).The problem seems to be the function _sbrk() in the generated file syscalls.c:The check in line 15 fails if using FreeRTOS due to each FreeRTOS task is using its own different stack pointer.register char * stack_ptr asm("sp"); ... caddr_t _sbrk(int incr) { extern char end asm("end"); static char *heap_end; char *prev_heap_end; if (heap_end == 0) heap_end = &end; prev_heap_end = heap_end; if (heap_end + incr > stack_ptr) { // write(1, "Heap and stack collision\n", 25); // abort(); errno = ENOMEM; return (caddr_t) -1; } heap_end += incr; return (caddr_t) prev_heap_end; }How can this be fixed ???is there a "special" version of _sbrk() available which can handle a non-continuous stack pointer memory s
I'm just getting started with doing RTOS programming but I can't see this being anything but a CubeMX bug. My target MCU is an STM32H750 running at 400MHz. I wanted the FreeRTOS tick to be 100Hz. I set that parameter in CubeMX, but noticed that all my osDelay functions were about 1/10th of what they should be. If I set the RTOS tick to 1000Hz, all is good, but for a 100Hz period the Systick period is still programmed to 399,999. So, looks like the RTOS code is being correctly set to assume a 100Hz tick, but the actual SysTick is hard coded to 1KHz? I've poked around a bit and don't see the SysTick programming, (I used the debugger to look at the SysTick period register).It is easy to override and need to do it in user code anyway. Is the best place in between HAL_Init() and osKernelStart()?will
Hallo ,I am trying to debug an imported project from CubeMx, which is just the configuration of the STM32MP!57C-DK2 board, I built the solution in the system workbench and then connected to the board. on the Console I cannot see any IP Address for the board, so i used ifconfig, and i entered the eth0 ip address in the debug configuration, when i debug the solution, i end up with this error message(attached).I attached my debug configuration as well. I also tried port 3333 which got the same problemI tried to debug just the OPENAMP_TTY example, it cannot be compiled (Photo- OpenAMP)I wonder what is wrong?. Your help is very much appreciatedNote; Regarding the OpenAMP problem, I saw the answered question, i followed the answer but the problem still exists. Maybe there should be some sort of special ocd or gdb config?. I am not sure as am totally new to that boardThanks in Advance
Hi,After generating code using STM32CubeMX 5.4.0, the resources excluded from build (stored in .cproject file) are re-included. e.g.:<entry excluding="excluded/path" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Application"/>becomes<entry excluding="" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Application" />in the .cproject file after generating code with STM32CubeMX 5.4.0.Is there a way to save those filters in CubeMX ? Or to prevent CubeMX from overwriting the .cproject ?Thanks,Frank
In the latest version of Cube it is possible to set a custom (fixed) firmware location, but it is not saved. Also when setting the path as absolute it is ignored and when setting it relative (This worked fine in 4.26) I get an exception:2018-10-04 12:59:23,784 [INFO] UtilMem:74 - End LoadConfig() Used Memory: 651409680 Bytes (1526202368) java.lang.NullPointerException at com.st.microxplorer.plugins.projectmanager.model.ProjectSettings.isAvailablleCustomerFW(ProjectSettings.java:1824) at com.st.microxplorer.plugins.projectmanager.model.ProjectSettings.load(ProjectSettings.java:343) at com.st.microxplorer.plugins.projectmanager.engine.MainProjectManager.loadConfig(MainProjectManager.java:335) at com.st.microxplorer.plugins.projectmanager.ProjectManagerView.loadConfig(ProjectManagerView.java:128) at com.st.microxplorer.plugins.filemanager.engine.OpenFileManager.LoadConfig(OpenFileManager.java:265) at com.st.microxplorer.plugins.filemanager.engine.OpenFileManager.loadConfigurationFil
Note: This is still broken in RubeMX 5.4.0Note: I am using the CubeMX plug-in within the STM32CubeIDE, not the stand-alone CubeMX.RubeMX shows only 5 of 7 possible timer channel modes. It fails to show PWM modes. Attached IOC shows problem (try to set PWM mode for timer 1 or timer 3).STM32CubeIDE Version: 1.1.0Build: 4551_20191014-1140 (UTC)OS: Windows 10, v.10.0, x86_64 / win32Java version: 1.8.0_202Please confirm you have reproduced this and filed a ticket...Thanks, Best Regards, Dave
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.