Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi,i working on stm32u083rctx micro with package FW_U0_V1.3.0. I want to report that in CubeMX v6.15 i selected lpuart3 to with LSE oscillator. The execution of product code, when lpuart3 has been initialized goes to Error_Handler() function. In file usart.c into function HAL_UART_MspInit() miss the the line to populate struct PeriphClkInit.Lpuart3ClockSelection with correct clock source. So inside HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) at the appropriate condition (uartHandle->Instance==LPUART3) before to call HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) i inserted:PeriphClkInit.Lpuart3ClockSelection = RCC_LPUART3CLKSOURCE_LSE;now is working. I ask to someone to double check this issue. Thank you.Best regards.Enrico.
Hi,I got the problem on choosing FMC pin definition of STM32N657A0 in CubeMX 6.15.0. As the datasheet said the FMC_NORMUX is supported by the chip, I cannot find corresponding settings in CubeMX as the screenshots.Thanks.
I'm currently hesitant to upgrade CubeMX to version 6.15.0 due to previous issues with Ethernet support. Specifically, I encountered a problem where Ethernet (likely LwIP stack with STM32H7) was not functioning correctly in CubeMX 6.14.1, which forced me to revert back to 6.14.0 where it worked as expected. Before upgrading, I’d like to confirm if Ethernet-related issues have been resolved in 6.15.0. Has anyone verified Ethernet (especially with LwIP and HAL/LL drivers) is stable in this release?
Hello.I'm using a NUCLEO-311RE board.I'm looking for a way to bypass the external waveform as it is.This is my timer setting static void MX_TIM1_Init(void) { /* USER CODE BEGIN TIM1_Init 0 */ /* USER CODE END TIM1_Init 0 */ TIM_SlaveConfigTypeDef sSlaveConfig = {0}; TIM_MasterConfigTypeDef sMasterConfig = {0}; TIM_OC_InitTypeDef sConfigOC = {0}; TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; /* USER CODE BEGIN TIM1_Init 1 */ /* USER CODE END TIM1_Init 1 */ htim1.Instance = TIM1; htim1.Init.Prescaler = 0; htim1.Init.CounterMode = TIM_COUNTERMODE_UP; htim1.Init.Period = 1; htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim1.Init.RepetitionCounter = 0; htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_Base_Init(&htim1) != HAL_OK) { Error_Handler(); } if (HAL_TIM_OC_Init(&htim1) != HAL_OK) { Error_Handler(); } sSlaveConfig.SlaveMode = TIM_SLAVEMODE_EXTERNAL1; sSlaveConfig.InputTrigger = TIM_TS_ETRF;
Recently, The CubeMX cannot open IOC files through the file menu, and cannot save IOC files when creating a new project. But I can open the project normally by double clicking an existing IOC file.Working environment: Win11+CubeMX6.15I have tried reinstalling CubeMX, lowering CubeMX version to 6.13, and so on, but they all have the same problem.
Hi, Why NUCLEO-H753ZI ADC channel 12 is missing in CubeMX ? ADC channel 12 is in NUCLEO-H753ZI board CN9-9 connector. A few other ADC channels are also missing in CubeMX. Thanks, Rong
After migrating the project for STM32F765VGTx in cubeMX from version 6.14.1 to version 6.15.0, the parameter "WITH_RTOS (Use FREERTOS ** CubeMX specific **)" in lwip -> tab "General settings -> RTOS dependency" is inactive, and takes the value disabled,while the use of FREERTOS is set to CMSIS_V2.Also I can't change "NO_SYS (OS awareness)" from "OS not used" in the tab "Key parameters -> Infrastructure - OS awareness parameter".When creating a new configuration, the problem is not solved.I add two configurations, one before migration, the other after.
I'm starting a project and need to use the STM32F412G-DISCO board for initial development.I already had one board purchased in 2020.I downloaded the latest STM32CubeMX and created a new project based on this board with all default options. STM32CubeMX includes, by default, SDcard support.When I flash the generated code, the MCU enters the Error_Handler during initialization, right in the SD_WideBus_Enable(SD_HandleTypeDef *hsd) call.I commented out the SD initialization in main.c and then the program runs ok.So, for some reason the SDcard initialization crashes the code.Looking for a possible cause for this problem I downloaded also the latest demo binary (ver. 1.3.0) from ST's website. Flashed it and... doesn't run, the board does nothing an, I suspect, the code is also crashing during initialization. Looking on the web, I found a couple post from people indicating that the pinout generated by newer versions of STM32CubeMX for this board by default is incorrect. So I lo
Hello,I am working on an HMI product with STM32H7B0RBTx LQFP64 and want to use the RGB888. As per Datasheet, it seems possible:But when I start a project on CubeIDE, it only provides only RGB565/666. My question is:- Is this a limitation in the CubeMX and I can use RGB888 if I do it manually?- If it's not the case, please to let me know and correct it on the datasheet.Thanks,Ayoub
In the SPI options for STM32H7S3, the "Prescaler (for Baud Rate)" drop-down box has various values from 2 to 256, but the option to bypass the prescaler is missing.To be clear, I'm referring to the BPASS bit in register SPI_CFG1:To get around this, I add a few lines to the generated code: hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_BYPASS; if (HAL_SPI_Init(&hspi1) != HAL_OK) { Error_Handler(); }This works. But to avoid people having to do this in the future, could you add the bypass option to Cube instead?Thank you.
Software: CUBEIDE:1.18.0Firmware: STM32Cube_FW_H7_V1.12.1 Board: NUCLEO-H745ZI-Q The problem is as follows: when using this chip for dual core communication, reproducing according to the example given by ST, communication cannot be carried out no matter what. Through debugging, it was found that the problem lies in the OPENAMP_create_endpoint() function in the M4 core. The return value is -2005, but as a beginner, I am unable to pinpoint where the problem lies. I will attach my project at the end of the article. My original goal was for the M7 core to send data to the M4 core, which would then print the data while the M7 core's LED would flash. I have reviewed the corresponding routines in ST's AN5617 and firmware, and watched the corresponding videos, but still cannot solve the problem. I request your help
Hello,I configured the RCC in STM32CubeMX, but the generated Keil code doesn't contain the SystemClock_Config function. Can anyone help me solve this problem? The device model is STM32H7R7L8H6H.Thanks in advance.
hi I'm using nucleo-h755 144 pin board, i have configured for the project, now I'm changing the mcu from stm32h745BITx 208 pin package. is there any option in stm32cubeide to import the configuration from one mcu to another mcu in cube ide without or with opening new project. since i have configured almost 142 pins in h755 nucleo board, i don't want to do it again for the 208-pin package.i have checked in cube ide list pinout compatible mcu option is not coming for this series, previously i have used g4 series for that it is showing.so it possible to import the nucleo h755 pin configuration to stm32h745BITx 208- pin package in cube ide or not.please suggest some ideas, since it will reduce the some time. regards,Srinath
Hi : I want to know which MCU support BC1.2, how can I use CubeMX to filter these MCU?
Hello,I have an existing project and I'm attempting to retrofit it with TrustZone, starting with a new IOC file that will be the basis of the project which I will then retrofit my code into. I'm starting with a clean slate ioc file for the STM32U545CET6 from CubeMX. Is there a way to enable TrustZone with all memory 'whitelisted' such that all accesses are allowed? If so, please provide details such that the firmware will operate (initially) as if TrustZone were not there. I either want to:1. Make everything in the processor secured (such that I have zero access errors) and get my firmware running. Selectively mark certain parts of my application unsecured one-by-one to ensure I don't break anything too badly.2. Make everything in the processor unsecured (such that I have zero access or TZ errors) and get my firmware running. Selectively mark certain parts of my application secure one-by-one to ensure I don't break anything too badly. How do people normally do this? I just wa
Hello ST Community,I'm working on an STM32 project where I use TIM1 Input Capture + DMA to log timestamps of Hall sensor edges (motor feedback) on TIM1_CH1 (PA8). The captured values (CCR1) are stored in a circular DMA buffer.I have a 1ms PID interrupt, where I:- Poll the DMA buffer to process new timestamps- Calculate motor speed- Generate precise PWM signalsSo, I do not want DMA interrupts, because I manually poll the buffer in the PID loop.---Problem I'm Facing:I'm also running CAN communication in this project.When the Hall sensor edge interrupts were enabled, they sometimes delayed or blocked CAN transmissions, especially when the motor is running at high speeds.That’s why I switched to DMA-based Input Capture, so the Hall sensor events are logged with zero CPU overhead and no interrupt latency, which also helps ensure smooth and timely CAN transmission.However, Cube MX automatically enables the DMA interrupt for TIM1_CH1 capture, and I don't want tha
Hi Team,I'm currently transitioning from using UART interrupt with timeout to DMA-based reception on an STM32G4 controller. I’d like to implement a similar behavior where I can detect the end of a UART message using idle line detection while receiving data via DMA.Is there a recommended way to combine DMA reception with UART idle timeout on STM32G4? Specifically:Are there any best practices or example configurations for this setup?
I download the latest firmware package "stm32cubeh5-v1-5-0.zip" for STM32H5, from ST's website. I followed following instructions to install it via STM32CubeMX:Open STM32CubeMX. Go to Help > Manage embedded software packages. Choose the desired STM32Cube MCU Package for your specific series (e.g., STM32CubeL4 for STM32L4 series). Click "Install" or "From Local" if you have a downloaded archive. The firmware and examples will be installed in the STM32Cube repository, usually under C:\Users\<your_username>\STM32Cube\Repository. I get following failure message, at the very end of the installation process:I checked the Repository directory, The previous version - "STM32Cube_FW_H5_V1.3.0" is installed. Should I uninstall the V1.3.0 first, before I can install V1.5.0?Any helps? Thanks!
Hi, I am thinking the same topic today. Security software is important today, not only hardware. Middle-ware/components need to be upgraded which is required by EN 18031 standard. We hope ST apply new version mbedTLS in the next STM32Cube release. -Engin Edit: moved from mbedTLS with support of TLS_1.3 in STM32CubeMX
I am using STM32CubeMX Version 6.13.0 and targeting the STM32H743BIT6.The CAD export option fails with the error: "Download interruption: CAD download fails due to AxiosError: Request failed with status code 500".I first experienced this with an older version of CubeMX about a week ago and the error persists today with the latest version (6.13.0) of CubeMX.To replicate the error:Start a CubeMX project targeting the STM32H743BIT6. Configure at least 1 pin. Go to the 'Tools' tab, CAD option.Select KiCAD v6+ and 3D STEP.Select pin naming 'Dual'Select 'CAD Models' to attempt a download.
I was checking maximum frequencies of some MCUs and noticed i can pick ADC frequency in CubeMX clock configuration up to 80MHz for TSSOP-20 STM32G030. Its maximum frequency is 64MHz.Datasheet states it can deliver maximum 2Msps on 12 bit but with its 1.5 Sampling and 12.5 conversion cycles it reaches way higher sample rates.I checked some of the reference manual chapters and did not noticed anything unusual, prescalers seems to accept /1 divisions as well.I am not familiar with reference manuals. Datasheet 5.3.17 also shows 35MHz maximum frequency. What's the thing i am missing? Is it a bug on interface?
The MCU of NUCLEO-U031R8 is LQFP64. But if I import the example of NUCLEO-U031R8, STM32CubeMX shows it as UFBGA64.
Hi Everyone,I noticed that CubeMX (version 6.14.0) generates a call to HAL_OSPI_DLYB_SetConfig in octospi.c even though I have configured the OctoSPI to bypass the delay block.Is it safe to just remove any Delay Block related code?Is this a bug in CubeMX? It increases the code size, so I would like it to be removed if it's not necessaryMy target is a Nucleo-U5A5. Thanks!Timon Zijnge
Hello everyone,I am currently working on a project with a STM32U545. There was a first prototype electronics + software that was working. I made a new hardware and I wanted to use the same code with just a few modification.For this, I just copied the STM32CubeIDE project, modified the configurator with the integrated CubeMX, regenerated the code and compiled.This is where I ran into problems:I have this compilation error:../Drivers/STM32U5xx_HAL_Driver/Inc/stm32u5xx_hal_uart_ex.h:231:36: error: unknown type name 'UART_HandleTypeDef'; did you mean 'RTC_HandleTypeDef'? 231 | HAL_StatusTypeDef HAL_RS485Ex_Init(UART_HandleTypeDef *huart, uint32_t Polarity, uint32_t AssertionTime, | ^~~~~~~~~~~~~~~~~~ | RTC_HandleTypeDefSTM32Cube IDE version: 1.18.0STM32CubeMX version: 6.14.0When looking at the generated driver (file stm32u5xx_hal_uart.h), I noticed that the UART_HandleTypeDef was missing its name before the semicolon:typedef struct __UART_HandleTypeDef { USART_TypeDef *Insta
Hello,Previously I had CubeMX 6.13.0 and here is the code which was autogenerated and working as expected for RS485 communication, where I have manually handled the Direction pin in my code.static void MX_LPUART1_UART_Init(void) { hlpuart1.Instance = LPUART1; hlpuart1.Init.BaudRate = 115200; hlpuart1.Init.WordLength = UART_WORDLENGTH_8B; hlpuart1.Init.StopBits = UART_STOPBITS_1; hlpuart1.Init.Parity = UART_PARITY_NONE; hlpuart1.Init.Mode = UART_MODE_TX_RX; hlpuart1.Init.HwFlowCtl = UART_HWCONTROL_NONE; hlpuart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; hlpuart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; if (HAL_RS485Ex_Init(&hlpuart1, UART_DE_POLARITY_HIGH, 0, 0) != HAL_OK) { Error_Handler(); } if (HAL_UARTEx_SetTxFifoThreshold(&hlpuart1, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) { Error_Handler(); } if (HAL_UARTEx_SetRxFifoThreshold(&hlpuart1, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) { Error_Handler(); } if (HAL_UARTEx_DisableFifoMode(&a
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.