Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I am using the STM32N6570-DK board and when I generated the project, all lines about RIF demonstrate some errors, it seems that the hal_driver doesn't add the C file about the RIF. I am wondering how I can fix it.11:50:50 **** 项目TEST-N6-2_AppliSecure配置Debug的增量构建 ****make -j16 all arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m55 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32N657xx -c -I../Core/Inc -I../../Secure_nsclib -I../../Drivers/STM32N6xx_HAL_Driver/Inc -I../../Drivers/CMSIS/Device/ST/STM32N6xx/Include -I../../Drivers/STM32N6xx_HAL_Driver/Inc/Legacy -I../../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -mcmse -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"../Core/Src/main.c: In function 'SystemIsolation_Config':../Core/Src/main.c:166:3: error: unknown type name 'RIMC_MasterConfig_t'166 | RIMC_MasterConfig_t RIMC_master = {0};| ^~~~~
HI All,I am using STM32F769 DISCO board.I have configured SD card in 1 bit moe and it works fine.But it doesn't work in 4 bit mode.The problem is in SD_FindSCR function.if(__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_RXDAVL))is never executed.Cube MX version is 6.8.1I see there are many similar post's on the forum butnone of the solution worked.I have set the clock to 12Mhz and I see thatHAL initialize sd card with 1 bit line then trying to read SCRregister to check if 4 bit data line is supported.And can't read SCR register.Maybe there are fixes to this HAL library?Thanks,
HiI try to use IP multicast function. With 6.13, i enable IGMP, and then generate code, but it seems there is no any files added(such igmp.h), these files are necessary for multicast.Could you check this IGMP feature? I have thought it's basic feature. ThanksPeter
Really appreciate updates for using proper OBJECT versus INTERFACE library type, but using CMAKE_SOURCE_DIR and CMAKE_PROJECT_NAME have very specific meaning and disallow the ability to utilize a CubeMX project in normal CMake projects. These both refer to the top level entry point of the CMake project. This breaks if there's a container project for build automation.These instances appear in both the gcc-arm-none-eabi.cmake and stm32cubemx/CMakeLists.txt - the previous instance in the toolchain definition wasn't problematic as the instances could be updated. Unfortunately, CubeMX does not respect customizations to stm32cubemx/CMakeLists.txt -- the file is lost after any automatic generation. This breaks CubeMX for easy edits if there's a need to maintain the previous behavior.PROJECT_SOURCE_DIR should be compatible and reference the proper files without breaking previous behavior (allow sub-directory CMake use and not impact the original). Would really like if there was a settable vari
I'm putting together a small test program in CubeIDE 1.18.1, CubeMX 6.14.1, on Intel MacOS 15.4.1 on a STM32F469I-DISCO and I've noticed some (possibly) incorrect SDIO initialization code.Cube generated this:void MX_SDIO_SD_Init(void) { /* USER CODE BEGIN SDIO_Init 0 */ /* USER CODE END SDIO_Init 0 */ /* USER CODE BEGIN SDIO_Init 1 */ /* USER CODE END SDIO_Init 1 */ hsd.Instance = SDIO; hsd.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING; hsd.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE; hsd.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE; hsd.Init.BusWide = SDIO_BUS_WIDE_4B; hsd.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE; hsd.Init.ClockDiv = 0; if (HAL_SD_Init(&hsd) != HAL_OK) { Error_Handler(); } if (HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN SDIO_Init 2 */ /* USER CODE END SDIO_Init 2 */ }and it always calls Error_Handler at line 24 with an error value of 0x0400'0000 (SDMM
If I find a bug in CubeIDE/CubeMX's code generation (like not turning on power to SDMMC), is there somewhere on my system that I can alter the boiler-plate code that is used to generate the project until the correction comes out in a future release?Thanks,Andrei (from The Great White North)
Hi all,I'm trying to set up a new STM32H750 project. I've created quite a few projects using CubeMX in the past, so I'm familiar with the process. However, now I'm trying to start up a STM32H750 project, and I've very quickly run into an issue. In the Clock Configurator, some of the PLL settings are greyed out (DIVR1, DIVP2, DIVP3, DIVR3) and I can't edit them. I have HSE enabled, and have PLLCLK configured, but I don't know what else I might be missing. I'm using the latest STM32CubeMX (6.14.1) Can someone point out what I'm doing wrong?
Is there a reason and fix for why some MCUs chosen in the "MCU/MPU Selector" of STM32CubeMX start a project without issue but some fail with a message dialog?"Can't create [MCU part#] [package type] Project: error when loading [MCU part#].xml file"For me, "STM32C051C6Tx LQFP48" fails in this way. But "STM32C031C6Tx LQFP48" loads perfectly fine. Two machines, one Linux host, the other WSL, each running STM32CubeMX v6.11.1.
I have been working on an application with multiple DMA channels and timers. For some reason, STM32CubeMX doesn't have the proper drop-down options for TIM15_CH2 in the DMA channel configuration. All the other timers and channels appear to configure properly:Here is the generated code. My fix/workaround is shown in RED, while the code generated by STM32CubeMX is in GREEN:Luckily, we do have the work-around, but the problem has become relatively annoying. Thank you in advance.
It's still available in the PCC section, for the User section table for the modes: Post created from a comment on this post: Meaning of IP in STM32CubeMX - STMicroelectronics Community
Hello @Sara BEN HADJ YAHYA and @all,I just came across the "eth.c and etc.h not generated" problem as mentioned in this older thread CubeIDE 1.9.0, and CubeH7 1.10.0 does not generate HAL_ETH_MspInit .In this thread, which is unfortunately read only, are two topics unanswered, maybe some people here can find out what happened to them in the meantime.1st there is a "internal ticket number" : what happend to it?2nd there is a workaround suggested which does not work around anything for me. The files are still not generated, no matter if the LAN8742 PHY component is configured or this parameter is set to UNDEFINED.I'm here on Cube V6.14.1 and H75x. I want to use the KSZ8863 switch and I'm just starting to write code for it, so it would be great to know, how to integrate my code in the code into the generated project in such a way it is "Cube compliant", e.g. disable LWIP in Cube, generate code including eth.c/.h files, rename the files, re-enable lwip in Cube and gener
As the title suggest, non-STM32CubeIDE build setup won't compile successfully with arm-none-eabi-gcc version 14.2 (the latest from ARM) while the same setup compilation is successful with 12.3. version (also supported in STM32CubeIDE). The problem is the inclusion of <math> standard library in the following files: "system_stm32u5xx.c" and "stm32u5xx_hal_def.h" files (I assume same goes for other MCUs).This is merely a suggestion to HAL support team to make HAL more compliant with newer ARM GCC versions rather than a bug. The only thing these two math-dependent files actually use is the definition of float_t and double_t. The actual code that appears useful to the HAL files I'm using is the one below (which could be made available by one of generic HAL headers):#if defined FLT_EVAL_METHOD /* FLT_EVAL_METHOD == 16 has meaning as defined in ISO/IEC TS 18661-3, * which provides non-compliant extensions to C and POSIX (by adding * additional p
I want to use the STM32G0B1CET6N and communicate to this device using USB Full Speed (FS).I chose this model, because it has the internal "HSI48 RC" Oscillator, which can direclty supply a 48 MHz clock to the USB device. Thats the configuration: The STM32 will act as a "Communication Device Class (Virtual Port Com)" I want to supply my whole PCB using the Power from the USB Port from my Laptop (5V/500mA). So I read about the "USB_VBUS"-Feature, which I think would make sense for my application.I found this in the Datasheet:I was not able to find the "USB_VBUS" activate Box in the CubeMX configurator!So thats why I think, that this model maybe does not support this option....however the Datasheet says otherwise.I am confused! Maybe it is always active, as soon as you enable USB connectivity? Please help me.
Hello ST, Today, in two separate threads, I've had to walk two separate newcomers to STM32 through the pitfalls of trying to trigger a DMA to an arbitrary peripheral from a timer event. The threads are:what-are-gpio-events-how-do-i-connect-an-event-to-a-peripheral andspi-dma-request-triggered-by-timer-compare I myself had to struggle (using the G431) not that long ago to make sense of what the CubeMX generated code does, and why it isn't usable.HAL functions HAL_TIM_IC_Start_DMA/HAL_TIM_OC_Start_DMA hardcode the DMA peripheral register to which read/write is performed, thus they are not usable. They do however perform a lot of prep work, which it is not trivialfor beginners to reconstruct on their own (which they tend to do since they can't figure out what CUbeMX is actuallygenerating code to do). This is evident by the two threads above as well as my own experience. There is no HAL API (that I know of) that allows the developer to specify the peripheral-side
Hi Team,Please help add support for MDK-ARM version 6.22. Currently highest selectable Min Version is V5.32Thanks in advance.
I am trying to configure my stm32l475 as a composite device combining a mass storage device and com port. I read that there should be an option in the "class for FS IP" dropdown to create a composite device, however I do not have that as an option. The only options listed are disable, audio device class, communication device class, download firmware update class, human interface class, custom human interface class, or mass storage class. I am using STMCube IDE v. 1.18.1, and I ran the "check for updates" option to make sure everything is up to date. Why is composite device not listed as an available option in STMCube ide?
HiFor other STM32 (I checked a STM32L452 and STM32F469) I could enable the Flash Instruction prefetch by setting “Prefetch Buffer” to “Enabled” in the RCC settings. This then set PREFETCH_ENABLE to 1 in stm32F4xx_hal_conf.h.The STM32H562 also as a Prefetch Buffer, but I cannot find the “Prefetch Buffer” option in CubeMX , and PREFETCH_ENABLE is always 0. Was the “Prefetch Buffer” moved or is it missing?As a work around I can manually call __HAL_FLASH_PREFETCH_BUFFER_ENABLE(), but having the option back would still be nice.I use STM32CubeMX Version 6.14 with the Firmware Package V1.5.0 to generate a STM32CubeIDE project on Windows 11.
If I select STM32CubeIDE as the toolchain, I encounter the following error during compilation. However, if I switch the toolchain to EWARM, the project compiles without any errors.I’ve attached the .ioc file and build log for reference. Could you please help analyze what might be causing the issue?Thank you in advance for your assistance!
I'm using STM32H7R7, and I want to configure clock with 24MHz HSE(CPUCLK@600MHz), but the CubeMX can't resolve the error automatically. What should I do? Thanks!
When generating code with CubeMx version 6.14.1 there is a new bug (compared to version 6.13.0 where it worked fine).MCU: STM32U5A5QJIxQPeripherals: ADC1/2 and/or ADC4RCC Clocksource: SYSCLKWhen you change parameter setting in ADC_Settings "Clock Prescaler" it has no effect on generated code. There should be following code (was generated like this in version 6.13.0):LL_ADC_CommonInitTypeDef ADC_CommonInitStruct = {0}; ... ADC_CommonInitStruct.CommonClock = LL_ADC_CLOCK_ASYNC_DIV4; LL_ADC_CommonInit(__LL_ADC_COMMON_INSTANCE(ADC1), &ADC_CommonInitStruct);The ADC clock prescaler setting is common for all ADCs and DAC, but in version 6.14.1 there is no code generated which sets the prescaler anywhere!
Hello,I use CubeMX V6.13.0 (now the newest version).I have find out a bug in the configuration wizzard from the FDCAN with the STM32G473.When I chose:FDCAN1, Clock Divider = "Divide kernel clock by 10"FDCAN2, Clock Divider = "Divide kernel clock by 1"Then start the FDCAN1 and start the FDCAN2, then the FDCAN2 works not with the correct bitrate.The problem is: CubeMX does not know the µC has only one "Clock Divider".See RM0440, Rev 8, at 44.4.37 (page 2011):"Note: The clock divider is common to all FDCAN instances. Only FDCAN1 instance hasFDCAN_CKDIV register, which changes clock divider for all instances."If I choice for FDCAN1 a other Clock Divider as by 1, the the bitrate calculation for FDCAN2 and FDCAN3 is bad. Please fix this bug in CubeMx,Thanks a lot.Best Regads Markus
When generating code with stm32cubemx, an interface pops up, saying that I don't have the MDK-ARM toolchain installed, but I can burn the code normally with keil5 on my computer, why is this? what can I do next?
I am having trouble creating custom queue sizes and making them work with the Heap Usage tool within CubeMX. But I found a workaround until the bug gets fixed.I created a queue using a custom item size (the message_data_t type is defined in my code):The code generation is correct: /* Create the queue(s) */ /* creation of UsbRxQueue */ UsbRxQueueHandle = osMessageQueueNew (16, sizeof(message_data_t), &UsbRxQueue_attributes); /* creation of BufferQueue */ BufferQueueHandle = osMessageQueueNew (8, sizeof(message_data_t), &BufferQueue_attributes); /* creation of SystemQueue */ SystemQueueHandle = osMessageQueueNew (16, sizeof(message_data_t), &SystemQueue_attributes); When the Heap Usage tool calculates the memory the queue needs, it incorrectly uses 4 bytes by default the heap size is wrong.My solution is to create a user constant to tell the GUI what size it is:.. then I #undef the message_data_t it creates so the code comp
When trying to run the webservice example for the STM32-F429ZI-Cube board, I'm getting the following error:Nx_WebServer Application started.. IpAddress: 192.168.23.100 FX media opening failed : 0x21There's nothing about this error in the README.md file, it suggests that I should write to RAM with the command <INSTALL_PATH>STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe -c port=swd -w <INSTALL_PATH>web_content\web_demo.binBut I can't find the web_demo.bin fileI tried with chatGPT, but it took me down a darker path and away from the solution :)What am I doing wrong in this example?
Hi developers.I have the same issue as many others, which has been posted already 4-5 times and marked as "solved" in some of them, but it is not at all the case.The CubeMX on launsching shows the first screen (splash) and then disappears.It worked a couple of times after intallation, then again after de-installation/reboot/re-installation/reboot.Watching the Task-Manager it shows a process called "OpenJDK Platform binary" which starts at high CPU and ends up to 0% but with around 200MB RAM reserved. And this can take place many times, collecting a bunch of idle/useless processes. I run it with Windows 10, latest version of JAVA and CUBE at this moment, but with a previous version on both I used to have the same issue.While unistalling, I try to find every single file I can, so that I delete each trace manually, but every time I re-install it, it still "knows" which was my last opened projects and which uC I use. Maybe ST can see it a bit seriously the topic. I suppose I am not th
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.