Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Nothing generated by CubeMx: the BSP code has to be added to the project according to the board (ST or custom) in use. Does this MCU need to manually transplant the BSP of SD card?Why did the F103 and f429 MCU have the corresponding BSP code for SD?
When I use STM32cubeMX, add the FreeRTOS and select STM32cubeIDE as the IDE, click to generate code, cubeMX will get stuck at Copying libraries files. What should I do, thanks for the help.
I have connected microsd by SDIo to STM4Disc1 board. I am using SD 4 bit. I see on STM forums there is a bug and needs to set 1bit in MX_SDIO_SD_Initso I changed to hsd.Init.BusWide = SDIO_BUS_WIDE_1B and reduce SDIO CLK by 192 factor.I am able to execute FATFS_LinkDriver, f_mount & f_mks function runs successfully but f_open function always fails... I tried to create new file using f_open function.f_open(&MyFile, "TESTING.TXT", FA_CREATE_ALWAYS | FA_WRITE ) I also tried to open already exiting file but it also fails.f_open(&MyFile, "test123.txt", FA_READ)On seeing FRSEULT , I see FR_NOFILESYSTEM
HI,STM32 USB HID mouse generated with CubeMX not working. Tried with all Discovery board also.Help needed. Tried on STM32F103RB, STM32F429, STM32F746, none working.Thanks,
File created on SD Card shows incorrect creation time.shown in above fig in red all files which gets created on SD card carry same creation time.Wondering if missing something in CubeMX settings
Hello, I've got problem with STMCubeIDE. You can see my problem at photos I attached. Can anyone help me to solve this problem. I try to work on Lenovo Legion 5 with Ryzen 5 5600h and RTX3060. Second graphic card is integrated with Ryzen CPU. This problem is at lot of windows at MX section when I try to configure my STM. I try to open this program with both graphic cards. I have latest drivers to both graphic cards. Try to standalone MX software but still same result. Maybe someone had similar problem.
Hello everyone, When configuring the timers via the MxGenerator, I noticed the following strange behavior. If you use the LL, the code for the prescaler is generated strangely. When setting Prescaler = 2-1, the correct code is generated when using the HAL. When using the LL, however, a substration is performed between two enums, which makes no sense. This behavior is shown in the following screenshot. However, if you set the prescaler to 1 directly in CubeMx and not to 2-1, the code is generated correctly. I suspect a bug in the code generation. The following versions are used. STM32CubeIDE Version: 1.13.1 MCU Reference: STM32H563ZITx Firmware Package: STM32Cube FW_H5 V1.1.1 I hope for a confirmation of the bug and an adjustment in a next release.Many thanks in advance!
Dear Sir and Madam,I started a new project with STM32H745 from scratch. After implementation of all pin function and names, I worked on the clock tree. During this, I saw, one UART must be changed to the FDCAN interface. While doing this, CubeMX was getting frozen. Killing CubeMX and open the same file again show me the error Spoiler (Highlight to read)Cannot read field "defaultValue" because of "rparam" is null.Cannot read field "defaultValue" because of "rparam" is null.Doing the same on a PC from a colleague runs in the same trouble.The projectfile and the message is atteched. If someone able to reconstruct my file?I use CubeMX Version 6.9.2 under Windows 11 Thanks,Jan
Hello,When I add a .bat script to:Project-Manager -> Code Generator -> User Actions -> Before/After code generationI figure out that CubeMX freezes when the Outputs window is disabled.It is especially problematic when launching a CubeMx script.Do you know where it comes from? And how to avoid this undesirable behavior?Thank you for your answerPS: Is it possible to run scripts other than .bat files ?
Hi everybody I have errors in code mainly in RTOS file and TASK file after Updating the new STM32 CUBE MX generating code any one have any idea about these things note :My code is working fine with old version of STM cube Mx i am using IAR workbench
My project running on STM32G071 uses LL drivers for ADC and USART. The configuration code is generated by STM32CubeMX. It works fine. However after adding I2C HAL module which connects to a sensor to the project, the I2C function HAL_I2C_IsDeviceReady() always returns HAL_ERROR. To investigate it, I created a simple project. It only has I2C. If selecting HAL driver for RCC and GPIO in the CubeMX, the returns from HAL_I2C_IsDeviceReady() and HAL_I2C_Mem_Read() are correct. but it selects LL drivers for RCC and GPIO, and I2C stays as HAL, the return from HAL_I2C_IsDeviceReady() is HAL_ERROR.Any idea what is wrong? Is it possible to mix use HAL and LL like this?Many thanks!
Like subject when I powered on my mcu board and sent '.bin' file first, it occured an error "The image size is higher than the allowed space memory".But Sent same '.bin' file again, it's OK.I used to STM32F429ZI, IAR Compiler and Menu.c & .h , common.c & .h, Ymodem.c & .h, flash_if.c & .h on STM32F4 IAP Example project.i can't guess my problems, so i need your help.Thank you in advance.
The STM32CubeMX User Manual (UM1718 section 3) and various threads on this forum lead me to believe I can customize the folder structure that CubeMX uses for where it puts the code files it generates. I'm not trying to do anything fancy, I'd just like to put all the .c and .h files that CubeMX generates in one BSP folder instead of the /Core/Inc and /Core/Src folders that it defaults to.Seems like some file somewhere in the C:\ProgramFiles\STMicroelectronics\STM32Cube\STM32CubeMX\db\templates directory will have the magic code, but I haven't been able to find it.Is generating a custom folder structure possible and if so how?Thanks
I'm trying to run the X-NUCLEO-GFX01M2 X-Cube-Display Hello World Demo on my NUCLEO-L476RG board via SPI, but I can't get past the BSP_LCD_Init function. In the lcd_io.c file, a BSP_ERROR_UNKNOWN_COMPONENT error is returned after this condition: if((ST7789V_LCD_Driver.ReadID(LcdCompObj, &id) == ST7789V_OK) && (id == ST7789V_ID))is not fullfilled.
CubeMX generates a file called "partition_stm32h563xx.h", this file contains the settings of which interrupts are available in the non-secure area, when trustzone is enabled.For stm32h563 the generated list of interrupts is wrong.There are many interrupts, which doesn't exist, while other interrupts are missing and some are in the list, but at a wrong place.The result is many interrupts are not working in non-secure.It can be manually changed in the "partition_stm32h563xx.h", but it has to be done every time code is generated
I am using STM32CubeIDE 1.13.2 with STM32CubeMX 6.9.2-RC4. It is an STM32F746 processor. I'm using STM32Cube_FW_F7_V1.17.1 libraries. I'm using Azure RTOS and selected TIM12 for the HAL tick time base.This is a side issue. When TIM12 was selected, the TIM12 IRQ priority is set to 15 in the NVIC settings. I found Azure to mess with how often the TIM12 period expired interrupt would actually occur. While trying to figure that out, I discovered the other issue discussed next. That issue was needing to set the interrupt priority high enough it always happened. I set it to 0 and that made the HAL timer tick work properly. Why isn't this automatic or at least flagged when a TIM is used?I'm also using the Register Callback option for my code. This is in CubeMX, project manager, 'Advanced Settings' on the column, TIM set to enable. I was curious if the HAL timer would adapt.This is the generated code in stm32f7xx_hal_timebase_tim.c. The function
I have brought STM32410C8T6 controller for for out project.In STM32 Cube IDE Work space this STM32410C8T6 controller part number not available.please some tell why it is not showing.any other solutions for this.
According RM0456, section 33.4.27 Data management, p. 1287"The offset can be used to convert unsigned data to signed data (for example, in 14-bit mode, the offset value is equal to 0x2000). The offset correction is also supported in oversampling mode. For the oversampling mode, offset is subtracted before OVSS right shift applied."This is the good news. The bad news is that CubeMX believes that the opposite is true.But then on page 1304 in section 33.4.31 Oversampler I found this statement:"Offset correction is not supported in oversampling mode."Could anyone explain? I am confused.My tests show that offset and oversampling can be used simultaneously, but it is quite possible that after several hours of working with this technology I start seeing things.
Hello I creat a new broject on STM32 Cube MX and then ı press generate Code button with toolchain STM32CubeIDE but ı use atollitic 9.3 ver to debug my code but when ı press debug button on atollitic. this warning appear. Someone can help me please ?????
LWIP/ V6.5.0. STMH32H735_DISCO (https://github.com/stm32-hotspot/STM32H7-LwIP-Examples) .Rx_PoolSection. (former .RxArraySection) seems not to be guarded by the MPU against cache coherency issues. Is this the right way? I have compared 2 STMH32H735_DISCO_Eth examples, one built under cube IDE V6.2.1 and a more recent one built with IDE V6.5.0. (thanks to @pavel A. for providing the reference to the new examples on GIT).The V6.5.0. example moved the Rx_PoolSection/RxArraySection from AHB D2 RAM to AXI D1 RAM. The MPU configuration in the example seems not to protect the Rx_PoolSection/RxArraySection area from cache coherency problems any more. Can such a protection be omitted and if so why? I made a very detailed .doc describing in detail my findings, it is attached to this post.
I have a STM32F407 with an SD card wired in 4-bytes mode and FATFS middleware to manage the files.I upgraded to STM32CubeIDE 1.11 two weeks ago, but since then the SD card stopped working. The initialization fails in the SD_WideBus_Enable function, since scr[1] is read as 0 (file stm32f4xx_hal_sd.c).I noticed that this behavior disappears when I set hsd.Init.BusWide = SDIO_BUS_WIDE_1B in MX_SDIO_SD_Init (file sdio.c). This, however, was changed in SDIO_BUS_WIDE_4B in the newer version of the IDE, breaking the functionality.I was not able to check whether the SD actually works in 4-bits mode when initialized to SDIO_BUS_WIDE_1B, but I think so, since the HAL_SD_ConfigWideBusOperation gets called with 4 bytes.So, is it correct to continue using SDIO_BUS_WIDE_1B? If so, how can I preserve it, since every time I let Cube to generate the files the modification gets overwritten?
Trying to download Algobuild for CubeMx for Mac. The software package selector says it needs to be downloaded. There is a yellow triangle with an exclamation next to the word "Download". Clicking it does nothing and no explanation what the yellow triangle means. I tried to download the algobuild package from the ST.com website but it keeps trying to load in a windows environment and I can't see a method to import into the Mac CubeMX. There is a local directory file structure to import but again it is only showing my virtual machine windows directory structure and not the Mac environment.
We are pleased to announce you that the official release of STM32CubeMX V6.9.0 is available for download here What is new in STM32CubeMX V6.9.0? Added the support for new microcontrollers in the STM32U5 series Added the support for new microcontrollers in the STM32WBA series Added the support for two new boards related to the STM32U5 series: STM32U5G9J-DK1 and STM32U5G9J-DK2 Added the support for one new board related to the STM32L4+ series: STEVAL-SMARTAG2 Added the support for the memory management tool for the STM32H5 and STM32U5 series Added the support for new boot paths for the STM32H5 series Added makefile generation in dual context for the STM32H7, STM32L5, and STM32U5 series Added hierarchical project support in the Example Selector for the STM32U5 and STM32WL series Added user authentication functionality Added the support for processing before and after code generation Upgraded the JDK11 to Adoptium™ Termurin™ 17.0.6 Main fixed issues 121529 [Example selector] Managem
It would be very useful and I think relative easy to implement: To have an alternative pinout view but instead of the the IC, a view of the nucleo board with the morpho and arduino connectors.Something like this but interactive: https://os.mbed.com/platforms/ST-Nucleo-G474RE/#morpho-headersThanks for taking it into consideration.
Hi,I have got a problem here with stm32cubemx whenever i select generate code i will get a dialogue box as not a valid .ioc filecould you please provide solution for this
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.