Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
To port the code from STM32F7 to STM32H7, I have got latest version of CubeMX and H7 firmware package. when I configure one of the GPIO pins on F7, CubeMX generates initialization code automatically. but it does not generate initialization code for GPIO on H7. Why is that CubeMX works for F7 but not for H7. Why can't it generate code for peripherals like GPIO, etc for H7?
Hi,There is a bug in newest STMCubeMx.When you have a project with STM32F407VGT and using FreeRTOS V10.0.1 and CubeMX V3.5.0 with Keil V5. The USB Storage and FAT-Filesystem is configured then the Cube produces a syscall.c with function calls to osSemaphoreWait and osSemaphoreCreate. both functions are obsolet and no more existent. They are changed to osSemaphoreAcuire and osSemaphoreNew.The same problem is with their prototypes in cmsis_os.h which have prototypes for both functions. I get an error at link time that the funtions are unresolved.Best regards,Osto
There would be a training course for STM32G4 in our city on Oct.22, I was accepted and was asked to install 3 software:1.STM32CubeMX V5.2.12.STM32CubeG4 Firmware Package3.IAR EWARM V8.40.1I have installed the first one, while the second is more than 680 MB, when I want to extract it, my computer just stopped there, I tried several times, all the same. My computer is HP Z-workstation, so how could I install these packages ? Then training notification said, one could install the package in STM32CubeMX V5.2.1, but I could not find the entry. Any suggestion ?
I am using STM32 for the first time. I have Atollic and STM32CubeMX installed. The controller I am using is STM32L475VG. I am trying to toggle the LED pin and am using HAL_GPIO_TogglePin to do it. But the compiler is throwing up an error 'undefined reference to `HAL_GPIO_TogglePin' '.I have HAL_Init() and HAL_Delay() functions working fine.Is there any file that needs to be included?
Hello,I want to create a simple PWM with changing duty cycle. To do so, I have created a PWM with fixed frequency. With the DMA, I change pulses which will result in a modification of duty cycle.To create something clean, I have configured STM32CubeMX and generated fresh files (configuration in attached documents below).If I test my PWM with fixed frequency and fixed duty cycle, everything is working (without DMA). I have not modified files, just added this line to start the PWM:HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_4);Result as expected:Now I want to do the same thing with the DMA. So I have created a buffer with 2 arrays, with my 2 pulses. And I use it like that: uint32_t buffer[2] = {42, 21}; // 42 is 50% duty cycle for my config, 21 is 25% [...] // At the end of timer4 init HAL_TIM_PWM_Start_DMA(&htim4, TIM_CHANNEL_4, buffer, 2); [...]And here is the problem:More particularly, it seems to crash at this moment:/* Set the DMA error callback */ htim->hdma[TIM_DMA_ID_CC4]-&g
I have custom board with a STM32F446 processor I am trying to testusing cubeMX (v5.3.0) generated code for a USB human interface (mouse).Unfortunately, I have had very sporadic results with getting the computerto recognize it as a USB mouse. The computer shows it connecting, thendisconnecting, rarely but sometimes recognizing it as a mouse only to disconnect a minute later. Micro is running at 168Mhz. with heap size set to 1000. I have replaced the USB connector on the board, the cpu and the crystal. Confirmed the same USB cable I am testing with works perfectly with other devices.Could someone confirm the code generated by the cubeMX as a OTG USB device, human interface still produces working code for a USB mouse?
HelloSince the MCU is relatively new and there are few references related to it I would like to ask if you are familiar of and could recommend any application note/tutorial/examples which clearly explain communication between CM7 and CM4 cores, sharing memory, etc.? My general goal is to divide processing of samples comming from an ADC and synchronize the operations to speed up computation time.At this moment I'm using Nucleo H745 board and CubeMX to generate initial CPU clock configuration in an SW4STM project.Thank you in advance for all recommendations and remarks.
I am using CubeIDE 1.0.2 on Nucleo-F767ZI.=> all settings are the default setting, but ETH and USB_OTG_FS are disabled,.=> The SDIO is enabled (SD 1 bit /SD 4 bits Wide Bus) and has all the default settings, except for SDMMCCLK Clock Divider Factor = 4.=> The FatFs is enabled for SD Card and has all the default settings, except for MAX_SS (Maximum Sector Size) = 4096 and Detect_SDIO = PC0 (First set it as GPIO input)=> The clock for SDMMC1 (48MHz) is taken from PLL48CLK Everything works fine in 1-bit SD mode but, in 4-bit wide the "f_mount" function from FatFs returns: "FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume */". I narrowed down the problem and it is happening in the "HAL_SD_ReadBlocks" function once it is called from "find_volume" "fmt = bsect ? check_fs(fs, bsect) : 3; /* Check the partition */""if (move_window(fs, sect) != FR_OK) return 4;""if (disk_read(fs->drv, fs->win, sector, 1) != RES_OK) {""res = disk.drv[pdrv]->disk_read(disk.lun[pdrv], b
Hello, I am using STM32CubeMX 5.3.0 for Mac OSX Sierra with the STM32F746G-DISCO. I am successfully generating a project to use with the Eclipse plugin for SW4STM32. However, there is an error when building the project, stemming from a missing linker script ".ld". I also have to clarify in the compiler arguments to add the processor "-mcpu=cortex-m7".It might sound a bit lazy, counting on the CubeMX software to do all the heavy lifting, but isn't the code generation supposed to provide a LinkerScript? Could there be something wrong with the project setup in CubeMX? I am just trying to get a minimal project working when building and debugging using SW4STM32.Thank you,
This result in compilation error since dynamic allocation is disabled and only static is used.For admins: If .ioc file needed, please write me a PM and I'll send it. This is something which I wouldn't want to put here as public.Atollic console:"Description Resource Path Location Type'configTOTAL_HEAP_SIZE' undeclared here (not in a function) heap_2.c /IWWT_M2_Processing_Fw/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang line 67 C/C++ Problem#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0 heap_2.c /IWWT_M2_Processing_Fw/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang line 50 C/C++ Problem"
Hi,for our current project, we moved from TrueSTUDIO, and Cube MX to STM32CubeIDE 1.0.2. Since we moved to CubeIDE, all our Project settings are overwritten, each time we generate code. In addition, to the linker file is overwritten too. Did anyone else experience this problem and knows how to fix this?
The following statement inside HAL_InitTick() is not dividing SystemCoreClock by 1000, as it should be. It's dividing by 1. So later, in SysTick_Config(), when argument ticks=64,000,000 which exceeds SysTick_LOAD_RELOAD_Msk of 0xFF'FFFF, a HAL_ERROR occurs.The compiler also thinks uwTickFreq = 3550975298. It should be 1. But that value in the following statement should result in a divide by 0, which doesn't happen either. Is this a Cube issue or am I doing something wrong? if (HAL_SYSTICK_Config(SystemCoreClock / (1000U /uwTickFreq)) == 0U)
In CubeMX view, I selected MX Data Refresh - or was that MX Check for Updates ?What is the difference anyway? User certainly can't tell.Please don't explain it to me:Fix the GUI so it does not need explanation.That's the purpose of a GUI!Then I got hundreds of sequential questions asking whether I wanted to download new version of a document, 99% of which I don't care and don't want clogging my PC.How about a sane UI with an organized list of documents and check-boxes?You know, like any professional GUI would be done?Of course, next the download failed as usual.Really now! This is extremely tedious and unhelpful!!Thanks,Best Regards, DavePS: Are you trying to torture your customers??
Hi, I am currently working on a project where I will have to log data to an µSD card using a STM32F413. I created a project in STM32CubeMX (version 5.0.0) and setup SDIO (currently in SD 1bit mode, but I also tried 4 bit mode). I also set up FatFS in CubeMX. After generating the code and trying to mount the sd card:FRESULT mountresult = f_mount(&SDFatFS, "", 1); if(mountresult == FR_OK) { } else{ HAL_GPIO_TogglePin(LED4_GPIO_Port,LED4_Pin); if(mountresult == FR_NOT_READY){ HAL_GPIO_WritePin(LED2_GPIO_Port,LED2_Pin,GPIO_PIN_SET); } }LED 2 and 4 light up, meaning that the result was FR_NOT_READY. After digging deeper I find the problem situates at the BSP_SD_Init(void) function, here HAL_SD_Init(SD_HandleTypeDef *hsd) is called, in this function HAL_SD_InitCard(SD_HandleTypeDef *hsd) is called, at last SD_PowerON(hsd); is calledfinally the error situates here: (lines 2560-2565 in stm32f4xx_hal_sd.c)/* SEND CMD55 APP_CMD with RCA as 0 */ errorstate = SDMMC_
I am interested in how many USART modules are available in the STM32G030J6.Datasheet contains contradictions.According to table 12 (pages 32-34) we get the following:USART1_TX 8 pinUSART1_RX 1 pinUSART2_TX 4 pinUSART2_RX 8 pinAccording to Figure 6 (page 30) and Table 13 (page 35) we get the following:USART1_TX 5 pinUSART1_RX 1 pinUSART2_TX 4 pinUSART2_RX 8 pinSTM32CubeMX indicates that only USART1 is available.How right?
I found that STM32Cubemx version 5.3.0 fails to configure ADC DMA operations when building code for the STM32H743.The initialization code set the ConversionDataManagement to the wrong value: hadc1.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DR;instead of: hadc1.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DMA_CIRCULAR;
Dear All,I had purchased STM32H757I-EVAL board. I am not able successfully debug my program.Events happened in sequence,Successfully booted the demo code. Explored all the function shown on the LCD.Using STMCubeMX (Ver 5.3.0) selected the EVAL board from the list and generated the code in default configuration. IDE choice is keil 5Code compiled in keil successfully. But I had select the internal flash 2MB in the configuration utility. Code loaded successfully.When debugging in keil, the Program counter (PC) did not reach the main(). It is stuck in one place. This is the problem.I need help on sample code, like led blinking. Kindly share if any code is there to start the project.Secondly, @STM32H743_User Default configuration generated from CubeMX should work directly on EVAL board. But it is not, kindly advice.Not able to find example codes for this EVAL board. kindly help on this issue.
<file category="sourceAsm" condition="ARM Toolchain" name="Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f407xx.s"/> <file category="sourceAsm" condition="IAR Toolchain" name="Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\iar\startup_stm32f407xx.s"/> <file category="sourceAsm" condition="GCC Toolchain" name="Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\gcc\startup_stm32f407xx.s"/>
Mic: STM32H743Atollic Truestudio 9.1.0CUBEMX MX.5.3.0
Posted on February 23, 2018 at 01:56Still very fresh with CubeMX and all this STM32 stuff, hope it is my fault. Or not?In the Clock configuration tab in Cube 4.23 I've produced configuration that should set the HCLK and SYSCLK to 72 MHz(not sure how it calculated this config, I have external osc. 8 MHz and must have 48 MHz for USB). The chip is STM32F446. See the picture below.But, in the generated code in main.c after SystemClock_Config() SystemCoreClock value is 225,000,000.If I understand correctly SystemCoreClock should be exactly the HCLK (or Sysclk?)I know that the actual frequency is 72 MHz because I use debug output via ITM_SendChar, and entered 72Mhz in Keil debug settings. It prints Today I upgraded this project to Cube v. 4.24 and libraries 1.19.0 and the SystemCoreClock value still is 225,000,000.This may be related to https://community.st.com/0D50X00009Xkav1SAB.Please advice...Regards,-- pa#cubemx-4.23 #stm32f446 #cubemx-v4.24
I'm using the STM32G070CBTx. The Cube Clock Configuration window is set up for HSI RC and PLLCLK. SYSCLK and HCLK are both set to 64MHz. The code generated by SystemClock_config() appears correct. But calls to HAL_RCC_GetHCLKFreq() and HAL_RCC_GetSysClockFreq() return 16MHz. What am I missing?
Editing an IOC in CubeMX IDE and using Pin & Configuration view, changing a pin's special-function or user label does not mark the IOC as changed. Consequently File Save remains grayed-out and it is not possible to save the changes.@Markus GIRDLAND - Please confirm you can reproduce this and a ticket has been opened, Thanks!Best Regards, DavePS: IOC attached illustrates the problem.STM32CubeIDE, Version: 1.0.2, Build: 3566_20190716-0927Try changing pin PA4
Hi all,Oracle changed the License for Java SE since April. Since then using their JDK requires purchase of a license for commercial use.Because of that the "Adopt OpenJDK" project is gaining a lot of traction. Eclipse already is working fine using it, but STM32CubeMX is erroring out saying atleast Java 8 is required.Can you please take a look at supporting OpenJDK?Thanks,Dirk
I cannot select SCALE 2 for Vrefbuf. By the way, I would like to ask how I can set Vdd as the reference voltage for DAC?
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.