Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi ST,There are 2 bugs in Initialization of VREFBUF.in STM32CubeIDE V1.11.0.I use FreeRTOS, but it shouldn't have any inffluence on these bugs.1.) At function main, the firsr call is to Hal Init and when VREFBuF ist activated, in function HAL_MspInit, Enabling the SYSCFG Clock sets the HiZ bit of CSR. the call to HAL_SYSCFG_EnableVREFBUF sets the ENVR bit in CSR and waits for VRR set which indicates the Reached the desired voltage. This will never happen. Only when I clear the HiZ bit manually, the VREFBUF wil reach the voltage (measured on VREF+ Pin), the VRR wil be set and it can continue.2.) in function HAL_SYSCFG_EnableVREFBUF, it waits for Tick Count to reach VREFBUF_TIMEOUT_VALUE (wait max 10ms) but no count of HAL Tick will happen. The Tick is initialised before, but it seems that something ist not configured correct or too late. There is no Tick increment at all.The combination of above bugs ends in Dead System. Nothing else will habben after the call of HAL_SYSCFG_EnableVREFBU
STM32CubeMX generates a different .ld file depending on the selection under Project Manager -> Toolchain/IDE, when it should not.Here are two examples, the first for CMake, and the second for STM32CubeIDE. I added them both to a .zip file.STM32C071RBTX_FLASH.ld was generated when selecting STM32CubeIDE.STM32C071RBTx_FLASH.ld was generated when selecting CMake.ProblemThe files should not have been regenerated. IT should have been the same name, with the same content. That two different files are generated shows for a bad implementation in STM32CubeMX for how it generates the .ld file.
I met a problem when using CubeMX to modify the CSI to start the camera module, but it shows that the CSI cannot be adjusted correctly. I want to know how to solve this problem.
Dear ST Community,I’m currently working on a CMSIS-Pack for STM32 and would appreciate your guidance.I initially created a CMSIS-Pack named WiFiBluetooth-STM32, version 1.0.0. After adding new features, I created an upgraded version 2.0.0, which includes additional components and bundles. I kept the previous release (1.0.0) listed in the pack’s release history as per CMSIS-Pack standards.However, when I load the upgraded pack (2.0.0) into STM32CubeMX and open an existing.ioc file that was using version 1.0.0, I get the following warning:Warning: The CMSIS-Pack JDP.WiFiBluetooth-STM32.1.0.0 is not present in the repository or on the user disk.I’m still new to STM32CubeMX and CMSIS-Pack development, and I’m not sure how to handle multiple versions correctly so that older .ioc files don’t break or trigger this warning.Could anyone please advise on:How to properly manage and install multiple pack versionsHow to make sure older versions (like 1.0.0) are recognized by CubeMXBest practices to
I am using a w25q256jvfq ainbond chip and cube mx to setup octospi1 on the stm32h723vgt6. However after the HAL_OSPI_INIT and HAL_OSPIM_Config commands, what other commands and settings should I write to make it match the characteristics of the w25 winbond chip?Thank you
I am using Winbond's Quad SPI NOR Flash memory (W25Q128JW).Which of Micron or Macronix should be selected for the memory_type of the OCTSPI setting parameter of cubeMX?
I have such dev board and try to run it as virtual com port. I created project cubemx, enable only usb as device in CDC mode. After generating and running project with next small fixes I run it on board.int main(void){//....skip while (1) { /* USER CODE END WHILE */ const char* str = "Test\n"; CDC_Transmit_FS((uint8_t*)str, 5); HAL_Delay(1000); /* USER CODE BEGIN 3 */ }gtkterm connects to the dev but no received and sent data.When I started to debug interrupt handler I found that usb device always in USBD_STATE_DEFAULT mode since start and state isn't being changed instead of ISRs..USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev){ if (pdev->dev_state == USBD_STATE_CONFIGURED) { if (pdev->pClass->SOF != NULL) { pdev->pClass->SOF(pdev); } } return USB
Hi ALLI'm playing with a STM32C011J6Mx on a plane breakout board.Sorry if this a basic question, new to using the SMT32 , last time I played with MCUs was 6809 CPU :)I wanted to use I2C and SWD, to use both I need to move the I2C1_SCL to it's alternate pin, when I CTL+ left click on the PC15 (I2C1_SCL) it shows PA8 has an alternative.But when I select PA8 , I2C_SCL , is not listed has an alternative function.But the data sheet show it has a Alternate function on PA9, How do I activate PA9, in the MX tool? Regards, Stephen
I'm trying to get the BLE_p2pServer example working using a Makefile setup on an STM32WBA55CG board. I copied the .ioc file and opened it in CubeMX, changed the toolchain setting, but now I'm stuck at the "copying libraries files" stage. Not sure if I messed something up—sorry if I misunderstood something or did something wrong along the way.I tried following the official tutorial, but ran into a bunch of issues, error messages during flashing, version mismatches (even after rolling back), and my MCU not showing up in the application toolbox.I'm currently using the latest CubeMX, and while everything works fine in CubeIDE, I'm trying to move away from it and build with Makefiles.
Hi,I am using the Nucleo-N657X0-Q board and here is what I have done so far:Generated a CubeMX projectEnabled FSBL, Secure Application, Non-secure Application and ExtMemLoader projectsEnabled XSPIM, XSPI2, EXTMEM_LOADER, EXTMEM_MANAGERGenerated codeOpened the project up in CubeIDEAnd this is where I get stuck. Since the project generates 4 sub-projects, which one do I run and on which boot configuration (BOOT0 JP1 and BOOT1 JP2)?I just want to get the non secure application to run, I have added a line of code to turn the blue LED on to verify that the code is running. Purpose of this project is to understand the project structure and its method to get the code running.Can someone please describe the steps I need to follow and in which order these needs to be done?And I also want some feedback on the steps I have performed so far. Was it even needed to generate the EXTMEM_MANAGER sub project, and to enable the EXTMEM loader and manager?
I am using NUCLEO-H743ZI which has STM32H743ZI on it. In the 'Device Configuration Tool' under the 'Project Manager'->'Advance Settings' there are options to set how I want to generate HAL calls. I basically want to set all of them 'Visibility(Static)' so they are called at the 'beginning' of main function.However as soon as I hit 'Save' or 'Generate Code' the visibility of 'MX_USART3_UART_Init' disabled and 'Not Generate Function Call' is selected automatically. I can of course call the function manually but this unpredictable behaviour is concerning...
Hi,I think I have found a bug in CubeMX v6.12.0.I have an STM32U595 with USB OTG HS.My USB peripheral is set to use the HSE as it's clock (not PLL1):However, when I try to set the oscillator source for PLL1 to the HSI, CubeMX gives an error declaring that "Only HSE is possible when OTG_HS is using PLL1", which would be try, except OTG_HS is configured to use HSE, not PLL1:Can you either confirm this is fixed in a later version of CubeMX, or otherwise fix it!
Moved from this post. Hello, I'm currently working on the STM32H735G-DK dev board, using CubeIDE version 1.18.1 and integrated CubeMX version 6.14.1.202504091515, and this bug is still here. When I launch a debug, the firmware get stuck in the ExitRun0Mode function. After deleting the definition of USE_PWR_LDO_SUPPLY as you explained, everything works. Regards,
Hi, I'm using the code generated by CubeMX ver 16.14.0 following the following link to develop a USBPD sink. https://wiki.stmicroelectronics.cn/stm32mcu/wiki/STM32StepByStep:Getting_started_with_USB-Power_Delivery_Dual_RoleI added an APDO to the PDO list but it is not working. I traced the issue to be coming from the USBPD_DPM_RequestMessageRequest function when it calculates the allowable power. It uses the DPM_SNKRequestedPower.MaxOperatingCurrentInmAunits found in the DPM_USER_Settings structure. The issue is that this value is not initialized. If I use the cubeMonitor-UCPD app, I can see that APDO is defined in the SINK capabilities tab, so the data is there somewhere. Additionally, if I press "SEND TO TARGET", the DPM_SNKRequestedPower.MaxOperatingCurrentInmAunits found in the DPM_USER_Settings is now correct. Is this an issue related to missing initialization in the code generated by the cubeMX which is leaving the DPM_USER_Settings to
Hello, I have Version STM32CubeIDE : 1.18.0, and I get a program that was communicated to me, but I have this message below : And I downloaded and installed STM32CubeMX 6.14.1 version, but it seems that it is not taken into account in the environment of STM32CubeIDE version 1.18.0. Here is the path I installed the STM32CubeMX 6.14.1 version How to link STM32Cube IDE with STM32CubeMX so I can open the program. Thank you for your helps.
Hello,I am using STM32F769 microcontroller. I have used Cube MX to configure USART1 for Tx and Rx and DMA channels 2 and 7. I have started a data transmission using HAL_DMA_Start function but noting is happening. Using debugger I have found that in USART1 CR3 the DMAT and DMAR are reset. When I put a break point at the point where HAL_DMA_Start is called and manually set DMAT in CR3 the data is transmitted. Have I missed something in the configuration of USART1 and DMA or do I need to write some code to set these bits after the MX generated initialisation code has finished?Thanks
Hello STM32 developers,I/m using STM32CubeMX 6.14.1I noticed that in middleware the selection "USB_DEVICE" has disappeared.Instead, "USBX" is listed, however it is for RTOS, and I don't use RTOS, so I'm left with nothing.I think the STMicroelectronics USB stack would still be available, somehow:https://wiki.stmicroelectronics.cn/stm32mcu/index.php?title=USBX_overview&oldid=10172Besides offering STMicroelectronics USB stack, USBX, the Azure RTOS USB embedded stack is currently supported and offered with a set of applications running on STM32 MCUs. How can I use the STMicroelectronics USB stack > "USB_DEVICE" instead?Do I need to install some software for it?
Hi all,I am using CubeMX 6.14 to generate an OpenAMP project for the STM32H747I-DISCO board. When I build the project, I receive the following warnings, and it results in an 'OpenAMP create endpoint' error at runtime. I used the same code and project created with CubeMX 6.12, and it works fine. Therefore, I suspect there might be an issue with CubeMX 6.14. Could someone please advise me on how to generate a working OpenAMP project using CubeMX?arm-none-eabi-gcc "D:/TouchGFXProjects/STM32H7_TUT/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DCORE_CM4 -DUSE_HAL_DRIVER -DSTM32H747xx -DUSE_PWR_DIRECT_SMPS_SUPPLY -DMETAL_INTERNAL -DMETAL_MAX_DEVICE_REGIONS=2 -DRPMSG_BUFFER_SIZE=512 -DVIRTIO_SLAVE_ONLY -DRPMSG_BUFFER_SIZE -DNO_ATOMIC_64_SUPPORT -c -I../../../CM4/Core/Inc -I../../../Drivers/BSP/Components -I../../../Drivers/STM32H7xx_HAL_Driver/Inc -I../../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../../../Drivers/CMSIS/Device/ST/STM32H7xx/Inc
Hi,I'm using STM32CubeIDE 1.18.1v, which includes STM32CubeMX 6.14.1v, and I'm seeing unexpected behavior when working with GPDMA1 on an STM32H5 device.When I configure a DMA channel with Request set to "Software", CubeMX generates full initialization code.However, as soon as I change the Request to any other peripheral trigger, for example TIM2_CH1, all of the DMA configuration disappears from the generated code. Only the RCC clock enable and interrupt configuration remain. Example 1 — Request = Software:static void MX_GPDMA1_Init(void) { /* USER CODE BEGIN GPDMA1_Init 0 */ /* USER CODE END GPDMA1_Init 0 */ DMA_NodeConfTypeDef NodeConfig = {0}; /* Peripheral clock enable */ __HAL_RCC_GPDMA1_CLK_ENABLE(); /* GPDMA1 interrupt Init */ HAL_NVIC_SetPriority(GPDMA1_Channel0_IRQn, 0, 0); HAL_NVIC_EnableIRQ(GPDMA1_Channel0_IRQn); /* USER CODE BEGIN GPDMA1_Init 1 */ /* USER CODE END GPDMA1_Init 1 */ NodeConfig.NodeType = DMA_GPDMA_LINEAR_NODE; NodeConfig.Init.Request =
In our project we are using GPDMA for SAI transfers:STM32CubeMX 6.13.0STM32Cube_FW_U5_V1.7.0STM32U535RE targetX-CUBE-FREERTOS 1.3.0 (FreeRTOS 10.6.2)Description of the behaviour:We this .ioc configuration STM32CubeMX does not create the calls to `HAL_DMA_IRQHandler`.Note: in the past the time base call also was not generated (TIM6)A different .ioc we were using for the NUCLEO board was producing the correct/expected codeExample of expected code:void GPDMA1_Channel0_IRQHandler(void) { /* USER CODE BEGIN GPDMA1_Channel0_IRQn 0 */ /* USER CODE END GPDMA1_Channel0_IRQn 0 */ HAL_DMA_IRQHandler(&handle_GPDMA1_Channel0); /* USER CODE BEGIN GPDMA1_Channel0_IRQn 1 */ /* USER CODE END GPDMA1_Channel0_IRQn 1 */ }Actually generated code (note the missing call):void GPDMA1_Channel0_IRQHandler(void) { /* USER CODE BEGIN GPDMA1_Channel0_IRQn 0 */ /* USER CODE END GPDMA1_Channel0_IRQn 0 */ /* USER CODE BEGIN GPDMA1_Channel0_IRQn 1 */ /* USER CODE END GPDMA1_Channel0_IRQn 1 */ } W
Hello, I want to update STM32CubeMX and STM32Cube MCU Packages, but I can't do because of the error.I tried to run STM32CubeMX in admin mode, but the error occured again.1. How do you solve this error?2. Is 'STM32Cube Updater' a real file? # Error Text : "A 'STM32Cube Updater' (or another 'STM32CubeMX') software is downloading to the Repository folder. Please wait for the download to complete and retry"# In the Repository folder What file is being downloaded?
“我想知道在哪里可以找到 STM32H7 系列 MCU 各种外设的 STM32CubeMX 配置教程。” Edited to add the English version : I want to know where to find the STM32CubeMX configuration tutorials for various peripherals of STM32H7 series MCU.
the below code generated by CubeMX. does not work.I need to change the GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW; to GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_VERY_HIGH; to make it work. /* SPI1 init function */ void MX_SPI1_Init(void) { /* USER CODE BEGIN SPI1_Init 0 */ /* USER CODE END SPI1_Init 0 */ LL_SPI_InitTypeDef SPI_InitStruct = {0}; LL_GPIO_InitTypeDef GPIO_InitStruct = {0}; /* Peripheral clock enable */ LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SPI1); LL_IOP_GRP1_EnableClock(LL_IOP_GRP1_PERIPH_GPIOA); /**SPI1 GPIO Configuration PA1 ------> SPI1_SCK PA2 ------> SPI1_MOSI PA6 ------> SPI1_MISO */ GPIO_InitStruct.Pin = LL_GPIO_PIN_1; GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE; GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL; GPIO_InitStruct.Pull = LL_GPIO_PULL_NO; GPIO_InitStruct.Alternate = LL_GPIO_AF_0; LL_GPIO_Init(GPIOA
I would like to file a bug report for STM32CubeMX.During configuration of CORDIC using DMA, I have found the following issue:In:void HAL_CORDIC_MspInit(CORDIC_HandleTypeDef* hcordic) { if(hcordic->Instance==CORDIC) { /* USER CODE BEGIN CORDIC_MspInit 0 */ /* USER CODE END CORDIC_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_CORDIC_CLK_ENABLE(); /* CORDIC DMA Init */ /* CORDIC_WR Init */ hdma_cordic_wr.Instance = DMA1_Stream0; hdma_cordic_wr.Init.Request = DMA_REQUEST_CORDIC_WRITE; hdma_cordic_wr.Init.Direction = DMA_MEMORY_TO_PERIPH; hdma_cordic_wr.Init.PeriphInc = DMA_PINC_DISABLE; hdma_cordic_wr.Init.MemInc = DMA_MINC_ENABLE; hdma_cordic_wr.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; hdma_cordic_wr.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; hdma_cordic_wr.Init.Mode = DMA_NORMAL; hdma_cordic_wr.Init.Priority = DMA_PRIORITY_LOW; hdma_cordic_wr.Init.FIFOMode = DMA_FIFOMODE_DISABLE; if (HAL_DMA_Init(&hdma_cordic_wr) != HAL_OK) { Error_Handler();
Hello STM32 developers,I'm using STM32CubeMX 6.14.1 and an STM32U5G7VJTx.When clicking :Generate Code" a Warning popup appears without comment.What can be the problem?I attached the ioc file.Thanks for helping out.
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.