Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
..
I have a stm32f030c8t6. I want to enable its ADC1 interrupt. in CubeMX, when I enable ADC DMA, there is no section where I can configure RANK. in the generated program, in stm32f0xx_it.c, I can see two functions belowvoid DMA1_Channel1_IRQHandler(void){} void ADC1_IRQHandler(void){}but the program does not enter these two interrupt handlers. is there any thing that I should enable in main.c file?
Hi,I'm creating a Dockerfile and installing STM32CubeIde and STM32CubeMX with it. To install these two programs it would be very convenient to have a link to download the programs without human interaction.Is there a link to download them?Best Regards
Greetings, I am using an STM32H747 and I have been successful in configuring my eMMC in the M4 core project (Initializing the SDMMC module, linking it to a file system, ...). I can basically do everything on the M4 and it works perfectly. However, when I try to do the same on the M7 it fails. I am literally using the exact same code and the same HAL functions with the same configuration but the HAL_MMC_Init() function returns an error all the time.Is there something that I haven't taken into account ?PS : For the M4 project I am using STM32CubeIDE and CubeMX and for the M7 project I use Eclipse with the Sloeber tool (for Arduino boards) since I am using an Arduino Portenta H7 board and wanted to use the arduino libraries on the M7.
Created project with newest Cube MX, added all of my pin initializations, closed project, tried to open it - it does not open, no errors no warnings, shows that cubemx loads the file and then renders UI, always goes to 100% progress on both, and then the progress disappears and cube mx goes to start page.Anybody can tell what is wrong with the project or cubemx?This is definitely new behavior, yesterday everything worked.Also interresting thing, is that after an attempt to open the project, some Java process starts eating ~30 percent of CPU time right after that and does not go away at all, never stops unless I close the program, even though the program does nothing, stays on the first page where it shows ads and has buttons to open project or create new project. CUBE IDE does the same thing with similar project.
Hi, I notice that CubeMx allow choose 16-bit resolution but STM32L476 has range from 6 to 12 bit. When I generate code I can't compile it:Moreover in datasheet we read on page 1: but it's only one information about mystic 16-bit resolution :D
I previously had STM32CubeMX V6.2.1 installed on my machine. I then tried to work on another project that my colleague made and my machine said I would need to “Continue�? or “Migrate�? because I didn’t have STM32CubeMX V6.5.0 installed. So then I updated to the latest Cube MX version (STM32CubeMX V6.8.0) because that’s the only version it would let me update to.Now feeling like I would have a good chance at victory I opened the same project up and got this:If I click “Continue�? or "Migrate" I get an error message about a GDSC error in the toolchain and it doesn’t load at all. So what are my options here? I could figure out how to install version V0.6.5 and it should come good. However this could turn into a nightmare with different workers at our company using different versions to to edit cube files. It would be tedious if they need to download a certain version of STM32 cube for project that they work on. Thoughts?
The clock initialization code is generated by STM32CubeIDEvoid SystemClock_Config(void) { LL_FLASH_SetLatency(LL_FLASH_LATENCY_5); while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_5) { } LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); while (LL_PWR_IsActiveFlag_VOS() == 0) { } LL_PWR_EnableOverDriveMode(); LL_RCC_HSE_EnableBypass(); LL_RCC_HSE_Enable(); /* Wait till HSE is ready */ while(LL_RCC_HSE_IsReady() != 1) { } LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_HSE, LL_RCC_PLLM_DIV_4, 180, LL_RCC_PLLP_DIV_2); LL_RCC_PLL_Enable(); /* Wait till PLL is ready */ while(LL_RCC_PLL_IsReady() != 1) { } LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_4); LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_2); LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); /* Wait till System clock is ready */ while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) { } LL_Init1msTick(180000000
On laptops with 4k displays it is often necessary to use 2x scaling in order to enlarge text for legibility. Most modern software behaves well in this HiDPI environment.Unfortunately ST's apps (such as CubeProgrammer) do not. Text in those apps is very small and difficult to read.This issue has been raised 4+ years ago in a few other threads, but has not been fixed yet (at least not for Linux users). Raising the issue again in a new thread for visibility. The fix could be as simple as using a newer version of Java.https://community.st.com/s/question/0D50X0000A7X7mlSQC/cubemx-has-tiny-text-on-hidpi-screenshttps://community.st.com/s/question/0D50X0000AIe2YoSQJ/cubeprogrammer-doesnt-work-with-java-11
This is more of a notice than a question.I just spend the past week looking into an issue we had with reads from an I2C connected EEPROM. We noticed that our system started hanging after some time; sometimes after over 5h.After a lot of searching we were able to find the time was related to the EEPROM reads at 10 minute intervals where the MCU would hang at a variable multiple of that interval. It was eventually narrowed down to the instance being locked (hi2c->Lock == HAL_LOCKED).About a month ago I updated the ST HAL drivers to version STM32Cube_FW_H7_V1.11.0 from what I believe was STM32Cube_FW_H7_V1.10.0. There are quite a few changes in the file stm32h7xx_hal_i2c.c, including with how the instance is locked. Rolling back that file to the previous version fixes the issues for us.For now we will stick to the older driver.Regards,Arno
Hello.I try to setup CDC USB HS with DMA but it blocks after few samples sent.Here is the minimal code that replicate the problemint main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USB_DEVICE_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ int32_t ssss=0; char msg2[2048]; while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ sprintf(msg2, "%d\r\n", ssss); CDC_Transmit_HS((uint8_t *) msg2, strlen(msg2));
Hi why is it not possible to configure mailbox queues in Cube graphically? Shoudl they be avioded from the toolchain prespective?Thx
I'm a beginner in working with Embedded Systems. I'm confused over OpenSTM32 System Workbench and Cube IDE. Could you please clarify me on this.Thanks
Hello,The CubeMX and the ST HAL has in the files "stm32XXxx_hal_conf.h" the#define USE_HAL_USART_REGISTER_CALLBACKSWhen I looking in the source code, there is no position to find where is this define used:Searching for 'USE_HAL_USART_REGISTER_CALLBACKS'...D:\Project\Core\Inc\stm32g4xx_hal_conf.h(108) : #define USE_HAL_USART_REGISTER_CALLBACKS 1ULines matched: 1 Files matched: 1 Total files searched: 130In Activate this configuration with "USART" has no effect (CubeMx).I think you can delete this define in all your HAL libraries and other software.Best Regards, Markus
Good evening stm32 dwellings, i have a flash problem.I find myself with the need to write a config file independent to my programm code.In order to do that my programm uses pointers to specific memory pages of my stm32f105:define ADDR_FLASH_PAGE_54 ((uint32_t)0x0801B000) /* Base @ of Page 54, 2 Kbytes */ #define ADDR_FLASH_PAGE_55 ((uint32_t)0x0801B800) /* Base @ of Page 55, 2 Kbytes */For debugging purposes i created a temporal setup function that writes the a hardcoded config structure directly to my flash. (<- this is working fine, reading and writting)BUTOnce i build my own configFile.bin and try to flash it with stm32cubeMX i get this: the flashed data looks fine when i read the memory, but the mcu is locked, once i start a debugging session it goes into hardfault at random moments.this is the verbosity output of the stm32cubeMX flashingI have no idea of what is going on....16:38:55:746 : Memory Programming ... 16:38:55:756 : Opening and parsing file: archivobinario
I have most recent version STM32CubeMX, but it keeps popping up do you want to generate code every few minutes, it is annoying. I prefer to generate code when I exit the CubeMX, how to restore that configfuration?
Hello, I have problems configuring a STM32F207 with Ethernet and LwIP and FreeRTOS. I have activated RTOS_USE_NEWLIB_REENTRANT in the FreeRTOS settings but still an error message appears in the LwIP settings. How can I fix this?
Hi,I run an application with stm32f429zg using freertos. An external 8Mb SDRAM from winbond (W9864G6KH-6) is used with fmc protocol. I set timing settings in stm32cubemx based on the sdram datasheet.The common clock of sdram is 72Mhz. All other settings can be seen below: The sdram initialization code can also be seen below:static void SDRAM_Initialization_Sequence(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command) { __IO uint32_t tmpmrd =0; /* Step 3: Configure a clock configuration enable command */ Command->CommandMode = FMC_SDRAM_CMD_CLK_ENABLE; Command->CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; Command->AutoRefreshNumber = 1; Command->ModeRegisterDefinition = 0; /* Send the command */ HAL_SDRAM_SendCommand(hsdram, Command, 0x1000); /* Step 4: Insert 100 ms delay */ HAL_Delay(100); /* Step 5: Configure a PALL (precharge all) command */ Command->CommandMode = FMC_SDRAM_CMD_PALL; Command->CommandTarget
This is more of a Linux issue, I think, than an IDE or MX issue. I've installed the latest versions of these applications and, unlike the previous installations, I'm not having the .ioc and .project/cproject files recognized as IDE/MX applications and so they get opened by the text editor of the day instead of the IDE and MX applications. Was there a change in the installs or might this config have been overlooked in the latest versions? Just checking before I spend time finding out how to fix this.Thanks,TJM (Tony)
Hi... for some reasons I cant regenerate my code from CubeMx but I need to change crystal 8M to oscillator 14.7456... in spite of replacing the clock function (void SystemClock_Config(void) ) with new one, my project does not work. what other changes do I need to consider for changing the clock in a project generated by CubeMx?thank you in advance
Hello. I'm trying to make a code to show some menús (configuration and user menús) in a LCD screen, but something goes wrong when I try to write the year, and read it later, from the RTC calendar registers.My main code begins with the cube MX function that sets a initial value to all the RTC calendar fields:sTime.Hours = 0x09; sTime.Minutes = 0x30; sTime.Seconds = 0x00; sTime.DayLightSaving = RTC_DAYLIGHTSAVING_NONE; sTime.StoreOperation = RTC_STOREOPERATION_RESET; if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK) { Error_Handler(); } sDate.WeekDay = RTC_WEEKDAY_FRIDAY; sDate.Month = RTC_MONTH_MARCH; sDate.Date = 0x31; sDate.Year = 0x23; if (HAL_RTC_SetDate(&hrtc, &sDate, RTC_FORMAT_BCD) != HAL_OK) { Error_Handler(); }Later, I can configure the time and date, using some enums to do it more human, in the exit section of a configuration menú:if (new_exit == 1) { date_final.Date = day_enum; date_final.Month = month_enum; date_final.Ye
Hi In my MX setup, using STM32G070CB, I tried to allocate PB11 as ADC_IN15 and PB12 as ADC_IN16. Funny enough, the PB11 & PB12 pins are changed in yellow colours, While PB10 as ADC_IN11 bears no problem with the normal green colour allocated.Hovering both PB11 and PB12 pins gives information about ADC1_IN15 (no mode) and ADC1_IN16 (no mode) while at PB10 pin, it is ADC1_IN11 (IN11).The same applies to STM32G071RB and the like.Any one has any idea what is that all about? Is it a Mx bug or what?RgdsCalvin
Does the STM32H750XBH6 have data flash memory that I can use to store 200 bytes of application data? For example to store the IP address etc.. The datasheet says something about "2 Kbytes (64 flash words) of user option bytes for user configuration". Is there a driver from ST for this memory? How do I activate this driver in MXCube?Best regards Roger
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.