Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I had changed a library file, and i wondered, why after a MX config generation it did not work anymore.CubeMX replaced all the files!!! Lucky i had some backup. Why would you replace library files, that were already copied? Please see my picture for a future upgrade:
I upgraded STM32CubeIDE to 1.14.0 and then when I went to open an ioc file I got this message:This project was setup with STM32CubeMX V6.9.2 using STMCube FW_G0 V1.6.1.There are two options to proceed:-Migrate:Migrate your project using the current STM32CubeMX version (6.10.0)-Continue: Continue to stay compatible with the old STM32CubeMX version 6.9.2I chose the 'Migrate' option, which was probably a mistake. Now when I try to open the ioc file it just goes blank. Any advice please?ADDED LATER: In the meantime, I tried opening a different project, but selected the 'Continue' option. Again I got a blank tab when I tried to open the .ioc file
While loading .ioc file, when clicking continue to when pressing ok ,
I have Nucleo STM32U5A5 board where I experiment with the USBX interface based on demo code. I then created new project to experiment with GPDMA. Both IDE and MX are updated at the time of 30/Nov/23. It keep on repeating RCC/PWR setup warning or issue when I run generate code. When I went back to demo code: Ux_Device_CDC_ACM, I also generated the code from CubeMX with added USART2. It produce same RCC/PWR error. It seen to point to PWR privilege and RCC privilege (with !) on it. I have not activated trustzone. Can you advise what should I do about it, is there bug in these or workaround?
Hi I have STM32F407 and after updating STM32CubeMX 6.6.1 -> 6.9.2 I faced the same issue with SD card:https://community.st.com/t5/stm32cubemx-mcus/sdcard-does-not-work-fr-not-ready-when-migrating-from-fw-f4-v1/m-p/115499#M3876It seems that with previous version we were working with 1bit wide bus even if we set 4bit wide bus. Although GPIOS were set for 4bits (SDIO_D0, SDIO_D1, SDIO_D2, SDIO_D3).So after upgrading it changed to 4bits wide bus, but now we get `FR_NOT_READY`, `HAL_SD_ERROR_REQUEST_NOT_APPLICABLE`/* If requested card supports wide bus operation */ if((scr[1U] & SDMMC_WIDE_BUS_SUPPORT) != SDMMC_ALLZERO) { //... return HAL_SD_ERROR_NONE; } else { return HAL_SD_ERROR_REQUEST_NOT_APPLICABLE; } How do I fix this and make SD card work with 4bits wide bus?
Hi all. This is the first time I am using CubeH7 + FreeRTOS + LwIP. I have tried to trace down how Ethernet MAC interrupts have been enabled. If I got the code correctly:+ I enabled "Ethernet global interrupt" option from CubeMX "ETH".+ I enabled "LwIP" and "FreeRTOS" from CubeMX.+ "LwIP", "FreeRTOS" and "ETH" are all owned by Cortex-M4.Then when I trace down function calls MX_LWIP_Init() -> netif_add() -> ethernetif_init() -> low_level_init(). Seems there is no Ethernet interrupt enabling code...And when I setup a breakpoint to HAL_ETH_IRQHandler(). It's not getting called as well...I am now using:STM32CubeMX v6.9.2STM32CubeH7 v.1.11.1Maybe I setup something wrong? Thanks!
hello,i work in STM32F405, create projet with cubeMx, SD 4 wires.Pull up in the schematic D0..3 , CMD, no internal pull in cube MXmount return FR_NOT_READYwhen SD_WideBus_Enable() (in hal_sd) call:in SD_FindSCR() after the cmd 51 , there is a polling waitbut i have SDIO_STA_STBITERRand no data is return by the SD:i will try to reduce clock:clock init: 0x76: 400khz to 0xBA(400khz if the PLL output 48Mhz is 72Mhz) see in errata sheet STMF405clock after SD_CLK: divider = 0x76 the same of init.any idea?thx
I work on project using F407-DISC1 and i want to store data in eeprom and read it in another time.I do not want to use external eeprom, but i do not know how to add X-CUBE EEPROM to CUBEMX to use it in my project.I hope my question is clear Thanks for any help.
Hi every body.I have a project with stm32h747aii and i use mdk arm. Recently i did it with cubeide and i could debug both cores at the same time and within one window.I wanted to know that if it is possible in mdk arm 5.36 or not?When i enter each core debug i cant switch between cores in debug mode.Id better mention that cube has generated only one mdk arm project that both m7 and m4 are listed within.I think if they were two separate project it would be easy to do as mdk arm has tutorials for that. But i dont see any tutorials for this one.
HiWhen selecting azure RTOS in CubeMX, it is not possible to select FATFS. FATFS is greyed out. It is only allowed to choose FileX. Why?Thx
Hello, I am working on STM32F7x uC and I want to use one GPIO pin, e.g. PA3 as analog input. However, value from analog input should be read both by ADC1 and ADC2. CubeMX allows me that configuration and it should work. However, when I deinitialize only ADC1 then ADC2 stops work too. The reason is fact that generated: HAL_ADC_MspDeInit() function just deinitializes PA3 pin and it does not take into account that the other instance of ADC uses this pin as well.is it kind of limitation of CubeMX solution? or Do I miss something else and there is a limitation of hardware and one GPIO pin cannot be used by two (or more) instances of ADC simultaneously?Best regards and thanks in advance for any tips.
Hello,I am trying to configure USB FS Host using FreeRTOS on STM32H750.After connecting a device to the USB I get failure on memcpy(). The problem happens because pxQueue->uxMessagesWaiting gets value while the queue (os_event) has no elements.I believe that I missed anything in the configuration.I didn't find any manual on the USB FS Host using FreeRTOS configuration.Could anybody please point to a manual?
Hi there,When setting up my CAN bus using the cube mx generator tool, I found that switching from using an external clock source for my CAN peripheral to the intrenal one (HSI48) to be exact my CAN comms began to work.Im not sure as to why this is possible as I though th extenal crystal were more accurate than the internal ones?Any help shedding light on the situation would be greatly appreciated!
Beginner's question here. I have Nucleo-L476RG board and trying to learn more about the code CubeMX generates. To this end I started a new project and answered 'no' to setting up the peripherals, to make it as simple as possible.As part of MX_GPIO_Init() the B1_Pin is configured. I can't find any reason for this. The pin does not get a mention in the pinout view or the system view, and I can't find any reference to it in the generated code following its configuration.Here is the relevant code:__HAL_RCC_GPIOB_CLK_ENABLE();followed by:/*Configure GPIO pin : B1_Pin */GPIO_InitStruct.Pin = B1_Pin;GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;GPIO_InitStruct.Pull = GPIO_NOPULL;HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
Hi,When I generate code with the STN32CubeIDE 1.14.0 and CubeMX 6.10.0 RC9 then it does now the __WEAK in the cyabs_freertos_helpers.c file. My workaround is at the moment to include directly in that file the "stm32u5xx_hal.h" then it works till the next time i generate code. How can I fix that properly or is that only fixable inside the cubeMX code generator?Why is the /* USER CODE BEGIN Includes */ not working? Is that only working for some special files?Thanks in advancenobody
HelloI am using :STM32F413HDESCOVRYSTM32 CubeMX toolAtollic TrueStudio V9.3eMMC : Kingston EMMC04GI already created the files user_discio.c user_discio.h eMMC_Driver.ceMMC_Driver.hwhen i use f_mount i get FR_NO_FILESYSTEMthx
I'm trying to use X-CUBE-SMBUS extension with I2C3 on STM32L4VCT6But it's not letting me select Platform Settings 'Found Solutions:I'm getting the following message in my terminal. I'm not sure what this is about:```2023-12-01 16:15:17,676 [INFO] ThirdPartyModel:298 - Start build external matchings2023-12-01 16:15:18,539 [INFO] ThirdPartyModel:316 - End build external matchings2023-12-01 16:15:18,548 [INFO] CheckServerUpdateThread:120 - End of CheckServer Thread2023-12-01 16:15:26,367 [INFO] I2cTimingTraitement:330 - 0x10909CEC2023-12-01 16:15:37,816 [INFO] BspModel:203 - createCodeInput : SMBus Template : 2 IPName : I2C.* IPMode : SMBus.* Component : Solution : I2C3 InstanceName :2023-12-01 16:15:37,817 [WARN] IP:2113 - SMB_psa not found: check if there is a RefParameter without a condition.2023-12-01 16:15:37,837 [WARN] IP:2113 - SMB_psa not found: check if there is a RefParameter without a condition.2023-12-01 16:17:50,729 [INFO] CheckServerUpdateThread:120 - End of CheckServer Thre
Currently, STM32CubeMX 6.8.0, including the one used in CubeIDE, generates an incorrect comparison when using the low layer library (LL) for reset and clock control (RCC) in a project. This happens when you change the peripheral module RCC from HAL to LL in Project Manager > Advanced Settings by clicking on the relevant line and then selecting LL.void SystemClock_Config(void) { LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) { } LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE***); while (LL_PWR_IsActiveFlag_VOS() == 0) // <-- to be corrected { }Explanation:LL_PWR_SetRegulVoltageScaling() sets bits VOS in PWR_CR1,LL_PWR_IsActiveFlag_VOS() checks the corresponding bit VOSF in PWR_SR2:Typically, the return value 0 stands for OK or HAL_OK, so LL_PWR_IsActiveFlag_VOS() returns the correct value, but STM32CubeMX inserts the wrong comparison so that the while loop is never exited on OK.Temporary fix until thi
Hi tech team,I am in search of pdm2pcm lib as per an5027.in cubemx it is grey_out. Unable to install.how to install ?
Hi,We had enable the Clock secure system in out project.How works this?When the source clock fails what we must doing in the call-back HAL_RCC_CSSCallback()?regards
We are using the ST MCSDK, it is very helpful. In MCSDK/MCLib/Any/Src there is a function called STM_FaultProcessing. It is auto generated by Cube. We have one line we want to add to it that turns an LED on alerting the user to a problem. This works, but if we then auto generate code, it gets removed.We attempted to put our own user code brackets around the line to protect it:But the auto generation writes over it anyway.Is there any way to insert custom USER CODE sections into areas that do not natively have these sections? If not, can anyone suggest (besides generate->diff->remodify) a good way to keep additions to the ST generated code?
pNodeConfig.SrcAddress = &(ADC1->DR); pNodeConfig.DstAddress = (uint32_t) adc_values_1; pNodeConfig.DataSize = 4*64;In reference to the above based on an excellent tutorial (STM32U5 Workshop) which I use for nucleo STM32U5A5 https://www.youtube.com/watch?v=_hX6pN2jgYM&list=PLnMKNibPkDnFAy60ZY03q0IK8WztqQKs0&index=8I struggled to understand what determines the DataSize. How it calculated based on 8 channel ADC12 capture (instead of 4 channels in the tutorial). I looked into the reference manual and it has too many details to narrow down and determine how to set the value correctly.
The same happens when I try to open a project from the 'Other Projects -> Open' button.
I found some minor issues when generating a new skeleton project for STM32F429ZITx - Nucleo-F429ZI + LwIP1: If you enable multicast + IPv6 protocol:heth.Instance->MACPFR |= ETH_MACPFR_PM;instead of heth.Instance->MACFFR |= ETH_MACFFR_PM; /* notice the double F inside MACFFR */2: The entire interface is taken up/down together with linkup/linkdown. In LwIP 2.x this is wrong. The interface should always be up, else DHCP will assert during init and never recover.ethernet_link_check_state() should NOT contain netif_set_down(netif); and netif_set_up(netif);. Instead there should be a single netif_set_up(&gnetif); in MX_LWIP_Init() after netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &ethernet_input);3: The configuration causes some few printf() calls to be generated, but the skeleton Keil project does not assign printf/stdout/stderr, so execution halts due to hardcoded breakpoints during systeminit before main() due to the stub libc being
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.