Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello.It's not possible to find a controller with a specific number of CAN buses using MCUFinder. MCUFinder counts each CAN bus twice: If it physically has 3 CAN buses, MCUFinder adds: 3 CAN buses + the same 3 CAN2.0 buses = 6 CAN buses. This is great if it allows the controller's peripherals to be doubled so easily. Excellent. But it is very misleading because it raises false hope and displays completely unsuitable controllers.However, the program is useless when I'm searching for controllers with 4 or more CAN buses and I get a huge list of 70 possible controllers, all of which have at least 6 CAN buses, but none of them possess these qualities. Can this bug be fixed?
Hi there! Thank you for reading this.Where has the support for exporting footprints/symbols to Altium Designer from STM32CubeMX gone?In the promotional video from https://www.st.com/en/development-tools/stm32cubemx.html it appears there is an option for doing this, but when I try it on a recent version of STM32CubeMX no option is available.What am I missing here? Check following screenshot of promotional video vs. STM32CubeMX side by side.STM32CubeMX version: 6.16.0
After upgrade from 6.15 to 6.16 on linux ubuntu 24.04 I got this blocking error if I load project file (created with cubemx 6.15):cannot invoke com.st.microxploer.mcu.IP.getInstanceName() because mpu is nullI tried both "migrate" and "continue" options but I got the same error. Attached the project file
MCU: STM32H563VITx Stm32CubeMX version: 6.14.0 HAL Driver version: 1.5.0 When I enable EDATA option bytes in CubeMX, it generates the following code: 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 */ if (HAL_FLASH_Unlock() != HAL_OK) { Error_Handler(); } /* Option Bytes settings */ if (HAL_FLASH_OB_Unlock() != HAL_OK) { Error_Handler(); } pOBInit.OptionType = OPTIONBYTE_EDATA; pOBInit.Banks = FLASH_BANK_2; pOBInit.EDATASize = 2; if (HAL_FLASHEx_OBProgram(&pOBInit) != HAL_OK) { Error_Handler(); } if (HAL_FLASH_OB_Lock() != HAL_OK) { Error_Handler(); } if (HAL_FLASH_Lock() != HAL_OK) { Error_Handler(); } /* Launch Option Bytes Loading */ /*HAL_FLASH_OB_Launch(); */ /* USER CODE BEGIN FLASH_Init 2 */ /* USER CODE END FLASH_Init 2 */ } The function does not launch
The CubeMX 6.16.0 is able to generate a CMake-project for an STM32H7 - great. A small conflict currently exists in the following two generated files [for a "basic" STM32H7 project]:- CM7/CMakeLists.txt:69# Add linked libraries target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE # Add user defined libraries )- CM7/mx-generated.cmake:81# Add libraries to the project target_link_libraries(${CMAKE_PROJECT_NAME} ${MX_LINK_LIBS}) The first specifies PRIVATEwhile the second does not - which is incompatible as per CMake. Can someone confirm this observation? Can this be made consistent in the future? If so, I would prefer the one with the scope keyword - but could also live without it here.
When enabling 2 ADCs , ADC1 and ADC2 of STM32U5A5 ,both in Independent mode . The RCC enabling in MspInit called only for ADC1 and not for ADC2. What causes , that If one decide disable generataion of call to MX_ADC1_Init() in CubeMx , in order to call it somwhere else , but still enable generation to call to MX_ADC2_Init() in CubeMx , ADC2 won't work untill MX_ADC1_Init() is called.
Hi,I'm searching for a MCU with one or two advanced motor control timers to control 1 or 2 bldc motors.For this purpose I use the MCU selection tool from here: STM32 family of 32-bit microcontrollers (MCUs) - STMicroelectronicsWhen I use the filter for one or two advanced motor control timers the MCUs from the STM32G series are never displayed and I don't understand why? How should I search for all MCUs with motor control functionalities?Thanks for every hint!Best regards,Roger
Hi,I have three small suggestions to improve the CMake build system generated by STM32CubeMX to be used by VS Code to fix some annoyances. 1.In cmake/stm32cubemx/CMakeLists.txt, useset(TOOLCHAIN_LINK_LIBRARIES "-lm")instead ofset(TOOLCHAIN_LINK_LIBRARIES "m")This way CMake knows that the "m" library is an external one. When the user setsset(CMAKE_LINK_LIBRARIES_ONLY_TARGETS ON)in the "CMakeLists.txt" in order to help finding issues in complex project setups, the old behaviour causes a CMake error as there is no explicit "m" target, but with "-lm" CMake is happy. Being able to use "CMAKE_LINK_LIBRARIES_ONLY_TARGETS" is desirable as it helps finding typos easily when many targets/components are defined across many individual CMake files.2.In cmake/stm32cubemx/CMakeLists.txt, usetarget_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ${MX_LINK_LIBS})instead oftarget_link_libraries(${CMAKE_PROJECT_NAME} ${MX_LINK_LIBS})i.e. use the explicit syntax. When the user wants to refer to addition
Hi, I am using 2 FDCAN ports on my custom board with STM32G0B1x MCU. As per application note AN5348, I can set message RAM offset for second port. But I don't see this setting in STM32Cube MX. As per reference manual, I got following details: But I am not sure where to set start and end addresses. Please help. Thanks, Pradeep
Hello Community,I have been working on a BLE project with one service and three characteristics, two of which have server notification properties, and I have noticed the following issue in CubeMX 6.15 (server side, custom template).The function Custom_<CHAR_NAME>_Send_Notification() is no longer auto-generated in custom_app.c if the length is greater that the limit supported by aci_gatt_update_char_value(), which is (BLE_CMD_MAX_PARAM_LEN - 6).In past CubeMX versions, any char with length greater that such limit genered of a function that internally called aci_gatt_update_char_value_ext(), which indeed supports chars up to 512:void Custom_CHAR_Send_Notification(void) /* Property Notification */ { uint8_t updateflag = 0; /* USER CODE BEGIN Data_NS_1*/ updateflag = Custom_App_Context.Data_Notification_Status; /* USER CODE END Data_NS_1*/ if (updateflag != 0) { Custom_STM_App_Update_Char_Ext(Connection_Handle, CUSTOM_STM_CHAR, (uint8_t *)NotifyCharData); }
Hi, When I create a new project on STM32CubeMX, it either freezes when I try to set up some peripherals, or I just get a blank screen when I try to reopen the porject after generating the code. I have tried rolling back to an older version, completely reinstalling, tried it on an ubuntu VM, switched devices, but nothing worked. kind regards, Sam
Hy,I try to configure MCO2 as adjustable clock out. For evaluation I use STM32N6 DK and STM32CubeMX 6.16.0 and STMCubeIDE 2.0.0I use all different settings and it works fine, but IC20 div setting has no effect. When I compare generated code, I see no difference, no matter what setting I put in IC20 div, neither changes the clock output frequency. RegardsHarald
Hi,Recently, updated to 6.16.1 on Linux.On a fresh project i get the "misconfiguration warning" when i hit "GENERATE CODE" (I use CMake Toolchain). See Screenshot: There you will see simple config for RCC. Got a "green check" symbol but i always get that Warning.On the second Screenshot, I have changed OCTOSPI settings, and it will add itself to the Warning list. I can extend the warning list by just changing any settings. Maybe I really misconfigured something, but I don't see it.I guess it is a bug - I can generate the code, but this Warning might mask real configuration issues in the future.Thx
English belowPlusieurs problèmes avec X-CUBE-FREERTOS.1.2.0 , 1.3.1 , 1.4.0 et suivant (MDK-ARM) :1) Si je ne met pas TOTAL_HEAP_SIZE à au moins le double que nécessaire, les dernières taches déclarées dans CubeMx ne sont pas exécutée . Aucune alerte n'est générée.2) En changeant de version de FreeRTOS, je perd toute mes Taches, Mutex, Queues, ... mises dans CubeMX3) X-CUBE-FREERTOS.1.4.0 me créer les Queue comme cela :QueueTestHandle = osMessageQueueNew (20, sMessage, &QueueTest_attributes);Au lieu de :QueueTestHandle = osMessageQueueNew (20, sizeof(sMessage), &QueueTest_attributes);Avec uint16_t, tout est Ok.---------------------------------------------------------------------------------------------------Several issues with X-CUBE-FREERTOS.1.2.0, 1.3.1, 1.4.0 and later (MDK-ARM):1) If I don't set TOTAL_HEAP_SIZE to at least double what is needed, the last tasks declared in CubeMx are not executed. No alert is generated.2) Changing the version of FreeRTOS causes me to lo
Attempting to download the new STM32CubeMX 2.0 (required since not included in STM32CubeIDE anymore) does not work from your site.https://www.st.com/content/st_com/en/stm32cubemx.html# has links all over the page to "Download STM32CubeMX"...Unfortunately all these links have the same problem: a License Agreement comes up, but when I click Accept nothing happens.There's not an obvious way to download in any other way.
Hello,I got a problem with HAL library 10.4 for STM32L152RE in UART DMA transmission, the data is transmited only one time using the function HAL_UART_Transmit_DMA(&huart3,t_Buffer ,11) using uart3, after that the UART3 structure keep the "flag" huart3.gState to HAL_UART_STATE_BUSY and all the other transmissions failedit never come back to the HAL_UART_STATE_READY so it is impossible to make another transmission. I solve the problem by changing this flag state back to "ready" when transmission is done using indirectly the (callback) transmission interrupt provided in DMA1_Channel2_IRQHandler but it is not really a solution !! it should be OK once the data has been transmitted properly by HAL_UART_Transmit_DMA. is it a bug in 10.4 HAL STM32L1 release ( maybe previous ones too ) or this behavior is normal and I need to use that "manual solution" ? thanks Thierry
Following the article Security:How to start with STM32CubeMX Secure Manager on STM32H57 - stm32mcu I'm stuck in the step 3.2 Boot Path Configuration. At this point, STM32CubeMX had grayed out the button "Select" in Boot Path Selection. It is released only when I configure Secure Mode in Project Manager. When clicking it and trying do configure a Boot Path, I can't get the final configuration ST_iROT_UROT_SECURE_MANAGER. Am I doing something wrong?I'm trying to use STM32CubeMX to generate a project with TrustZone activated. How could I include in a project the Middlewares MbedTLS and MCUBoot? Normally it should be in the "Middleware and Software Packs" list of packs installed but I have to copy them manually. When generating code sometimes I have to copy again because they are deleted.Thank you in advance.
We are pleased to announce that the minor version 6.16.1 of STM32CubeMX is available. What is new in 6.16.1: This release addresses and resolves the issues outlined below: Users of STM32CubeMX version 6.13.0 and later may encounter a HardFault exception on STM32C0 products (STM32C011x, STM32C031x, STM32C051x, STM32C071x, STM32C091x, and STM32C092x) when using the internal HSI clock with HSI_SYS_DIV set to 1: When a user configures the system clock frequency (SYSCLK) at 24MHz value or greater, changes the HSI_SYS_DIV from its default value from 4 to 1, and increases the RCC SYSCLK Prescaler value (HSI_SYS_DIV1 > 1), STM32CubeMX generates code that temporarily configures SYSCLK with RCC_SYSCLK_DIV equal to 1. This causes the SYSCLK to be set at 48 MHz and the Flash wait state to be set at 0, which is outside of the allowed range. After migrating to STM32CubeMX 6.16.0, the ADC injected channels stopped working correctly for the STM32F3 products: The value for the Queue Inje
The Infineon AIROC-Wi-Fi-Bluetooth-STM32 Expansion Pack is an extension of the CMSIS-Pack standard established by Arm.The pack is compliant with the full CMSIS-Pack standard, with additional requirements/restrictionson the final pack to meet the STM standard. GitHub space: https://github.com/Infineon/AIROC-Wi-Fi-Bluetooth-STM32/releases/tag/release-v1.8.0What Changed?v1.8.0Support the STM32N6570-DKUpdate the H1combo clm to v3Update the btstack-integration to v.6.2.0Update the btstack to 4.1.4v1.7.1Update Wifi firmware 4373/4373E TO 13.10.246.356Update the wcm application to version 3.6Supported STM32 Boards and MCUSTM32N6570-DKSTM32L562E-DK kit and STM32L5xxSTM32H747I-DISCO Discovery kit and STM32H7xxSTM32U575I-EV Evaluation board and STM32U5xxNUCLEO-H563ZI board and STM32H5xxNUCLEO-H745ZI-I boardNUCLEO-U575ZI-Q boardSupported Connectivity ModulesInfineon's CYW43xxx Wi-Fi-BT combo chip family:CYW43012CYW43439 / CYW43438 / CYW4343WCYW4373 / CYW4373/ECYW43022CYW5551XCYW55572Com
Follow-on from CubeMX code generation from command line.I am posting again in hopes of getting meaningful answer.I tried creating a simple script text file to automate code generation for my project. The script file has all of three lines:config load DCC_tester.iocgenerate code .exitThe feedback I got on why it did not work was my .ico file was corrupted. To prove this was not the case I used a very simple project file using one of your example projects from one of your released STM32H5 bundles.The only modification I made was changing the name and making it a cmake project.I am running on Windows 11 with CubeMX installed using all defaults.I can click on the .ioc file from Windows Explorer and the MX IDE opens just fine. I can click the "GENERATE CODE" button and that also works just fine. All the files are generated as expected.I try launching using the -q using ether a PowerShell script or a command line batch file and neither completes although it looks like its trying.
A new question moved from this thread. Thank you a lot! But still I have many questions regarding this. Like this one: I have configured the ADC with the Temperature Channel and Vref int channel to be used with DMA. However in many examples they show how to configure the rank for the DMA but the rank option is missing within my CubeMX: Is this a bug or I'm missing something?
In the STM32CubeMX configuration interface, there are two identical options here.They can be configured into different options.After generating the code, it will be based on the configuration of the second option.
I would like to automate code generation of my .ioc file using CubeMX from command line or PowerShell.AI says its possible with the -q (quiet mode) option but it does not seem to work.
as the image, after code generate in MX, instances chooser UI's graphic resolution is broken. I cannot choose any botton and projects. please solve it.
Hello everyone, I'm creating a TIM3-based project using CubeMX. I'm using the Nucleo-H755ZI development board, which features the STM32H755ZITx dual-core MCU.I've completed all the necessary configurations—GPIO settings, TIM settings, SYS, and PROJECT settings. However, when I click "Generate Code," it creates the main.c file but does not generate the xxx_FLASH.ld linker script file. My selected Toolchain is STM32CubeIDE. I'm using CubeMX version 6.15 and CubeIDE version 1.19.Does anyone have any idea what might be causing this issue?
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.