Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I tried using STM32CubeMX to configure an STM32H725 LQFP-100 device to get fADC=48MHz by getting the ADC Clock Mux output to 96 MHz, and using a /2 prescaler on the ADC1 peripheral but the drop-down for "ADC Clock Prescaler" only allows /4 or higher (24MHz or lower). I need fADC=48MHz in order to sustain a high sampling rate. What am I missing?
Please see the images attached:Project Manager.Error Message after project generation.STM32 Cube MX logfile with Error Message.CUBE MX Version: STM32Cube MCU Package for STM32F4 Series 1.25.2Keil version: 5.27Thanks for your time.Best Regards,Luke
..
Hello,I am trying to create a simple project on Keil and add some components via "Run Time Environment". I select necessary components then it tries to run STM32CubeMX which is also checked under "Device" tab. Anyhow, I get an instant error says that " *** Error STM32CubeMX could not be found!" by STM32CubeMxLauncher.exeI tried to reinstall BSP packages of my board(Nucleo-STM32F030R8), reinstalled CubeMX(also tried older versions of it), run Keil in admin mode, ,compatibility mode. But no luck.What I have noticed that when the installer finishes installing CubeMX, it does not create any shortcut on desktop but completes the installation without any error. I look add/remove programs under contral panel, it is not listed in installed programs. I think there is a problem about installation of CubeMX. System does not see it then STM32CubeMXLauncher.exe cant find it. My OS : Windows 10Keil Version : MDK-Lite Version 5.28Cube MX : 5.21Any idea how can I fix this issue ?Thanks,
static void MX_RTC_Init(void) { /* USER CODE BEGIN RTC_Init 0 */ /* USER CODE END RTC_Init 0 */ LL_RTC_InitTypeDef RTC_InitStruct = {0}; LL_RTC_TimeTypeDef RTC_TimeStruct = {0}; LL_RTC_DateTypeDef RTC_DateStruct = {0}; /* Peripheral clock enable */ LL_RCC_EnableRTC(); /* USER CODE BEGIN RTC_Init 1 */ /* USER CODE END RTC_Init 1 */ /** Initialize RTC and set the Time and Date */ RTC_InitStruct.HourFormat = LL_RTC_HOURFORMAT_24HOUR; RTC_InitStruct.AsynchPrescaler = 36; RTC_InitStruct.SynchPrescaler = 999; LL_RTC_Init(RTC, &RTC_InitStruct); /** Initialize RTC and set the Time and Date */ RTC_TimeStruct.Hours = 15; RTC_TimeStruct.Minutes = 19; RTC_TimeStruct.Seconds = 0; LL_RTC_TIME_Init(RTC, LL_RTC_FORMAT_BCD, &RTC_TimeStruct)
I'm using CubeMX's XML files as "Datasheets in database format" in my own "RTOS Hardware Configuration Tool". However, I couldn't find out how to extract the "Alternate Function Mapping" from those XML files:The `mcu/config/llConfig/ADC-STM32F0xx_DefMapping.xml` is promising but I still couldn't figure out how to translate - eg. - `GPIO_AF2_TIM5` to anything. Any ideas?
I am trying to update STM32CubeL4 package from v 1.14.0 to 1.16.0. Refreshing packages in manager does not show new versions. I downloaded zip from STM site and tried to add it using "From local" button. The integrity check and unpacking went without problem, however the package is still not shown in a list. If I try to update from a file again it says "this version already available from Repository".
Hello, can the pin configuration shown below possible?We need one bidirectional UART and a CAN along with a UART TX for debugging. Questions are:It says "Pin pair PA11/12 can be remapped in place of pin pair PA9/10 using the SYSCFG_CFGR1 register" So I would only need PA10 to be remapped to PA12 for CAN TX. Is this possible?Can USART be initialized with only TX pin?Would there be any issue with using CAN RX with BOOT0 pin?Thanks, Prithvi
Hi,I m working on STM32F769-DISCO board. I m using on STM32CubeIDE(vers. 1.5.0) and internally CubeMx(vers. 6.1.0). When I create new project, CubeMX interface is opening as you see on attached screen shot.I can not activate USB_OTG_FS as "Device Mode". However some of all peripherals are inactivated. How can I fix appearances of these modules? Best Regards
Hello All, Working with an STM32F4 processor and having issues with feeding the independent watchdog. Code is CubeMX generated. FreeRTOS v10.2.1 and CMSIS-RTOS V1.02. Watchdog resets if not fed every 512ms. Watchdog is fed in its own task and the priority is set to osPriorityRealTime. All the other tasks are osPriorityNormal. configTICK_RATE_HZ is set to a 1000 and configUSE_PREEMPTION is set to 1. The SYS timebase source was also changed from Systick to TIM7 as per a warning popup on CubeMX. So the issue I'm facing is that the watchdog resets the processor consistently every half a second or so even though I'm feeding it in the RealTime Task. I can confirm that it is the independent watchdog resetting the processor from the RCC->CSR register. I can also confirm that it is not an issue with the feeding process, as if I create an infinite loop right before the osKernalStart() and feed the dog in there the microcontroller runs perfectly fine and if I don't feed the dog in th
Hello, I'm using an stm32l496rgt (64 pins).When I set SD 4 bits wide bus on SDMMC I noted that the code created set SDMMC_BUS_WIDE_1B instead of 4B.In this configuration the sd card doesn't work, it works only with 1 bit bus.4 bits data bus works properly in stm32l4r5zit6p (144 pins).Is there a problem on 64 pin version?Best Regards
I am unable to generate code to stm32 MCUs by using this cube mx v6.1.0 my pc is 64 bit and I installed jre-8u91-windows-x64.exe version.I am getting Copying libraries files error to every controller, check in attached screen shot once.
Is it possible to have two versions of CubeMX installed (or otherwise used) on one Windows-PC?My problem is, that an older project used Atollic, and that still needs to be supported. For another project I installed CubeIDE that wanted a newer CubeMX version (6.x). The Atollic used CubeMX 5.x. Now CubeMX 5.6 can't open a ioc-file made with CubeIDE (CubeMX 6.x), and if I just open the ioc-file created with CubeMX 5.x with CubeMX 6.x, the code generation produces code that doesn't work (at least interrupt priorities get set to zero in the ioc-file even if the project is not saved).It's quite annoying having to re-install CubeMX each time I have to change the project to work with. At least if I need to even open the ioc-file.
Hello, i have found some bugsI can't select the external 32 khz osc . ---the input field of the User Label have some problemsedit this fields don't work properlyCTRL + c/v don’t work
I am using STM32 Cube MX to generate 32L443RCTx code.In function HAL_I2C_Master_Transmit always returns != HAL_OKAny ideas why?
Hello,Updated STM32CubeMX Version 6.1.0.After an update, I opened my previous version .ioc file (CONTROLLER:STM32G070RB) and only changing baud-rate in UART parameter setting, generated MDK-ARM V_2.7 KEIL uVision file. I opened that generated file and compiled it.BUT IT SHOWS 5 ERRORS WHICH I MENTIONED BELOW, WERE NOT CONCERNED TO THE CHANGES I MADE IN CUBE UART BAUD-RATE PARAMETER. These errors are troubling me, please help me out from this bug !!!ERROR MESSAGES:*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Build target 'TemeratureRelay_V1' compiling system_stm32g0xx.c...../Src/system_stm32g0xx.c(231): error: #20: identifier "RCC_CFGR_SWS_HSE" is undefined case RCC_CFGR_SWS_HSE: /* HSE used as system clock */../Src/system_stm32g0xx.c(235): error: #20: identifier "RCC_CFGR_SWS_LSI" is undefined case RCC_CFGR_SWS_LSI: /* LSI used as system clock */../Src/system_stm32g0xx.c(239): error: #20: identifier "
I write this as bugreport for IDE.In my project i need start TochGFXINIT on other place as MX generated code do.Then in STM32CubeMX v5.6 i use comment out it after every generate code.Im happy with STM32CubeMX v6.0 i use checkbox in MX and call to function isnt generated URAA, butnext update STM32CubeMX v6.1 i 1.5.0 IDE and now checkbox again not working and call is generated allways
I created a new project on STM32CubeIDE and I'm using the code generated by the software itself when I set the MCU pinout configuration using the Device Configuration Tool (.ioc file, aka the STM32CubeMX interface). Whenever I modify the pinout (i.e. the .ioc file), the generated code is updated, but file settings are refreshed. Therefore, every time I modify the pinout I have to set up again all the settings, like Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU GCC Compiler -> Preprocessor and Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU GCC Compiler -> Include paths.Is this a bug or is there a way to set up "fixed" settings?I'm using STM32CubeIDE Version 1.0.2.
I modified some functionalities using the MX interface in the STM32CubeIDE, saved and generated a new code and my core/src folder is gone.I've seen people complaining about this problem on older releases.Tested in another project (modifying settings in the MX interface and generating code) and the problem did not happen. What might be wrong with this specific project? I've been working on it for a long time and never had any problem.Right now I have Version: 1.4.2 Build: 7643_20200813_1322 (UTC), tried to update but no updates available.
I made a UART project in STM32CubeIDE. Cube generated the necessary UART initialisation code and created UART_INIT() function (or something like that) in main(). The project worked.Then I decided to add DMA. I regenerated the code and couldn't find DMA initialisation in UART_INIT(). I found out that this code was generated in another file in UART_MSP_INIT() function (or something like that). My questions are:Why does Cube generate this code in another file? Why not in UART_INIT() or DMA_INIT() in main()?Do I have to explicitly call UART_MSP_INIT() in main() by myself? And why doesn't Cube do it automatically?I found out that GPIO alternate function configuration (for UART) was also made in UART_MSP_INIT(). But I did't explicitly call UART_MSP_INIT() before using DMA. So why did UART work if the pins were not configurated?
When i open an example project everything works OK. When i create a project using CUBEMX or the IDE i see a limited number of drivers. Working with STM32F411RE. I don't see any LL Drivers.
using Nuleo-401RE EVAL and x-cube-spn3-Stepper Motor sample project for expansion board. want to use UART2 and change FLAG pin to PA0. In STM32 Cube IDE I am not able edit back the pin configuration (.ioc not visible in sample project), how to change or re-assign the pins and re-generate code, need to go back Cube Mx? or can we do with Cube IDE we can modify pin assignement?
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.