Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello,I followed all instructions and created new example project in CubeMX for CubeIDE. Then I used the vsCode extention to import an existing project with the .cproject file. How should you now open the linked source files to be able to edit the files? Since the .cproject file is in the "STM32CubeIDE" Folder and the Src files are located in the "Src" folder it is not opened by by vsCode.Are you suposed to change the projects folder structure, or is there an other way, to keep the structure as it is intended by STM?
When using STM32CubeIDE 1.12.0 with a NUCLEO-U575ZI-Q, the code generated use pullup for the LEDs. It become impossible to achieve low power with those pullup.
Hello, community.So, we are using STM32F753 and activated the LWIP library from the CubeMx.We use a UDP socket to send strings (used as commands for our own made CLI protocol).When reading the Rx buffer in the STM, we see that the strings are sometimes received wrong.For example, we send the following strings over the UDP (the content itself is not important):"ver 4d" - Received correctly in the Rx buffer"pwmgen 100 ef" - Received as "pwer" (some kind of a mix with the previous packet)This mix causes misreading of the string and therefore the CLI protocol not working.We hope to find some direction to the solution.If any more details are needed, I'll be happy to provide them. Thanks,Raz
The generated code in rtc.c passes zeros in GPIO_InitStruct to HAL_GPIO_Init, causing assert_param(IS_GPIO_PIN_AVAILABLE(GPIOx, (GPIO_Init->Pin))); to fail. void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(rtcHandle->Instance==RTC) { /* USER CODE BEGIN RTC_MspInit 0 */ /* USER CODE END RTC_MspInit 0 */ /* RTC clock enable */ __HAL_RCC_RTC_ENABLE(); __HAL_RCC_GPIOC_CLK_ENABLE(); /**RTC GPIO Configuration PC13 ------> RTC_OUT_CALIB */ HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); /* USER CODE BEGIN RTC_MspInit 1 */ /* USER CODE END RTC_MspInit 1 */ } }Project settings:STM32L071RBtx processor Generate peripheral initialization as a pair of .c/.h filesEnable Full Assert checkedFirmware Package Name and Version: STM32Cube FW_L0 V1.12.1Version 6.6.1 of STM32CubeMXRTC Settings:Activate Clock Source checkedCalibration set to "Calibration 1Hz"PC13 configured as RTC_OUT_CALIB.
Hi there,I am using the latest CubeMX to generate code for B-L475-IOT01A with FREERTOS and X-CUBE-BLE1 4.4.0. However the code it generate does not even build. I tried various samples, including SensorDemoBLESensor, Beacon, but yield the same result.The build message indicated that MX_BlueNRG_MS_Init() is missing. Apparently it is missing an entire suite of source code. I attempt to port the code over from a Nucleo sample code but was unsuccessful.Please kindly help to fix. Thanks!
Hi,I'm wondering whether I'm always getting into the HAL layer when configuring a project using the CubeMX configurator in STM32CubeIDE? Is it configurable? How to I get rid of the HAL layer while still being able to use the configurator? Where is the decision taken?EDIT: found it. was up to delete my question but I'll leave the answer here anyway.In the project manager tab one can configure whether one wishes to generate HAL or LL code.
When I use CubeMX in CubeIDE, the drop-down box for selecting a chip always closes automatically before I click. When I edit ioc files in CubeIDE, the chip area and the middle function selection area often flash. Especially in the Software Packs Component Selector, there may sometimes be situations where various buttons overlap,like this:I have reinstalled the Java and Cube IDE several times, and running with compatibility settings has not resolved these issues. I want to know why these phenomena occur, and whether I need to reinstall the operating system to make it work properly.
When I try to migrate project (.ioc) from STM32CubeMX V6.5.0 to STM32CubeMX V6.8.0 (STM32Cube FW_F3 V1.11.4 used) the following hint pops up:After selection of 'Migrate' or 'Continue' the following error pops up:My question:Is there a way to migrate STM32CubeMX-Project-File without using STM32CubeIDE?Rowley CrossWorks for ARM is used for code development.
I'm building several projects based on STM32H745 and upgraded to STM32CubeMX 6.8. Upon doing so, VOS0 no longer is an option when using PWR_DIRECT_SMPS_SUPPLY:6.7: Now with 6.8: Of course, this changes all the peripheral speeds and causes many problems with existing applications. I don't think this is correct. I have an incredibly simply project that does nothing other than initialize FDCAN using generated code which immediately goes into Hardware Fault. Using 6.7, this does not happen at all.
..
Hello to everybody,I have program for stm32f103 mcu. Now I want to do my SPI transmit routine using interrupt.Before:HAL_StatusTypeDef status = HAL_SPI_Transmit(&afe_spi, (uint8_t*) pData, 4,100);Now I tried this (and many variants also):HAL_StatusTypeDef status = HAL_SPI_Transmit_IT(&afe_spi, (uint8_t *) pData, 4); while (status != HAL_OK){ status = HAL_SPI_Transmit_IT(&afe_spi, (uint8_t *) pData, 4); }But data isn't sended. And in debug mode i can see:My project settings:Other interrupt also not works.Best regerds, Egor
When generating a blank project for a STM32G4A1KEU6 I'm able to debug the code.As soon as FreeRTOS is added (USE_NEWLIB_REENTRANT activated, Time base source is TIM6, Debug is Serial Wire) and no other peripherals are activated, I'm not able anymore to debug the code which comes after osKernelStart().The processor is debugged using a ST-Link V3SET, pins SWDIO, SWCLK and NRST are connected to the ST-LinkWhen running the debugger, following error message is shown in a new window:Break at address "0x1fff4cf8" with no debug information available, or outside of program code.Can someone please help me out and tell me how to solve this problem?
Hi,I want to switch a project in cubemx from stm32f407 to the stm32h753. (both lqfp100in cubeMX 6.8.0 there is this pinout feature to show compatible cpus. cubeMX lists me all the variants of the stm32F4, L4 and F7 but there are no H7 listed.Is there a reason for that i'm missing?or is there another way to change my cubemx project to h7?regards
Hello,I'm working with:STM32CubeMX version 6.8 (last version)STM32F4 FW version 1.27.1 (last version again)And, when generating a project with FreeRTOS, the FreeRTOS version is 10.3.1This version has been released more than 3 years ago!! It is completely out of date. Who would start working on a 3 years old version when there is an LTS version few months ago?? The current LTS version is 10.5.1!!It seems that this problem is caused by the (very very) long ST CMSIS development delay.CMSIS that is not so convenient:lake of some of the functionsNot so much support compare to FreeRTOS forumSo, what about the possibility for CubeMX to generate FreeRTOS code, without CMSIS, and with the LAST VERSION of FreeRTOS?Thank youAntoine
Hi Guys,In STM32CubeIDE I start a new project for this board, I leave everything in the ioc unchanged and generate the code.The call to MX_USB_OTG_HS_HCD_Init() works correctly.I now change in the ioc: USB_OTG_HS Internal HS Phy from host_only to device_only and regenerate the code.Now the call to MX_USB_OTG_HS_PCD_Init() ends up in the Error_Handler(), this is caused by a timeout in USB_CoreReset().Does anyone have any ideas why this might be?Many thanksAndy
Hi, I recently had to update the LSE Drive Capability from "low drive" (0x00) to "medium high drive" (0x02) for an STM32U575 project. After making this change in STM32CubeMx and programming the micro with the newly generated code, I noticed the updated LSE drive level was not being set, it was still using the previous value.Upon further debugging, I noticed the generated code is not disabling the LSE before updating the the drive level via `__HAL_RCC_LSEDRIVE_CONFIG()`. This appears to be a bug with the generated STM32CubeMx code.My fix has been to disable the LSE before the function `SystemClock_Config()` gets called, which will then perform the LSE drive level configuration, as a well as, enabling the LSE. However I want to check if this is the proper way to set the drive level or if anything else should be done.
There are times where I would like a message queue of a single depth. In some similar OSes this is also how semaphores are created. I have hit a near brick wall in STM32CubeMX failing to create a queue with just one element.In this case for the STM32F4 library, I get the following call where I set a "Queue Size" 1 in:Middleware -> FreeROTS -> Tasks and Queues -> Queues -> Queue Size.This creates a function:I2CWriteQHandle = osMessageQueueNew (2, sizeof(i2c_data_type), &I2CWriteQ_attributes);Note the "msg_count" argument is 2, despite all the I2CWriteQ_attributes being consistent with those being set in ST32CubeMX. If the queue is increased to say 16, msg_count remains at 2. Other queues with a osMessageQueueNew "msg_count" set at 16, remain at 16.If I manually correct the "msg_count" argument, the new value is retained when (re)generating the code.I presume this behaviour of unlinking "Queue Size" "msg_count" is unintened and not sure when this issue started. BTW I am u
I'm using STM32F103C8T6 controller and I want to connect MAX30003 breakout board. Which preferences it's better to use for the best performance (STMCubeMX)? Can I communicate it with an SPI slave using the UART1 synchronous mode (configured with CubeMX, using the LL library)??
Hi, I have created a project with Keil compiler (v5.17 )and I'd like to use the CMSIS driver for SPI.When I selected CMSIS in RTE, it tells me that I need CubeMX for configuring the HAL.I used CubeMX for generating the code, but there are many errors in the compiler.Best regardsLuca
I configured some devices (UART1, UART3, SPI1) in the .ioc file of an STM32F103 project.Just wonder why TIM1 is greyed out and in italics, unavailable?
I have a Nucleo F746ZG board with 8742A Phy. I am just trying to ping the device. I compiled and ran the LwIP example. The device IP doesn't show when looked at from the terminal (arp -a). JP6 and JP7 are on and the board is on stock configuration. On board, LEDs indicate that the link is connected, ethernet port LEDs are also working. What might be the problem with this issue?
FreeRTOS project: code generated includes code in Drivers/CMSIS/Device/ST/STM32F4x/Source/templatesFile is of definitions, likely stm32F4xx.hThis conflicts with the file included at Drivers/CMSIS/Device/ST/STM32F4x/Include.This seems to only happen when using FreeRTOS and CMSIS V2 interface.Did you mean to include something like stm32F4xx.C in the templates location?The information is redundant, giving me about 8 multiple definitions. Deleting the template file produces working code.This has been around for a long while.
STM32CubeIDEVersion: 1.12.0STM32CubeMX: Version: 6.8.0-RC4I think this is a BUG!When in CubeMX perspective in CubeIDE, in the project manager Advanced tab, in the Register Callback window, if you ENABLE the register callback for SD and save or generate code, the SDRAM register callback setting automatically flips to ENABLE. The two setting should be mutually exclusive and if you are not using SDRAM in your code this may cause numerous compile errors. The ENABLE setting for SDRAM does not change when you initially select ENABLE for SD (SD card), but only after you click on save or generate. Kind of sneaky and if you blink you will miss it.
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.