Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello, I get the same error recently on 1.19.0 for my STM32U385RGTxQ. The only option available in Power Supply source is PWR_LDO_SUPPLY
From Cube 1.19.0, i keep getting the "For the best power consumption figure, enable SMPS" and although the Nucleo-U385RG-Q board uses a Q variant, I'm not able to switch to SMPS from CubeMX.
Hello,I am trying to understand the memory allocation for the FDCAN, I am using a nucleo H723ZG.With the latest CubeIDE 1.18.1 I seem to be able to configure 32 TX Buffers and 32 TX FIFOs:However the message RAM mapping in AN5348 - Rev 5 shows that there are only a maximum on 32 for both Buffers and FIFOs:Is there a mistake in the MX interface that should not allow more that 32 of Buffers + FIFOs combined, or the memory mapping has 2 sections of up to 32 elements for both buffers and FIFOs? Thanks,Marco
As alread reported a while ago, strange things happen when entering an expression in CubeMX for Prescaler and/or Autoreload. If, for example, 72-1 is entered for Prescaler and 6667-1 for Autoreload, the following code will be generated:STM32CubeMX: TIM Prescaler, Period bug TIM_InitStruct.Prescaler = 72-LL_TIM_IC_FILTER_FDIV1_N2; ... TIM_InitStruct.Autoreload = 6667-LL_TIM_IC_FILTER_FDIV1_N2; LL_TIM_IC_FILTER_FDIV1_N2 does not make any sense here.Depending on the exact values, the Timer will be initialized with some different settings than desired.With simple constants (without calculations) the generated code will be correct.In contrast to the previous post, in my case the MCU was a STM32F303.CubeMX is Version: 6.15.0-RC7, Build: 20250701-1659 (UTC)
I created default project with FreeRTOS in STM32CubeMx for the board Nucleo-H563ZI. Nothing more added.Hard Fault is invoked at vRestoreContexOfFirstTask.I was looking for the solution in Copilot and Perplexity but without success. Only I can say it's probably no problem with stack overflow.Jan
Hi! I have a problem. I faced with a problem of USB middleware initialization as a virtual port in CubeMX. After code generation USB init initializes in main.c within of one of task FREERTOS. If I initialize USB only as connectivity USB init replaces right. How to resolve it? Here details is: /* USER CODE END Header_start_task_can_handler */ void start_task_can_handler(void *argument) { /* init code for USB_DEVICE */ MX_USB_DEVICE_Init(); /* USER CODE BEGIN 5 */ app_start_task_can_handler(argument); /* Infinite loop */ for(;;) { osDelay(1); } /* USER CODE END 5 */ }
I would like to use USBX to make a CDC ECM USB device, but in STM32CubeMX, there is no option for CDC ECM or RNDIS in the USBX device class menu: The STM32U545RE on the other hand has options for CDC ECM and RNDIS: Does STM32U385 support CDC ECM and RNDIS with USBX? If yes, is there something I need to do in order to show CDC ECM as an option in STM32CubeMX? Thanks!
When "Activating clock source" is ticked in RTC module, my MCU doesn't start up if I reset it from RST button. But as soon as I switch the RCC clock source to LSE external 32.768khz crystal and change RTC Clock Mux to LSE, it works without a hitch. Is this by design or there may be a bug?
As mentioned, in order to rule out the interference from the existing project, I created a new blank project. However, it still didn't work. This issue was not present in the previous version 6.13.As shown in the above picture, I have disabled spi1 but still cannot enable the quad spi mode of spi2. Please provide a solution as soon as possible, or please inform me how to roll back my project version to 6.14 or earlier. The project is urgent. Thank you.@
Hello everybody,Problem: I start a new project from scratch in CubeMX version 6.15.0 with STM32H7A3VG. First thing I do is to try to chose OCTOSPI1, Mode Quad-SPI. But it does not work. It's greyed out and I get the message:"Quad SPI disabled: Quad-SPI Mode is already activated".Same thing if I try to chose OCTOSPI2, Mode Quad-SPI.Same thing in STMCubeIDE 1.19.CubeMX version 6.14 allowed me to chose Quad-SPI.Do I miss something ? Is it a bug ?RegardsVmanne
How to start with FileX using CubeMX?In CubeMX I enabled ThreadX and FileX with the default configuration, increased ThreadX "memory pool size" to 2k and enabled "Generate Init Code" for both.In app_azure_rtos.c, tx_application_define() function MX_FileX_Init() fails - tx_byte_allocate() returns error code 16. According to docs that means TX_NO_MEMORY "Service was unable to allocate a block of memory within the specified time to wait.".I get this error even when I substantially increase ThreadX "memory pool size" to 64k.Without FileX enabled ThreadX works - I created a timer which nicely blinks the onboard LED.I know FileX does not really require ThreadX, but I need it for other purposes.This is probably something simple, but I admit I am new to ThreadX.Tested with the latest CubeMX, STM32U5A9 MCU as well as NUCLEO-U575ZI-Q boards.Please advise.
When trying to setup MBedTLS through CubeMX for the NUCLEO-H755ZI-Q, CubeMX does not give the option to select LWIP as the TCP/IP stack in the MBEDTLS "Version and modes" configuration tab. The only options given are "None" and "User defined". Additionally, for the "RNG dependency", the only options are "SW RNG(no entropy)" and "Custom RNG(Custom entropy)". It does not detect that I have enabled hardware level RNG. If I try setting up a project for NUCLEO-H745ZI-Q, I have the same issue. I tried setting up the project so the Ethernet stack was on the M7 only, the M4 only, and both the M7 and M4 and none of these variations made a difference.However, if I try setting up a project for any single core F4 or H7 variant, like the NUCLEO-H753ZI, I am able to select LWIP and HW RNG(ST entropy). In fact, when I enable MbedTLS, they are auto selected. Please see the attached screenshots. This is the order always followed: Enable Ethernet RMII Enable RNG Enable FreeRTOS Enable LWIP Enabl
If I enable USB host and TouchGFX without OS I get the following generated code: /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ MX_USB_HOST_Process(); MX_TouchGFX_Process(); /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */As you can see MX_TouchGFX_Process() isn't indented properly.I want this: /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ MX_USB_HOST_Process(); MX_TouchGFX_Process(); /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */
I have just purchased the STM32N6570-DK kit and have been able to successfully load and run the demo binaries. However when I have tried to generate a simple application like the LED Blink project I have been able to successfully get it running in the Cube IDE debug mode but once I load the .bin file into the external flash it will not run.I have followed the online tutorials by B.Montanari as well as read all the available documentation but nothing seems to be working.I have signed the fsbl.bin file to create a fsbl-trusted.bin file and programmed the external flash at 0x7000 0000 exactly as outlined in the tutorials but no luck. The code definitely runs on the kit in the Cube IDE debug mode so I am obviously missing some vital key setup when it comes to loading it from flash but I am unable to figure out what it is.I understand how the BOOT process works but trying to implement the process is a different matter.This is a basic operating requirement for using the STM32N6 so why
Dear community,we're using a Makefile Project with STM32H5xx and NetX Duo using the LAN8742When the code is generated, CubeMX is adding the line:.../STM32Cube/Repository/STM32Cube_FW_H5_V1.1.1/Drivers/BSP/Components/lan8742/lan8742.c \twice to the Makefile which leads to multiple definition errors in Compile. The line has to be removed by Hand afterwards. I think this is malicous behaviour here.Best RegardsPascal
When I create a new GPIO port configured as OUTPUT in STM32CubeMX, the pin definitely exists on my board. However, after I click Generate Code, the new pin configuration does not appear in main.c (for example, I don’t see the initialization code for that pin in MX_GPIO_Init()).Why does this happen? I tried to investigate but couldn't find the reason.My STM32CubeIDE version is 1.19.0.The MCU I am using is STM32G071RBT3, and the specific pin I am trying to add is GPIOD pin 3 — but I also don’t see any other newly added pins in the generated code. None of the new GPIO ports appear after code generation. THANKS
Version: STM32CubeMX 6.16.0MCU: STM32WB15CCU6Untilities Sequencer can not enabled, which says connectivity WM's not enabled.But no "WM's" in connectivity page.How to enable sequencer?
Hello ST Community,STM32CubeMX 6.16.0 release summary:– Migrated to SamacSys as a new CAD provider for STM32CubeMXWith the new version of the stm32cubemx, the CAD tab in tools (see screenshot) is missing the previously available KiCAD and other options.Available options are: (Open Standard, ACIS, Khronos, AutoDesk, Open CASCADE, Siemens, Rhino, STL, Pixar, RS, Mentor).Export to KiCAD used to be available, even the featured video"A quick STM32CubeMX overview, From Ultra librarian" on the STM32CubeMx Product Overview features Altium, KiCAD and Cadence,... as export options in the dropdown menu.Componentsearchengine.com supports KiCAD, Altium, ... therefor I am confused why it is not supported in the STM32CubeMX.Is that intended? Do we have to use an older STM32CubeMX Version if we want the export to KiCAD option?Bug1: Selecting STL and pressing the download button crashes STM32CubeMX after choosing a file location(see screenshot 2)Bug2: Selecting STL and another File Format and
The correct declaration should be:void initialise_monitor_handles( void )This is not very important... but it generates warnings
Hi,I have configured WB55 project in CubeMX but each time I reopen it, clock config isuue is displayed. When I change SMPS clock source to HSE error dissapears and I can generate project. But onviously it is not saved since next time I open it, error is back and cloc source set again to HSI. Is there way how to fix it or is it just bug in CubeMX? Thanks.David H.
I've burned a significant amount of time tracking down an issue, so I thought I would share in the hope of helping others and maybe improving ST's provided newlib locks.(This is probably in the wrong place, please move it as required.)I'm using the ThreadSafe files (stm32_lock.h & newlib_lock_glue.c) generated by CubeMX 6.6.1 to make newlib thread safe.I'm utilising Strategy 4: "Allow lock usage from interrupts. Implemented using FreeRTOS locks." (because I'm using FreeRTOS but also the ST USB device library which by default calls malloc from an ISR).Strategy 4 implements newlib's __retarget_lock_etc suite of hooks to lock critical sections inside newlib.To test how robust this solution is I created 3 (exact number not critical, but I had 3 LEDs for debugging...) threads which all repeatedly malloc() and free() in infinite loops.To my dismay it would not be long before a crash/instability occurred.Often the particular "canary" to be killed would be STM32_LOCK_ASSERT_VALID_NESTING_L
Hi all,I am using a nucleo board F412ZG with the Middelware FreeRTOS. I use only one task for now, but I will use others in future.By the way, I set TIM2 as the timer system for FreeTOS:Now I am trying to enable pin PC8 as an external interrupt in order to detect a falling edge: When I generate the code I notice that the TIM2 interrupts is deleted, but I do not understand why. Anyone can help me?Below I leave the screens of the generated code modifies from git:
Generate code from attached .iocBuild with cmake:cmake --preset Debug && cmake --build --preset DebugInspect NonSecure/build/build.ninja and we find build CMakeFiles/myproject_NS.dir/AZURE_RTOS/App/app_azure_rtos.c.obj: C_COMPILE R__myproject_NS_Debug ... || c make_object_order_depends_target_myproject_NS ... FLAGS = -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -Wall -fdata-sect ions -ffunction-sections -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -Wall -fdata-sections -ffunction-sections -O0 -g3 -std=gnu11 Note that the flags set in gcc-arm-none-eabi.cmake # MCU specific flags set(TARGET_FLAGS "${STM32_MCU_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fdata-sections -ffunction-sections") occurs twice!The reason for this is that the toolchain file gcc-arm-none-eabi.cmake is evaluated multiple times. It is exactly the problem described at [3.31.6] Toolchain file ge
Please consider adding 5V tolerant pin mark to STM32CubeMX pin configurator.This would be very usable during pin configuration.
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.