Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
For some reason after the 5.2.0 update, CubeMX refuses to launch from the Finder:> You have macOS 10.12.6. The application requires macOS 10.13 or later.which is obviously not correct since I can still run this very application from the terminal just fine.
I open a project in CubeMX and specify not to use Default Firmware location and set the customer firmware location. I save the project and close the IDE. When opening the .ioc file in a text editor everything seems fine.When I open the project in CubeMX again it has switched back to using the default firmware location.
Latest update to HAL library used to generate code with CubeMX brought among else assignable peripheral driver callback functions, a very nice feature. Per documentation, assignable callbacks are enabled by specifying 'USE_HAL_***_REGISTER_CALLBACKS' compiler symbol, where *** are replaced with selected peripheral.However, when this is done project fails to build properly, with compiler outputting this cryptic error messages:arm-atollic-eabi-gcc: error: 1: No such file or directoryarm-atollic-eabi-gcc: error: =: No such file or directoryarm-atollic-eabi-gcc: error: 1: No such file or directoryarm-atollic-eabi-gcc: error: =: No such file or directoryI'm using Atollic Truestudio with CubeMX 5.2.0. It happens both with STM32CubeF4 Firmware Package V1.24.0 and STM32CubeF7 Firmware Package V1.15.0.
Dear community,we want to enable the DFSDM1 module in SPI mode for the STM32H743ZI with the latest STM32CubeMX, Version 5.1.0 and the STM32Cube MCU Package for STM32H7 Series, Version 1.3.2 on MacOS.If we understand it correctly, the internal DFSDM clock f_DFSDMCLK which is used to drive the DFSDM module is configured by the RCC block and is derived from the system clock SYSCLK or peripheral clock PCLK2. According to [1], this internal DFSDM clock must be at least 4 times faster than the external serial clock, whereas the external clock is limited to 20 MHz.According to [2], the INTERNAL clock is NOT limited to 20 MHz like the external clock, but to SYSCLK. But after enabling the DFSDM module in STM32CubeMX with 100 MHz for PCLK2 and for the internal f_DFSDMCLK generation, we always get the attached frequency limit error in the STM32CubeMX clock configuration window. Is this a bug in STM32CubeMX or do we understand something wrong?Thanks in advance and best regards.BernardoReferen
I am using STM32CubeMX ver 5.1.0 for stm32L433, In my old projects, i use STM32Cube_FW_L4_V1.10.0 with CubeMX ver 4.Now i'm facing with two problems,First, is it possible to use STM32Cube_FW_L4_V1.10.0 with CubeMX ver 5 (I don't know how to change firmware package in CubeMx). Because it is difficult to change every previous projects i had made.Seconds, I cannot find STM32Cube_FW_L4_V1.13.0. Can you help me with that.
Hi, I just want to ask why in STM32cubeMX nor STM32cubeIDE is not option for GPIO_MODE_OUTPUT_PP? Every time I do update or I will update, I will have to update the same specification. I know that it's not such a big deal rewrite one line but maybe sometimes or someone can just forget for it and update the auto-generated settings from cubeMX and then project has problem.Real example: I have STM32F401RE and ethernet module W5100 and I have to make chip select when is needed . In cubeMX i will find only this "GPIO_MODE_AF_PP" option for SPI2 - PB12 alternate pin in GPIO -> Single Mapped Signals. But without manual setup(rewriting GPIO_MODE_AF_PP to GPIO_MODE_OUTPUT_PP), I cannot use properly the ethernet shield.link: https://www.carminenoviello.com/2015/08/28/adding-ethernet-connectivity-stm32-nucleo/
Screenshot from me.
I have enabled exti (external interrupt for gpio input) using cubemxso when i generate code , i get below code , where should i write ,between irqn_0 comments or irqn_1 commentswhat is irq0 and irq1 and how to differentiate them in the code void EXTI2_3_IRQHandler(void){ /* USER CODE BEGIN EXTI2_3_IRQn 0 */ /* USER CODE END EXTI2_3_IRQn 0 */ HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2); /* USER CODE BEGIN EXTI2_3_IRQn 1 */ /* USER CODE END EXTI2_3_IRQn 1 */}
I have a working set of electronics and a I2C Master device. These work just fine with legacy software on a I2C Slave built on STM32F0.Now I try out STMCubeMX, HAL and FreeRTOS. I let CubeMX do all the initialization of i2c-1My code is simple: uint8_t buf[2]; int rv; rv = HAL_I2C_Slave_Receive(&hi2c1, buf, 1, 1000); if( rv == HAL_OK ) buf[0]=0x12; buf[1]=0x34; else return; rv = HAL_I2C_Slave_Transmit(&hi2c1, buf, 2, 1000); if( rv == HAL_TIMEOUT ) print("this triggers all the time");I can see on the logic analyzer that the Master transmitted message arrives to slave ok, and the slave reply is sent fine. Master even receives this.But after the slave reply, there is no STOP condition on the I2C bus. This should be caused by Master (I think?), but it is not. The master side is unchanged, the only thing I have changed is create a stub Slave software with CubeMX and HAL. Is what I am doing on the Slave side correct? Or am I missing something?(apart from the HAL documentatio
I have a Swedish WIndows 10 Pro machine where the default admin username is "Administratör". I've then just installed CubeMX 5.2.0, but when I run it I realize that Cube starts to create a whole bunch of directories under C:\Users like[Administratör] [Administratör] [AdministratÃÆ'Ã'¶r] [AdministratÃÆ'Ã┼â?TÃâ? ââ'¬â"¢ÃƒÆ'ââ'¬Â âââ?s‰â?z¢ÃÆ'Ã┼â?Tâââ? s¬Ã' ÃÆ'Ã'¢Ã¢ââ'¬Å¡Ã'¬Ã¢ââ'¬Å¾Ã'¢ÃÆ'Ã┼â?TÃâ? ââ'¬â"¢ÃƒÆ'Ã'¢Ã¢à ¢â'¬Å¡Ã'¬Ãâ?¦Ã'¡ÃÆ'Ã┼â?Tâââ?s¬Ã.¡ÃÆ'ââ'¬Å¡Ãƒâ?sÃ'¶r] [AdministratÃÆ'Ã┼â?TÃâ? ââ'¬â"¢ÃƒÆ'ââ'¬Â âââ?s‰â?z¢ÃÆ'Ã┼â?Tâââ? s¬Ã.¡ÃÆ'ââ'¬Å¡Ãƒâ?sÃ'¶r] [AdministratÃÆ'Ã┼â?TÃâ? ââ'¬â"¢ÃƒÆ'ââ'¬Å¡Ãƒâ?sÃ'¶r] [Administratör]I have uninstalled Cube, deleted the directories, installed Cube again and then they come back. Please ST Microelectronics: There are other countries outside US that uses your products, and we have systems which have characters outside the old ASCII characters
Hi,when I generate a example for the STM32F407ZET everything is fine, until I check the option freeRTOSAfter this the includes are not correct anymore:STM32Cube_FW_F4_V1.24.1VS + VGDB
Hello, Whenever I generate a project using STM32CUBEMX, ir keeps generating (and updating upon re-genration) __HAL_AFIO_REMAP_SWJ_DISABLE(); into the HAL_MspInit function.This line does not allow debugging and forces to perform a series of actions to allow debugging again.Right now, I keep commenting the line out upon each regeneration. Is there a way to simply prevent it from generating?Thanks!
If I change the Sequencer setting from "Sequencer set to fully configurable" to "Sequencer set to not fully configurable", this appears to work okay, even generating code. However, after leaving the ADC category, or exiting the program, the STM32CubeMX or STM32CubeIDE program hangs the next time when trying to load the ADC configuration.This issue has been present for at least a month. Is it a bug, or is there some other configuration setting that needs to be made in concert with this to avoid the hang?Present in STM32CubeIDE 1.0.0, build 2872_20190423-2022, and STM32CubeMX 5.2.0.On a related note, is there a place that bugs can be viewed and reported?Thanks.
Dear experts,starting from an MXCube project, if I generate a project for STM32CubeIDE, I obtain a Linker Command File with wrong values assigned to _Min_Heap_Size and _Min_Stack_Size labels. Even if I change the values in MXCube tool, the values in the linker command file don't change.On the contrary, if, for instance, starting from the same MXCube project I generate a project for Atollic True Studio, the _Min_Heap_Size and _Min_Stack_Size labels are set to the correct value (They are set with the same values specified in the MXCube tool), so it seems a bug in the STM32CubeIDE generator.MXCube version 5.2.0
Create a project thus:Use the board selector to select STM32F779I-EVAL board and Start ProjectUnder Middlewares enable FreeRTOS with CMSIS_V1 (note this package uses FreeRTOS.v10)Fill out details in Project Manager. Use one of the script IDEs e.g MakefileGenerate codeView the Makefile and discover cmsis_os.c and cmsis_os.h is missing from the build.Some smarter IDEs are finding another cmsis_os.h in Drivers\CMSIS\RTOS\Template, but it's out of date (it's for FreeRTOS v9 - so actually another bug). That confused me a bit, before I got to the root cause (item 4 above).Where do I log this defect so it can be fixed?Cheers
Hello,What is the use of the Timebase Source clock inside the CubeMx (part System Core->SYS)?Why is it mandatory?Best regardsMich
Hello,this is the first time I apply in this forum and I hope that I find the right answer to my question.So, my goal is to connect two stm32 cards (for example: STM32F4) via USB.Is it possible to do that? If yes ? how can I configure both cards with STM32cubeMx?That is to say what are the necessary configurations for each card (Mode: device or host, class for FS IP: CDC, HID, MTP ...).
Hi ST,this is really not a question but suggestions.When starting a project for STM32F7x board almost 1.3 GB (!) STM32Cube_FW_F7_V1.15.0 file gets downloaded. The download often breaks, it seems like download error handling and resume is not implemented. I ended up downloading the file manually and unzipping it to user/Repository location. Otherwise it would never worked. I suggest optimizing the download process, so only files needed for the selected board/mcu are downloaded and download can be auto resumed.Some listed board names are inconsistent with product codes. For example STM32F769I-DISC0 board is listed as 32F769IDISCOVERY while its version without display is (correctly) listed as STM32F769-DISC1. Believe or not but for 20 min I was convinced my board was not supported as I could not find it. Just a bad initial experience.
Hello everyone!I have some troubles with obtaining the correct IP address of my MCU.I am running Nucleo F746ZG and I have set up LwIP stack with CubeMX. Also DHCP is turned on. DHCP server sets up "static" IP for my MCU which is 192.168.10.88. I can send UDP packet and ping my MCU using this IP, but when i would like to get that address automatically from MCU perspective I am getting 200.138.128.48 which is not correct.I don't know what might be wrong. Perhaps some mismatch with endianess?Here are most important bits of code.void udpAPP_init(void) { err_t udpErr; udpPcb1_p = udp_new(); if (udpPcb1_p != NULL) { udpErr = udp_bind(udpPcb1_p, gnetif.ip_addr.addr, 20); udp_recv(udpPcb1_p , udp_raw_recv, udpPcb1_p); size = sprintf(data, "Hello!\n\rHere's Nucleo F746ZG.\n\rUDP protocol status: enabled.\n\r"); HAL_UART_Transmit(&huart3, data, size, HAL_MAX_DELAY); memset(data, 0, 75); if (udpErr == ERR_OK) {} else {}
I believe I am experiencing a bug in CubeMX software which is not critical but is very annoying. Every time I re-generate project code from Cube, it automatically alters .cproject file, resetting C code optimizations to -O2 level. This then leads to funny behavior during debugging if I happen to forget to fix it manually.I'm using CubeMX v5.2.0 and STM32F4 series package v1.24.1 in Atollic TrueStudio.
Hello,During my development I came across this (sort of) bug which will require manual code modification if a specific FreeRTOS function is to be used.** Definition of the problem **FreeRTOS V9 has a feature to define the TCB of a task in compile time instead of run time in order to eliminate the need to Malloc the required RAM space in run-time and prevent any forthcoming problems that may arise if the RAM cannot be allocated.STM32CubeMX defines the TCB block inside the MX_FREERTOS_Init() function. using this pattern : #define osThreadStaticDef(name, thread, priority, instances, stacksz, buffer, control) osThreadStaticDef(task_name, task_start_function, osPriority, 0, stack_size, Task_buffer, &task_TCB);the place for this definition has no problem unless we were to delete a statically created task and then recreate it using "THE SAME TCB" (which is usually the case).if we were to use the same TCB , we must be able to extern the TCB definitions in other files where that task
When we start a new project in newest CubeMX 5.2.0 with STM32H743ZI, and set D1CPRE to 480MHz with external HSE, there is no solution found.
Hello,I am looking for an example of STM32FDiscovery. So I found STM32FCube_FW_F4_V1.24.0.STM32Cube_FW_F4_V1.24.0\Projects\STM32F4-Discovery\Applications\FatFs This example worked.Create USB MSC + FATFS project with CubeMx. I wrote the code using the example, but only an error occurs in f_mount().I'd like to get an example of a form created with CubeMx. Or, if anyone has solved a problem similar to mine, please let me know how.
Start a new project usin any MCU set project type to STM32CubeIDE, save the project and try to generate the source code. It fails for me. on Ubuntu 18.04
Hello freinds, I have problem with sdio and fatfs, on some sd cards value label FAT32 begining at 81 byte, valid start position 82. And offset end sector at 507 byte, in valid card in 510.Board stm32F4discovery, version stm32cubemx 5.2.0, FW_F4_V1.24.1Thank.
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.