Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello!I'm working with STM32G0B1 MCU and using CubeMX, I've enabled RCC_MCO for PA9 pin (HSI 16 source, 128 as prescaler) and a simple Input for PA8 pin. The code was generated to CubeIDE and "SystemClock_Config" function calls this method at the end: HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_128); But I noticed that both PA9 and PA8 outputs 0.125 MHz, even "MX_GPIO_Init" function setting correctly the pins!Searching on HAL files, I found that "RCC_MCO1" defines to "RCC_MCO_PA8", so CubeMX should config MCO as "RCC_MCO_PA9".Can we confirm this as a bug?
When FreeRTOS is enabled in STM32CubeMx for STM32F4 MCUs, the generated code should create the tasks already configured by the user.In this context, a regression was detected in the latest STM32CubeMX version (6.7.0) and only with the STM32F4 series of MCUs.As a result, we propose this temporary solution while the fix is implemented in a future release. To put it in place, follow the step described down below. And please if you are not using an F4 we advise you to not apply this solution.1. For windows:1.1. STM32CubeMx standalone:1.1.1. Download the file found under this link.1.1.2. Extract the “FREERTOS-STM32F4xx_Configs.xml�? file from the downloaded archive.1.1.3. Copy the file to the following directory found under the STM32CubeMx installation directory “db\mcu\config�?.The default path is: “C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu\config�?Adapt the path to your case if you have changed
HI, I am using STM32F429IGT6 with freeRTOS in CMSIS osV2. CubeIDE V1.11.0 with MCU package F4 1.27.1.After code generation, cubeIDE doesn't initialize the tasks and it has to be manually added. But bigger problem is, user code space can't be used between kernelinitialize and kernalStart. it gets deleted after each code generation. for example, blink01Handle and blink02Handle will get deleted after each code generation. /* Init scheduler */ osKernelInitialize();/* USER CODE BEGIN Header */ blink01Handle = osThreadNew(Startblink01, NULL, &blink01_attributes); blink02Handle = osThreadNew(Startblink02, NULL, &blink02_attributes);/** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Co
My project was generated a few months ago (LWIP + FREERTOS on M7). The project was working without an issues. A few days ago I wanted to include CAN interface and after converting IOC to latest version, I have issue: LWIP was deactivated. I am not able to activate LWIP just for M7. LWIP can be activated M7 + M4. If I active LWIP on both cores, I am not able to use FREERTOS
HII use Cube MX with STM32U585RIT6. When I use ADC4 In3 In4 In9 In22 and In23, the channel In9 is not properly initialised. I must add this manually :/* USER CODE BEGIN ADC4_Init 2 *//** Configure Regular Channel*/sConfig.Channel = ADC_CHANNEL_9;if (HAL_ADC_ConfigChannel(&hadc4, &sConfig) != HAL_OK){Error_Handler();}/* USER CODE END ADC4_Init 2 */With the STM32U585VIT, I have the same problem with channel9 dont work Then it work. I have this probleme in CubeMX from 6.9 to 6.11 versions.
I'm working on page 30 of the STM tutorial for the B-G474E-DPOW discovery kit at this linkhttps://www.st.com/resource/en/application_note/dm00706304-buck-current-mode-with-the-bg474edpow1-discovery-kit-stmicroelectronics.pdf I get this warning when I try to follow the directions Can someone explain how to fix this so I can move to the next step in the tutorial.I've tried looking up codegen in the reference manual and also how to manipulate ADC12.ThanksDave
Hi, I'm unable to use the STM32Cube FW_U0 V1.1.0. I have downloaded the package in Cube MX - Version 6.11.1 however when trying to create a project using the "Start My project from Example - ACCESS TO EXAMPLE PROJECT SELECTOR" i get the following dialogue: Regards Sean
Currently i am working with one pulse mode in stm32f030c8t6. TIM15, slave mode = Trigger mode,Trigger source=TI2FP2, and channel = PWM channel CH1 ,Input and output frequency 50Hz. My problem is whenever i connect the trigger input pulse,(From external optocoupler circuit) the input pulse disappears (observing with the help of CRO).And no signal at the output also.If i generate a 50Hz square pulse from the same controller and giving it to the trigger input, then the input signal level will reduce to half voltage(but it is giving the output properly). The code is given below. This code is working fine with stm32f103c836(there is no dip in the input signal level also).What is the actual problem?. help me to solve this problem.code--------HAL_Init();SystemClock_Config(); MX_GPIO_Init(); MX_TIM15_Init();HAL_TIM_OnePulse_Start(&htim15,TIM_CHANNEL_1); TIM15->CCR1 =20000;//maximum value 47999//prescalar 9while (1) { HAL_Delay(100); }
Hi! After a few days of working on a project where I mostly added existing source files to the project as virtual links, I started getting this error message. At first it didn't appear to actually affect anything, but then after a few times the code generation no longer worked. I deleted all project files and re-generated everything, which helped for a while but then the error came back. I have attached the mentioned log file and also my ioc file. Any idea why this is happening? I am working with STM32cubeIDE
When choosing a crystal for STM32, the essential information is in table 5 and table 7 of AN2867. Table 7 is ordered by crystal: if you have a crystal, table 7 of AN2867 lists the stm32 processors where the crystal works.STM32CubeMX already knows what STM32 processor is used. The STM32CubeMX "clock configuration" knows what crystals are needed.Imagine a tool within STM32CubeMX, where one selects- Temperature range: commercial or industrial- Crystal size in mm- Frequency tolerance in ppmand is given a list of crystals that work, with their gain margin.
Dear ST Officials, Greetings! I have run into some issues whilst using STM32CubeMX, which I hope you could assist me with. I'm able to find the required Example using the Example Selector, but I am unable to open it. Notably, it displays NA under STM32CubeMX Minimum Compatible Version, which I suspect is the reason I cannot access the project. However, I am unclear about how to go about fixing this. I'm in urgent need to use this particular Example. I managed to open the Example on the IDE and even run it successfully, but I also need to open it in STM32CubeMX as I need to make certain amendments to the program. I intend to deploy a fully trained neural network using CubeAI in the program. Your guidance on this matter will be greatly appreciated. The development board I'm using is H747I-DISCO and the Example I need is DCMI_CaptureMode. I look forward to your prompt response. Sincerely,
The login function greatly affects efficiency!!!cubemx Version 6.11.1I just want to install the G0 pack. But I cann't login even using VPN. My net works very well! So I can only download it from the official website and then install it locally.The STM32CubeG0 was installed successfully.Then I want to install Patch_CubeG0.What the ***?Are you joking? Today my boss asked me why I haven't finished writing the code. I said that the firmware package installation failed, and ST said that I had a network problem. The boss said that my ability is very poor and I should not come to work in the future.Why is it so difficult for R&D engineers to be R&D engineers?
Hello,I think I might have found a bug source in the CubeMX's generated code, when two components of a same driver share the same clock.Here I'll use the example of the ADC 1 and 2 of the STM32H743GTV6 but I have see this case a few times elsewhere.As the two ADC use the same clock, to avoid initiating it while the other is already using it, a check variable is used: static uint32_t HAL_RCC_ADC12_CLK_ENABLED=0; void HAL_ADC_MspInit(ADC_HandleTypeDef* adcHandle) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(adcHandle->Instance==ADC1) { /* USER CODE BEGIN ADC1_MspInit 0 */ /* USER CODE END ADC1_MspInit 0 */ /* ADC1 clock enable */ HAL_RCC_ADC12_CLK_ENABLED++; if(HAL_RCC_ADC12_CLK_ENABLED==1){ __HAL_RCC_ADC12_CLK_ENABLE(); } /* Some code */ } else if(adcHandle->Instance==ADC2) { /* USER CODE BEGIN ADC2_MspInit 0 */ /* USER CODE END ADC2_MspInit 0 */ /* ADC2 clock enable */ HAL_RCC_ADC12_CLK_ENABLED++; if(HAL_RCC_ADC12_CLK_ENABLED==1){ __HAL_RCC_ADC12_C
Hello everyone,I generated a code for having ethernet on stm32f407 discovery board.I just enabled lwIP and ethernet in cubeMX and nothing more.when I compiled the generated code in KEIL 5.29 Arm Compiler version5, everything is OK, but when I change compiler to Arm Compiler version6, I got this error. I've got 83 errors because of missing <sys/time.h>Thanks for you're answers.../Src/lwip.c(21): warning: In file included from... ../Inc\lwip.h(28): warning: In file included from... ../Middlewares/Third_Party/LwIP/src/include\lwip/opt.h(52): warning: In file included from... ../Middlewares/Third_Party/LwIP/src/include\lwip/debug.h(40): warning: In file included from... ../Middlewares/Third_Party/LwIP/src/include\lwip/arch.h(48): warning: In file included from... ../Middlewares/Third_Party/LwIP/system\arch/cc.h(46): error: 'sys/time.h' file not found #include <sys/time.h> ^~~~~~~~~~~~ 1 error generated. compiling lwip.c... ../Src/main.c(23): warning: In file included from... .
Hello everyone.First, sorry for my english. I'm still learning, and i'm trying to write this text without using google translator.I found one problem in the Cube MX (already solved), in the generation code in a specific case, and I don't know where is the correct place to post it, I think that is here, but if not, please tell me where it is.I always generate code in the Project Manager to use MKD-ARM V5.32 using "Copy Only the necessary library folder" option in the "Project Manager/Code Generator" tab, but this creates a lot of unecessary duplicated files.Today I try the option "Add necessary library files as reference in the toolchain project configuration file", and the code does not compile, for "No such file or directory" error.My user in this computer is "Cristhian Guedes", with a space between the words, and the CubeMX is generating links to Include folders using "CristhianGuedes" directories. For exemple, the include path is generated:"C:/Users/CristhianGued
Hello,I am new to STM platform and working on a project using the STM32U5A9J-DK Discovery kit. I need to create a FreeRTOS-based application that utilizes the Octo SPI driver to access the octal SPI flash along with other interfaces.I've been following the available resources online, but I am encountering issues. Specifically, I can't find the FreeRTOS option under the Pinout & Configuration tab -> Categories. I can see the X-CUBE-FREERTOS option, but I am unable to enable it. I have attached a screenshot of the issue I am facing.Could someone please provide me with a detailed, step-by-step guide to create a FreeRTOS project with the Octo SPI driver for the STM32U5A9J-DK? Any help or pointers would be greatly appreciated.Thank you in advance!
Hello,I have NUCLEO-H755ZI-Q ST Board. To initialize the board, I used the STM32CubeMX initialization code generator ("Start My project from ST Board").The Debug in this initialization is set to "Disable" (i.e., no Serial Wire or JTAG is active).How the onboard embedded ST-Link operates with debug disabled setup?BR, Chaim
When press enter after text on "Packet Description", Packet generated successfuly and did i uploaded to git. but it did not appierd on cube mx. after delete the enter from end of "Packet Description", it worked.
Hi All,I am trying to setup a build pipeline for the STM32 platform to be able to compile projects in an automated fashion. So far, I have an .ioc file which I use the to generate the project using the STM32CubeMX commands which are invoked via the script in the cli mode. The flow works on an Ubuntu machine which supports GUI. However, when I try to containerize the flow into a docker container, the build breaks as the STM32CubeMX tries to render a progress bar for the Loading IOC step followed by a Rendering UI progress bar. It is not possible to load display components on the docker and hence STM32CubeMX code generation fails. Is there any way to launch STM32CubeMX in a headless non-gui mode so that we can run this on headless machines?This is the UI that pops up.The following is the contents of my script fileconfig load <filename>.ioc project name app project toolchain STM32CubeIDE project path <path> SetCopyLibrary copy all SetStructure Advanced proj
Hi,While configuring STM32F446RE on CubeIDE for writing and reading on SD Card using SDIO mode (1 bit mode), when I'm generating code I get this error message : - Main Config: These peripherals still have some not configured or wrong parameter values: [FATFS, Verify the Platform Settings Tab , Clock] I cannot find a way to resolve this error. I click on generate the code anyway.Kindly help
Hi, I'm using the STM32H563ZIT6 microcontroller with an 8 MHz external crystal oscillator. I have set the HCLK to 250 MHz, and my GPIO LED program is working fine. However, whenever I enable DAC channel 2, I encounter an HCLK configuration error. The system automatically sets the HCLK to 64 MHz, but I need it to remain at 250 MHz. My question is: why does enabling the DAC cause a clock configuration error, and why does the HCLK automatically change to 64 MHz? is there any clock setting to modify? When I disable the DAC, the HCLK works perfectly at 250 MHzi was enabled the DACafter giving resolve clock issues it automatically generating 64mhz for hclk
Hello,I would like to know how to configure the SD card of an STM32L552E-VE evaluation board, I have an example with this evaluation card 'FatFs_uSD_Standalone' but It's not easy for me to understand how to configure the 'SDMMC' with this board since there is no '.IOC' file. I have the example code but not the '.IOC' configuration file. Can anyone tell me how to configure the SD card via STM32CubeIDE ?Thank you for helps.
I have a custom board with LSM6DSV16XTR connected to SPI2. The configuration was created by CubeMX 6.11.1 and now used in CubeIDE 1.15.1 Now, I am wondering how to use the functions in lsm6dsv16x.c ? Do I have to initialize an object of type LSM6DSV16X_Object_t before calling LSM6DSV16X_Init( LSM6DSV16X_Object_t* ) ? Shall LSM6DSV16X_RegisterBusIO() be called before and if so, what are the correct parameters? Any hints are welcome.
Why isn't VREFBUF enable available in CubeMX for the STM32L432 series? I believe the reference manual says this series has control over the VREFBUF. It also seems there's no struct for VREFBUF control in the stm32l432xx.h file.
6.11.1 with STM32U575RITxwhen I click "CMSIS RTOS2" to enable the installed middleware X-CUBE-FREERTOS, mouse shows a busy icon and the FreeRTOS configuration in the bottom panel never opens. STM32CubeIDE can open the IOC file and the FreeRTOS configuration panel is displayed there fine. 2024-06-23 22:29:08,573 [INFO] ThirdParty:1030 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-TOF1 3.0.0 2024-06-23 22:29:08,574 [INFO] ThirdPartyModel:298 - Start build external matchings 2024-06-23 22:29:10,742 [INFO] ThirdPartyModel:316 - End build external matchings 2024-06-23 22:29:10,778 [INFO] LoadServerUpdatesThread:375 - End of LoadServerUpdate Thread Jun 23, 2024 10:29:38 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode WARNING: Could not lock System prefs. Unix error code 2. Jun 23, 2024 10:29:38 PM java.util.prefs.FileSystemPreferences syncWorld WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock. 2024-06-23 22:
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.