Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
After starting a new project for STM32H745ZI, i have had a lot of issues with code that is generated incompletely:GPIO initialization is missingFreeRTOS initialization is missing (depending on code generation settings)HAL_IncTick() is sometimes not called automatically in SysTickFor example, my gpio.c file looks like this below. (Similar for CM7 and CM4 core)The small test project I generated has defined 3 GPIO outputs on port E.So some parts are generated, but not completely./** ****************************************************************************** * File Name : gpio.c * Description : This file provides code for the configuration * of all used GPIO pins. ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under Ultimate Liberty license * SLA0044, the "Lice
..
Hello,I work with STM32F429VIT(LQPF100). I want to use the STEMWIN with CubeMX. But my project will have not SDRAM. I used parallel communication in STEMWIN settings when I used STM32F429ZI before. But now I cannot select the parallel communication option with STM32F429VIT. So I can't get a picture on the TFT screen. What should I choose for CubeMX settings?
Getting the following error:code compiles without problem. Code without a certain class compiles and can be downloaded and run. Code *with* class generates following error.STMicroelectronics ST-LINK GDB server. Version 5.1.0Copyright (c) 2018, STMicroelectronics. All rights reserved.Starting server with the following options: Persistent Mode : Disabled Logging Level : 1 Listen Port Number : 61234 Status Refresh Delay : 15s Verbose Mode : Disabled &n
I'm using STM32H745I-DISCO board. When I generate a FreeRTOS-based project in CubeMx with TIM17 selected as timebase source, TIM17_IRQHandler() function is not generated in the stm32h7xx_it.c file. If I change my timer selection to TIM15, the TIM15_IRQHandler() function is generated just fine. I'm using CubeMx 5.3.0 and generating code for IAR.Previously, I was able to generate the correct code for TIM17 timer for my STM32H743-based board with the same version of CubeMx, so I'm not sure why that worked differently - the only change was a different board/MCU choice.
I am attempting to create a program to implement SPI communication from my STM32H753XI MCU, all I did to do this was start a new project in Keil's uVision and generate the code from Cube after selecting my pinouts.Once my code was generated, however, I attempted to compile it and got 30 errors regarding identifiers that haven't been defined. These appear to be structs and enums from other header files that haven't been included in my project when I generated the code, I've listed examples below.C:\Users\User\AppData\Local\Arm\Packs\Keil\STM32H7xx_DFP\2.3.0\CMSIS\Driver\SPI_STM32H7xx.h(284): error: #20: identifier "SPI_HandleTypeDef" is undefined"" "" error: #20: identifier "HAL_SPI_STATE_ABORT" is undefined"" "" error: #20: identifier "HAL_SPI_STATE_RESET" is undefined"" "" error: #20: identifier "HAL_SPI_STATE_ERROR" is undefinedThese are just a few of them. Is this a mistake I made when generating the code from CubeMX?
I'm using the Nucleo-L4r5zi I can't send a receive a simple message using USART Communication, Which pins to configurate on the Cube MX ? should i use an FTDI (usart to usb cable) ?
Hi All,I am using stm32CubeMx and atollic true studio for initializing my stm32H743ZI controller. When I debug the code I get an error message fatal error: arm_math.h: No such file or directory I have tried many things and I am unable to resolve the issue. The problem is making me annoyed from ST?Added symbolsCMSIS Libraries also added to the path.but couldnt build the project
Do we have access to the .ioc file that is used to generate the examples in en.fp-cld-azure1
I am a begineer to stm32 it has been two months since I began using STM32 for prototype building. I am currently doing a project which involves DSP. Today I came across an application notes saying we can generate code using matlab too. Now I am confused which is a better one to use in between matlab simulink and stm cube mx ? In a long run which would pay off to gain more expertise on ?
I get the following error. Unfortunately, I can not fix that. The call to stm32_make_rtw_hook during the entry hooks generated the following error: The DefaultParameterBehavior property does not exist The build process will be terminated. to the software: STM32 MAT / Target V 4.2.2 and Matlab 2014a. #[STM32-Mat/Target] #[STM32 MCUs] #STM32CubeMX #Simulink
The matlab version is 2019a;The STM32CubeMX version is V520;The stm32-mat/target version is V442;I use matlab&simulink and stm32CubeMX to develop stm32f746Discovery.For more information, please refer to the attachment
Hello ST Community, I purchased the Nucleus 64 Eval board for the STM32F303RE part and downloaded all the necessary tools. I moved from CubeIDE to SW4STM32 as there are more examples available. I'm using UM1766 which outlines STM32CubeF3 flow very well. I am able to compile and load the example designs just fine. I'm now at the stage of writing my code into this Pre-Initialized project. What I can't figure out in the INITIALIZED project is where are the physical PINS defined. I am totally aware of all the files that the MX/SW4STM32 create via UM1786. Without digging super deep into the great work that the HAL flow has done, I still want to look through the PROJECT files and see where the physical pins are defined. In my MAIN.c, I see PC.13 as my INTERRUPT pin in COMMENTS, this is the only way I know PC.13 is the PIN. The MAIN.c refers to this PIN as "EXTI line 15_10" which is connected to PC.13. I would also like to know what suffix "15_10" means.Which file should I look into
I'm trying to port some firmware from nucleo-F334 to nucleo-G474 for the HRTIM timers and the CubeMX for G474 for HRTIM1 is not working. I found some missing statement in the initialization.I found that the CubeMX 5.3 initlization code missing a part; specifically the HRTIM clock initialization where the PLL is defined. There's a related constant that also needs to be defined. In any case can someone confirm the problem and how long it may take to get the updated patch.G474 clock initialization: PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART1; PeriphClkInit.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2;F334 clock initialization:PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_HRTIM1|RCC_PERIPHCLK_TIM1; PeriphClkInit.Tim1ClockSelection = RCC_TIM1CLK_PLLCLK; PeriphClkInit.Hrtim1ClockSelection = RCC_HRTIM1CLK_PLLCLK;Expand Post
i want to open a file in a SD_Card (mode SD 4 bits wide bus) fres=f_open(&fil, "fit5.txt", FA_OPEN_ALWAYS | FA_WRITE);but:1- the program work fine with SanDisk uSD 2GB. -> f_res=FR_OK2- the program not work with Kingston uSDHC (gen 10) 32 GB. -> f_res=FR_NO_FILESYSTEMthanksany solution?i'm using: STM32Cube_FW_H7_V1.4.0 (STM32H743ZI) and STM32CubeMx Version 5.2.1 (for trueStudio code generator).
I read about FMC(Flexible memory controller) to interface memory,but while selecting memory type in cubemx it shows only Muxed PSRAM,Muxed NOR FLASH.i haven't find any SDRAM option .which type of memory i need to select?can i interface SDRAM if i select Muxed PSRAM in cubemx?
Every time a generate the code for a makefile project, STM32CubeMX changes the optimization level to -O2. I want to be able to set it as I wish, in my current case, to -Og. How do I tell STM32CubeMX to set the optimization ion the Makefile to -Og?
When I generate a new project in CubeMx 5.3.0 for the STM32H745I-DISCO board for IAR toolchain with default peripheral initialization, I get the following code for the CM7 core:#if defined ( __ICCARM__ ) /*!< IAR Compiler */#pragma location=0x30040000ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */#pragma location=0x30040060ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */#pragma location=0x30040200uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE]; /* Ethernet Receive Buffers */#elif defined ( __CC_ARM ) /* MDK ARM Compiler */__attribute__((at(0x30040000))) ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */__attribute__((at(0x30040060))) ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */__attribute__((at(0x30040200))) uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE]; /* Ethernet Receive Buffer */#elif defined ( __GNU
I'm trying to generate a default FW image with CubeMx 5.3.0 for my STM32H745I-DISCO board with the only change being the addition of the code to blink an LED: GPIO_InitTypeDef GPIO_InitStruct = {0}; __HAL_RCC_GPIOJ_CLK_ENABLE(); GPIO_InitStruct.Pin = LD1_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(LD1_GPIO_Port, &GPIO_InitStruct); while (1) { HAL_GPIO_TogglePin(LD1_GPIO_Port, LD1_Pin); HAL_Delay(500); }So I program the FW image with IAR (both CM4 and CM7 images), reset the board, and the LED starts blinking.Resetting the board restarts the FW just fine.Unplugging the USB cable from the STLK port and plugging it back in (this cable also provides power to the board) results in the FW not running anymore. IAR can't reprogram the MCU because it can't see the target anymore. Neither can the ST-LINK utility.The Workaro
Error #545: Required gpdsc file 'E:\Kiel_Workspace\Nucleo-F446RE\RTE\Device\STM32L443RCTx\FrameworkCubeMX.gpdsc' is missingKindly provide with any possible solutions#classic # STM32L433RC
I'm running on a Discovery STM32H745I board with a dual-core MCU, generating code for IAR with CubeMx. I generated a FreeRTOS-based FW for the CM7 core (CM4 core doesn't use FreeRTOS in this instance). When calling the osDelay() function, the code freezes. The root cause seems to be the following auto-generated code in the FreeRTOSConfig.h file:/* IMPORTANT: This define is commented when used with STM32Cube firmware, when the timebase source is SysTick,to prevent overwriting SysTick_Handler defined within STM32Cube HAL *//* #define xPortSysTickHandler SysTick_Handler */Now, I have changed my timebase to TIM17 for both CM4 and CM7 MCU cores and re-generated the project so that HAL doesn't use SysTick as my timebase. I'm not sure why this #define is commented out, but when I remove the comments by hand, everything starts working ok (that is, the #define xPortSysTickHandler SysTick_Handler is present in my code).I'm using CubeMx 5.3.0. Does this version have a bug
Hi, I'm trying to write a simple blink sketch using an STM32F4(07) discovery board, CubeMX and Atollic truestudio. I can't find any walkthrough guides which cover this exact constellation of products, so I'm trying to mix and match and I can't get my code to build properly. I used the cubeMX program to select pd12-15 as GPIO output and then the debug in sys mode to debug wire (i'm assuming this is appropriate for my discovery board?). The clock configuration seems to be set so I can't alter it (I'm guessing because i've chosen the discovery board which has default settings?) I don't know what to do with the tools section, I just left it blank. I select truestudio in the toolchain/IDE section and open the project. This creates a project with a lot of stuff that I have no idea about contained within it. it is much more complicated than the code snippet recommended in this tutorial - http://embeddedsystemengineering.blogspot.com/2015/02/stm32f4-discovery-tutorial-1-simple-led.html which i
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.