Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Split from this thread. Hi mƎALLEm, Thanks for this reply and confirming that the OSC_OUT can be used as GPIO when HSE in bypass mode. Can you please advise I do I set this as a GPIO? CubeMX does not allow me to configure this pin. Should this be hand coded to make this possible? Thanks. Regards Billy
When using the IOC file in the attachment to generate code with an operating system, MDK-ARM V5.32 is selected. It is found that the directory ..\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC is missing, resulting in compilation failure in Keil.
When enabling MCE2 for the STM32N6 with the following settings:the generated MX_MCE2_Init crashes here: ContextAESConfig.KeySize and ContextAESConfig.Cipher_Mode are not initialized to any value. After adding: ContextAESConfig.KeySize = MCE_AES_256; ContextAESConfig.Cipher_Mode = MCE_CONTEXT_BLOCK_CIPHER;the function crashes to:HAL_MCE_EnableAESContext cannot be called with MCE_NO_CONTEXT.
Created a STM32H743II prj with I2S2 enabled, half-duplex slave receive mode, and DMA1 S0 bounded to SPI2_RX, to work with an ADC in master mode. Can't get data from the ADC ( DMA linked mem area always zero ), while my oscillograph can properly decode the ADC I2S data output pin ( CK & WS pin also connected between the ADC board and the H743 board, and the oscillograph ). In cube, the SDI pin is mapped to SPI2_MISO, PB14. But as a slave, shouldn't the correct SDI pin map to SPI2_MOSI, PB15? So I modified the cubeMX generated code manually, by changing PB14 to PB15 in the I2S2 GPIO initialization sector, and it worked, the DMA linked mem area shows the same value on my oscillograph. Is this a cubeMX bug?
I am using CUBEMX Version 6.17.0STMCUBE IDE 2.1.0FW Package name & version STM32Cube FW_H7 V1.13.0Enabled LWIP ETH With FREERTOS CMSIS2same settings did with cmsis version 1 it's working but with cmsis version2 NOT WorkingI configured on internal Timer TIM1 as soon as I connect Eth Cable program counter not reaching threads & Timer callback / TIM6(systick update).I checked in fault handlers it is not reaching here ETH State in eth handler is (READY STATE --> START STATE)Error code in eth handler is zero.Here I have attached my .ioc fileI have updated flash ld file as per repository code LWIP Debug Messages :
Hi, can someone please check what is wrong here: CubeMX/CubeIDE generates an STM32WB55 linker/memory map that places .MB_MEM2 in an SRAM2 region that bus-faults after the installed wireless stack reserves/protects SRAM2. A manually adjusted linker script placing MB_MEM1/.MB_MEM2 at 0x20038000 works. Observed: Generated/bad .MB_MEM2: 0x200301E4..0x20030A67Edited/Working .MB_MEM2: 0x200381BC..0x20038A3F The CubeMX-generated .ld file gives this fault:HardFault before main()CFSR = 0x00000400 = IMPRECISERRStacked PC = 0x080048CE, inside LoopCopyDataInitR0/R1/R2 match .MB_MEM2 copy bounds Attached .map .ld .ioc> STM32_Programmer_CLI.exe -c port=SWD freq=1000 mode=HOTPLUG -fusgetstate-------------------------------------------------------------------STM32CubeProgrammer v2.20.0-------------------------------------------------------------------ST-LINK SN : XST-LINK FW : V2J47S7Board : --Voltage : 3.30VSWD freq
So I have a series of PIN configured as Application and/or Boot only but, for some reason, the CubeMX generates the code on both main.h in Appli and Booti.e.I have PC0 set as Application only context but I found it in the Boot as well
IN short, it's not working. I normally use the standard (not x-cube) and L5 processors. I'm going to the U5 processors for a larger project. I've gone to Cube MX 6.17.0 and CubeMXIDE 2.1.1. Starting with a blank project, I configure the pins as usual and enable xcube-FreeRTOS. Go to CubeIDE, and without FreeRTOS, everything compiles properly. With FreeRTOS, I get 237 errors, some understandable, and some of the following: ./Middlewares/Third_Party/FreeRTOS/Source/include/task.h:34:6: error: #error "include FreeRTOS.h must appear in source files before include task.h" 34 | #error "include FreeRTOS.h must appear in source files before include task.h" | ^~~~~ In file included from ../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:37: ../Middlewares/Third_Party/FreeRTOS/Source/include/list.h:62:6: error: #error "FreeRTOS.h must be included before list.h" 62 | #error "FreeRTOS.h must be included before list.h" | ^~~~~ ../Middlewares/Third_Party/FreeRTOS/S
X-CUBE-FREERTOS for STM32U0. I don't see the configUSE_TIME_SLICING parameter in the GUI. It's also missing from the generated FreeRTOSConfig.h file.What multitasking mode will be used?
Hi all,I am working with STM32F469ZIT6 and external SDRAM AS4C4M16SA-6TIN SDRAM using FMC (Bank1).SetupHCLK = 180 MHz SDRAM clock configurations tested:HCLK/2 (90 MHz) → Refresh count = `0x056A`HCLK/3 (60 MHz) → Refresh count = `0x0395`Data width: 16-bitInternal banks: 4CAS latency : 2SDRAM clock has been verified using an oscilloscope and matches expected frequencies.Test CodeI am writing a pattern to SDRAM and reading it back:- Write pattern: `0xA1234567 + index`- Base address: `0xC0000000` for (uwIndex = 0; uwIndex < BUFFER_SIZE; uwIndex++) { *(__IO uint32_t*) (SDRAM_BANK_ADDR + WRITE_READ_ADDR + 4*uwIndex) = aTxBuffer[uwIndex]; }Read back: for (uwIndex = 0; uwIndex < BUFFER_SIZE; uwIndex++) { aRxBuffer[uwIndex] = *(__IO uint32_t*) (SDRAM_BANK_ADDR + WRITE_READ_ADDR + 4*uwIndex); } Issue (Observed Behavior)- The read operation does not return the correct written data- Instead:It often returns the previous/last written value.The data pattern shows MSB dupl
CubeMX copies the .s startup file from the template folder and renames it based on the selected MCU. However, the lowercase conversion generates different filenames on systems with different locale settings.For STM32H743IIK6, the generated filename differs depending on the system locale.On Windows 11 with the English locale, CubeMX generates:startup_stm32h743iikx.sOn Windows 11 with the Turkish locale, it generates:startup_stm32h743ııkx.sThe issue is caused by locale-dependent lowercase conversion of the letter I.
Hi: My goal is to perform full-duplex I2S using the STM32F722RET6 part. To achieve this using the pins available on the package it looks like I need to use SAI2 (sub-block B) as the master/TX and SAI1 (sub-block A) as a slave/RX synchronized to SIA2.The configuration of SIA2 in CubeMX works fine. However, when I attempt to configure the slave side (SAI1-A) the I2S option is greyed out (see below). Can anyone help me to debug this? Many thanks, Bruce.
I tried multiple times to generate code on Arch Linux with CubeMX version 6.17.0 and Import in CubeIDE version 2.1.1. I made a video with process. And I don't know why this not working. I tried last and previos version of packages for STM32F0. And I don't know but CubeMX copied files very very slow.I choosed CubeIDE toolchain in CubeMX.
Hello, I may have found a bug related to the STM32C092GCU6 MCU and the FDCAN peripheral. I created a new project and experienced issues with FDCAN reception: no RX messages were received, and the callback HAL_FDCAN_RxFifo0Callback() was never triggered. After several days of troubleshooting, I discovered a possible mismatch between the startup file and the generated interrupt handler names. In startup_stm32c092gcux.s, the following interrupt vectors are defined: .word FDCAN_IT0_IRQHandler /* FDCAN global interrupt 0 */ .word FDCAN_IT1_IRQHandler /* FDCAN global interrupt 1 */ However, when generating code with STM32CubeMX, the following interrupt handlers are created in stm32c0xx_it.c: void FDCAN1_IT0_IRQHandler(void) { HAL_FDCAN_IRQHandler(&hfdcan1); } void FDCAN1_IT1_IRQHandler(void) { HAL_FDCAN_IRQHandler(&hfdcan1); } As a result, the startup file expects FDCAN_IT0_IRQHandler / FDCAN_IT1_IRQHandler, but the gen
STM32CubeMX Version: 6.13.0Chip: STM32WL33CCVxToolchain: MakefileSnippet from startup file startup_stm32wl33ccvx.s: .word MRSUBG_BUSY_IRQHandler /* IRQ20: MR SUBG BUSY interrupt */ .word MRSUBG_IRQHandler /* IRQ21: MR SUBG interrupt */ .word TX_RX_SEQUENCE_IRQHandler /* IRQ22: TX RX SEQUENCE interrupt */ .word CPU_WKUP_IRQHandler /* IRQ23: CPU Wakeup interrupt */ .word SUBG_WKUP_IRQHandler /* IRQ24: SUBG Wakeup interrupt */ Snippet from IT header file stm32wl3x_it.h:void MRSUBG_BUSY_IRQHandler(void); void MRSUBG_IRQHandler(void); void MRSUBGTX_RX_SEQUENCE_IRQHandler(void); void MRSUBG_CPU_WKUP_IRQHandler(void); void MRSUBG_WKUP_IRQHandler(void); Perhaps I'm missing something, but I would assume the function names in the header file need to match the names used for the weak definitions in the assembly file.
I am working with the MDF peripheral and find this to be a great peripheral. However the CubeMX generated code for multiple DMA based filters is not correct.I am using two filters with DMA and CubeMX generates the following descriptors:MDF_HandleTypeDef MdfHandle0;MDF_FilterConfigTypeDef MdfFilterConfig0;MDF_HandleTypeDef MdfHandle1;MDF_FilterConfigTypeDef MdfFilterConfig1;DMA_NodeTypeDef Node_GPDMA1_Channel1;DMA_QListTypeDef List_GPDMA1_Channel1;DMA_HandleTypeDef handle_GPDMA1_Channel1;DMA_NodeTypeDef Node_GPDMA1_Channel0;DMA_QListTypeDef List_GPDMA1_Channel0;DMA_HandleTypeDef handle_GPDMA1_Channel0; When starting the application I found that both MdfHandle0 and MdfHandle1 refer the same DMA handle, handle_GPDMA1_Channel1. Likewise both handle_GPDMA1_Channel0.Parent and handle_GPDMA1_Channel1.Parent refer the same filter handle, MdfHandle0.This is caused by generated function HAL_MDF_MspInit which is called when starting a filter using HA
Hello everyone,I am currently working with the STM32N6570-DK board, and I'm still in the process of understanding the workflow for the STM32 programming environment (STM32CubeIDE/CubeMX). (I have implemented simple code to turn on the led with a button and using the RNG available in the board, as a get to know the board and programming environment before this).I am trying to include the CMSIS-DSP library (arm_math.h) into my project, but I am stuck. I have tried several approaches without success:I tried following the method shown in this tutorial video (https://www.youtube.com/watch?v=QxqnBByUvKE), but it didn't work for my setup.I tried manually copying and pasting the .h and source files directly into my project folders, but that also failed and resulted in compilation errors. (https://community.st.com/t5/stm32cubemx-mcus/how-to-add-arm-math-and-dsp-libraries-to-stm32cubemx-generated/m-p/316172)In many tutorials, people suggest going to "Software Packs" -> "Select Components" in
Hi,Is it possible to open a .ioc project file for STM32CubeMX directly from the Windows command line? If yes, what is the correct syntax?Thanks
The data sheet for the G474RE says it has a Memory Protection Unit. The article on how to enable/configure it in STM32CubeMX shows a CORTEX_M# node under "System Core". I don't see that node. Thank you.
There are 4 external events that can be chosen to trigger and reset individual counters of each HRTIM timer unit in STM32H743 MCU. CubeMX shows those events once the Event Configuration is chosen "Enabled" . Yet only Source 1 is active (allowed to be chosen) but the Source 3 that I need to connect internally to the TIM2 TRGO output is inactive (cannot be chosen) . Why? My attempts to use AI got strange results - after searching the STM documents AI concluded that CubeMX is limited , it allows only external on-pin connections and any internal connections must be manually coded in addition to the generated code. If it is so then why does CubeMX show those other options yet does not allow to choose them? Or is there way to activate those options ?Please anybody give me suggestion.Note: the STM32CubeMX is the latest downloaded and installed yesterday. The MCU library pack is also current.
Hi,when selecting the STM32C051K8 in Cube MX it seems that CubeMX has wrong configs/specs about it?As you can see from the screenshot below it shows it is a LQFP package but - unless I missed something - it is supposed to be a UFQFPN32 package.The main issues are...1) when searching for micros with that package, that micro does not appear2) not sure if the entire CubeMX generated code is somehow affected? Firth thought is that it is just a package difference but the pin count is the same so perhaps it is ok, but perhaps not? Point #2 is the most important at the moment. Could someone form ST please guarantee we can use CubeMX to configure the part?Many thanks
Split from The MCU selector cannot be opened, but the board selector can be opened normally.That issue is confirmed as solved; so this is a different issueI had exactly the same issue and could be solved by removing xcubeai.But it's confusing while reading this thread, another reply was marked as solution. Actually deleting .stm32cubemx/finder doesn't work.
In STM32CubeMX, here is the orientation for a chip with a red dot marking pin 1 at the top left when text reads from left to right.In real life, here is the orientation for a chip with a red dot marking pin 1. As far as I'm aware, all STM32 chips are oriented like this, with pin 1 at the bottom left when text reads from left to right. Why is the text rotated 90 degrees differently? Is this intentional? If there is a reasonable explanation, I'm interested in hearing it. It seems to only add confusion. Wouldn't it make more sense if the default orientation (or at least the text orientation) to match between the two? In STM32CubeMX, you can rotate the part for convenience. This is useful. However, the text also rotates, so if you put pin 1 in the bottom left like in reality, the text is now rotated. (This is the same story in STM32CubeMX2.)
Hi ST, This is just to let you know that STM32CubeMX version 6.17.0 does not generate correct cmake file for the STM32WL33 and this error results in the microntroller not starting up correctly but hangs in function SystemInit() in system_stm32wl3x.c. The problems is that the wrong is -mcpu is generated. The problem can be found in the file -> path/to/dir/cmake/gcc-arm-none-eabi.cmake # MCU specific flags set(TARGET_FLAGS "-mcpu=cortex-m4 ") // wrong for the WL33 # MCU specific flags set(TARGET_FLAGS "-mcpu=cortex-m0plus ") // correct for the WL33 Ola
I just bought a Nucleo-G491RE board and installed STM32CUBE to start a new project. During the project setup, the IDE downloaded and unzipped stm32cube_fw_g4_v160.zip. Then, when it downloaded stm32cube_fw_g4_v161.zip, this error message popped up. (screenshot below) Error downloading the following filesstm32cube_fw_g4_v161.zip (HTTP Access Forbidden) I'd appreciate any help to resolve the error. Thanks.
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.