Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi! I have a STM32N6 discovery board and I want to create an application with network support for it. Lets say simple tcp echo server. Ifound that there are no LwIP available for this board in CubeMX. Google suggests using Arure RTOS, but there are no such (X-CUBE-AZRTOS-N6) package. Instead, there are some "THREADX" and "NETXDUO" middlewares in configurator, but there are missing options to select PHY chip that is used on the board. Is it possible to build network application using CubeMX on N6?
I am using an 8 MHz external oscillator and was planning to use a PLL to increase the system frequency. However, when I open the Clock Configuration tab in CubeMX, I don’t see any option for a PLL.I’ve also shared a screenshot of the clock configuration where it’s clear that the PLL option is not available.So my question is: Does the STM32C071CBT6 microcontroller support PLL with an external oscillator?
Hi,I'm using a STM32H523CC to receive 24 bit data frames via SPI. The SPI acts as receiver-only and is configured as follows:Within my application I do not make use of the HAL-functions but have overwritten the SPI2_IRQHandler(). There I continuously read the data from the SPI RXDR register as soon as the SPI_FLAG_RXP is set. When some overflow/error-flags are set, they are cleared:void SPI2_IRQHandler(void) { #ifdef USE_IRQ const uint32_t trigger2=SPI2->SR; if ((trigger2 & (SPI_FLAG_MODF | SPI_FLAG_OVR | SPI_FLAG_FRE | SPI_FLAG_UDR|SPI_FLAG_RXP)) != 0UL) { if ((trigger2 & SPI_FLAG_RXP) != 0UL) handleRxc(); // reads from SPI2->RXDR /* SPI Overrun error interrupt occurred ----------------------------------*/ if ((trigger2 & SPI_FLAG_OVR) != 0UL) { __HAL_SPI_CLEAR_OVRFLAG(&hspi2); } /* SPI Mode Fault error interrupt occurred -------------------------------*/ if ((trigger2 & SPI_FLAG_MODF) != 0UL) { __HAL_SPI_CLEAR_MODFFLAG(&hspi2);
Settings:STM32CubeMX 6.14.1STM32H573VISTM32CubeIDE v1.18.1I am not quite sure, but up to my understanding the Memory Managment Tool has a bug when it comes to the "Access Permissions" settings.When RAM is set-up like this (Access Permission set to "RW by priviledged code only"):It creates an initialization code for the GTZC1 that disables priviledge checking for the SRAM:/** * @brief GTZC Initialization Function * @PAram None * @retval None */ static void MX_GTZC_Init(void) { /* USER CODE BEGIN GTZC_Init 0 */ /* USER CODE END GTZC_Init 0 */ MPCBB_ConfigTypeDef MPCBB_Area_Desc = {0}; /* USER CODE BEGIN GTZC_Init 1 */ /* USER CODE END GTZC_Init 1 */ MPCBB_Area_Desc.AttributeConfig.MPCBB_PrivConfig_array[0] = 0x00000000; MPCBB_Area_Desc.AttributeConfig.MPCBB_PrivConfig_array[1] = 0x00000000; MPCBB_Area_Desc.AttributeConfig.MPCBB_PrivConfig_array[2] = 0x00000000; MPCBB_Area_Desc.AttributeConfig.MPCBB_PrivConfig_array[3] = 0x00000000; MPCBB_Area_Desc.AttributeConfig.
I am setting up a project using CubeMX to evaluate the 67W61M1 device, using a Nucleo-F411RE. As far as I can tell the X-NUCLEO-67W61M1 needs SPI1 of the Nucleo for communication. Unfortunately, the Nucleo has SWO (PB3) where SPI1_SCK and while I see a solder bridge that can remove SWO from the STLink-OB, I do not see a way of disabling the SWO connection to PB3.I tried resetting the state of PB3 in Cube MX and then I can enable SPI, however the "SYS" module then issues a warning about a conflict with SPI1 full duplex master.Is this the correct way to configure SPI1 and Serial Debug?Sid
I would like to report a bug, I post it here as so anybody can read it.The bug concerns the GPDMA on STM32H563, but maybe it could happen on others MCUs. I wanted to use a GPDMA1 Channel from a ADC2 request, my Channel was correctly initialized, but the transfer between the ADC->DR and my buffer wasn't realized. I initialized correctly the Channel, with the correct Source and Destination addresses, in Circular Mode, from Peripheral To Memory, in Half Word size on the two sides, with destination address increment... I checked all of my configuration.Until I checked the registers themselves... The REQSEL bits in the CxTR2 register of GPDMAx weren't initiliazed, they were equal to 0 instead of 1. These bits indiquates on which hardware request the transfer is done, something we configure in STM32CubeMX and should have been done correctly at the code generation... I added so this call in the ADC configuration function :LL_DMA_SetBlkHWRequest(GPDMA1, LL_DMA_CHANNEL_1, LL_GPDMA1_REQUEST_A
On a NUCLEO-H7S3L8 I've been testing the Projects/NUCLEO-H7S3L8/Applications/USBPD from STM32Cube_FW_H7RS_V1.2.0 with cubeMX6.14.0. I use the VScode extension, so I select the CMake toolchain. I select the "copy only necessary files" in code generation.I noticed a different behaviour when I just copy the .ioc file from the example (and just select CMake) to when I use the "access to example selector" button of cubeMX. The .ioc file in the example does not specify the specific board: it has board=custom, while the one from the example selector has: BSP_IP_NAME=NUCLEO-H7S3L8 board=NUCLEO-H7S3L8. That is the only difference I see in the .ioc files.The code generated from either of these does not operate correctly. With example selector:- BSP code is added in the folder and included in CMake files.- The libraries are not referenced in CMake files. For example, all the *HAL_Driver/Src/* files are missing in set(STM32_Drivers_Src part of mx-generated.cmake. 
with a standard project with only threadx and bsp code added via STM32CubeMX code generates the MX_ThreadX_Init function in main.c but the BSP initialization functions are below this call.MX_ThreadX_Init actually starts the kernel task switching (unlike FreeRTOS) so it never returns ... BSP init code is never reached.Workaround is to move the BSP init code to the user block above the call to MX_ThreadX_Init in main.c.This should be fixed in MX code generation.
Hi,I'm using the STM32H753I-EVAL2 (MCU Type: STM32H753XIHX) to develop a new product.The product will communicate to server using the LwIP (TCP Layer) + MbedTLS (SSL/TLS Layer), running over FreeRTOS environment.We want to use the latest TLS protocol standard (TLS Version 1.3).The problem is that the current version of MbedTLS (as provided by STM32CubeMX Version 6.10.0) is 2.16.2 - which does not supports TLS Version 1.3.The latest MbedTLS version is 3.5.2 (as shown in Github). My question is: when the STM32CubeMX will include the newest MbedTLS version, with TLS 1.3 support?Thanks,Asher
(repeated post)Currently, STM32CubeMX generates CMake projects based on the ARM-GCC compiler toolchain by default. However, in modern STM32 development environments, this toolchain appears to have performance limitations and may no longer fully meet requirements.More importantly, ARM-GCC uses the newlib standard library, while the Arm Toolchain for Embedded (ATfE) uses picolibc. For resource-constrained STM32 microcontroller development, picolibc – with its significantly smaller footprint and design specifically optimized for embedded systems – is clearly better suited.Therefore, Does ST plan to add support for generating CMake projects based on the ATfE compiler toolchain in future versions of STM32CubeMX?ATfE link: https://github.com/arm/arm-toolchain/blob/arm-software/arm-software/embedded/README.md
Hello: I wasn't able to enable support for RTOS in USB_HOST menu in CubeMX_6.14.0 for STM32H7R3I8Kx. There is only "Disabled" The version of STM32Cube MCU Package for STM32H7RS Series is 1.2.0
I am currently using CUBE MX to set up the USB-CDC function of STM32F373CCT6, but I can't find the VBUS pin. I am using the onboard power supply, and I don't know if I need to use VBUS. If there is a design example for reference, it would be very grateful.
Hello,is there NUCLEO-N657X0-Q template(s) available for CubeMX GUI (IOC project) that is/are preset for XIP or LRun? (ExtMem, Loader, XSPI etc settings ready).I'm trying to build a basic blink project starting from CubeMX IOC with BSP support (that i will later use as a basic template to [easily] add some AI Models though X-CUBE-AI plugin), however, while the code generated works fine in DevBoot debug mode (running directly from RAM) i cannot make it work when i store it in the octospi flash. (both FSBL & Appli are signed). I highly suspect that i may be doing something wrong with the extMem and/or XSPI2 setup to CubeMX initial setup!I am attaching the Full project (IOC & generated code). the root project dir also contains a "SignAndLoad_All.bat" that i use for signing and uploading the extMem.a) Are there any IOC templates/projects with preset ExtMem & XSPI Connectivity settings for the NUCLEO-N657X0-Q available? (especially a XIP template would be ultra-useful
In CUBE MX I have selected the microcontroller STM32C071CBT6 When I set the sequencer option to "sequencer set to fully configurable" then the channels IN17 IN18 IN19 IN20 IN21 IN22 are hidden why? is there any limitation for that channels or anything else?
I remeber there was the possibility to change MCU, but now I don't find it. How can I do ? Thanks
Hello Community,I have a Nucleo-U5A5ZJ-Q development board and have generated code for it using CubeMX (version 6.12.0). The generated code contains this for the user button:void EXTI13_IRQHandler(void) { /* USER CODE BEGIN EXTI13_IRQn 0 */ /* USER CODE END EXTI13_IRQn 0 */ BSP_PB_IRQHandler(BUTTON_USER); /* USER CODE BEGIN EXTI13_IRQn 1 */ /* USER CODE END EXTI13_IRQn 1 */ } If I enable the RNG in CubeMX and enable its global interrupt and then re-generate the code the above changes to:void EXTI13_IRQHandler(void) { /* USER CODE BEGIN EXTI13_IRQn 0 */ /* USER CODE END EXTI13_IRQn 0 */ HAL_EXTI_IRQHandler(&H_EXTI_13); /* USER CODE BEGIN EXTI13_IRQn 1 */ /* USER CODE END EXTI13_IRQn 1 */ }Which doesn't compile as H_EXTI_13 is not defined anywhere that I can see in any file. am I missing something or is this a glitch in CubeMX. If I restore line 6 to its original value then the code compiles.Any help much appreciated.
Hi,I have a CubeMX-generated code, where I want to receive data from the SPI. Unfortunately, the SPI2 ISR SPI2_IRQHandler() is never called. What I have checked/tried:hardware signals all are there and at the expected pinsinitialisation is done (it is CubeMX-generated code, so I do not expect any issues here)tried changing polarity of NSSinterrupts are enabled via __enable_irq();Anything else what could be missing/what should be checked?Thanks!
I need to add the LwIP component to a cmake STM32CubeMX generated project for the NUCLEO-H563ZI board.The LwIP component does not appear to be included in the STM32H5 package although the FreeRTOS component is.Is there a way to modify my top level CMakeList file to add it manually?
After a period of not touching the software.Unable to open a project.Tells me to update software.Existing software 6.9.2Software to update 6.14.1.Doesn't let me check the box.I am an administrator on this computer.How can I open the project and start working.
Is there any plan to support creating ATfE-based camke projects in CubeMX?ATfE link: https://github.com/arm/arm-toolchain
I have some other third party utilities and code I would like to populate under the /Middlewares/Third_Party folder. I have the freertos component selected in STM32CubeMX .ioc file and I noticed every time I regenerate code it wipes out the Third_Party folder and repopulates with its's CMSIS and FreeRTOS stuff. ... but also deleting my other sources. Is there a way of preventing this?
Hi How to implement BLE [X-NUCLEO-BNRG2A1] Mesh on Nucleo-F401 and Nucleo-L433 boards?
Hi all,We would like to set BUILD_IN_SOURCE to false when building the two cores on the stm32h747 along with passing some other cmake options, but I don't see anywhere to change settings like that in CubeMX. Right now, we are just editing mx-generated.cmake by hand to set those options and to add more to each ExternalProject call after CMAKE_ARGS and restoring the file every time CubeMX overwrites it.How do we pass -DOPTIONs to each ExternalProject? How would we set BUILD_IN_SOURCE (and why is it defaulted to true?) ?Thank you
software problem after and before update CubeMX and IDEhi therecould you help me with this;after updating CUBMX to latest one 6.14.1, does not open the project automatically , even when i open it from IDE with existing project from CUB MX option , still comes up with this error ; This file has been generated with STM32CubeMX version '6.14.1'.Your current STM32CubeMX version is '6.4.0'.Please check for update: Help > Check for Updates THE FUNNY THING IS THE LATEST UPDATE FOR CUB MX IS 6.14.1 SO WHY DETECTS THE VERSION WRONG, WHICH IS NOT EXIST ( 6.4)!? SO I CAN NO LUNCH PROJECT FROM CUB MX TO IDE either. could you help me with this? regardsAli10
When generating code with CubeMX (Version 6.14.1) for the STM32N657X0 with the following clock configuration for SAI1: With the above MX configuration and below code, the SAI1 FS is around 2 KHz:After adding the lines:PeriphClkInitStruct.ICSelection[RCC_IC7].ClockSelection = RCC_ICCLKSOURCE_PLL3;PeriphClkInitStruct.ICSelection[RCC_IC7].ClockDivider = 1;to HAL_SAI_MspInit() in stm32n6xx_hal_msp.c the signals are correctly generated:/* FILE: stm32n6xx_hal_msp.c */ void HAL_SAI_MspInit(SAI_HandleTypeDef* hsai) { GPIO_InitTypeDef GPIO_InitStruct; DMA_NodeConfTypeDef NodeConfig; RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; /* SAI1 */ if(hsai->Instance==SAI1_Block_A) { /* Peripheral clock enable */ /** Initializes the peripherals clock */ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SAI1; PeriphClkInitStruct.Sai1ClockSelection = RCC_SAI1CLKSOURCE_IC7; /* BELOW MISSING FROM GENERATED CODE */ PeriphClkInitStruct.ICSelection[RCC_IC7].ClockSelection
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.