Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello!I have created a project using cubemx a few years ago. i know which cubemx version i have used in this project but i cant seem to find out which cube repository version i have used. What is the way to find it? can i find the repository version somewhere in the code? thanks in advance for your advice :)
I'm using STM32CubeIDE 1.11 and I want to import an existing file:File --> Import --> Exsisting Projects into Workspace --> Select Root DirectoryI get the following error when I try to open the .ioc file:File --> Import --> Exsisting Projects into Workspace --> Select Root DirectoryI downloaded version 6.8.0 from the site and installed it, but the error persists.If possible, I would not like to upgrade STM32CubeIDE to version 1.14Maybe I have both versions on my pc and should uninstall the older one?How do I proceed? Thanks.
Hi I made a program for STM32F103RG using STM32CubeMX and STM32CubeIDE a few years ago. The program is using the USB Device Mass storage software pack. I thought that I should update it with the latest version of it and made a new project since the old config file was too old for the latest SMT32CubeMX version. I configured the MCU in the same way and added my own code. When I build my code now the size of the program is now doubled in size, but still works the same. The old version was 17 kB and the new is 38 kB. Does anyone know why it has grown that much?
Hi,I made project that samples audio signals from the ADC at a constant rate. The trigger signal for the ADC conversion is generated by a timer. Now here's the thing:The code works fine on my STM32L432 Nucleo, STM32L4R5 Nucleo and STM32F429 Disco, but it does not work with the STM32F746 Disco. It looks like the trigger signal from the timer does not get through to ADC3, because I can work-around by using ADC_SOFTWARE_START and start the conversion manually by setting the SWSTART-Flag in the Timer ISR (in this case everything works fine again). I checked the Timer and ADC registers with the debugger and their content appears to be correct, I also tried several different timers, but to no avail.A major difference is that all other MCUs use ADC1 where as the STM32F746 uses ADC3 (as only its inputs are available).The ADC3 trigger input is configured like this: hadcx.Init.ExternalTrigConv = ADC_EXTERNALTRIGCONV_T4_TRGO; hadcx.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_RISING;
CubeMX (at least since version 6.7, maybe longer) generates the lwippools.h with#ifdef __cplusplus extern "C" { #endifwhich gives empty code if you use the C compiler. But if you include the lwip.h in a .cpp file, it won't compile.This is because lwippools.h is not used as standard header file but is included inside a enum-declaration/definition in memp.h (via memp_std.h):typedef enum { #define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name, #include "lwip/priv/memp_std.h" MEMP_MAX } memp_t;And now if you let a C++ compiler run over this, you have a extern "C" {...} inside your enum. The long list of errors begins with:In file included from ../Middlewares/Third_Party/LwIP/src/include/lwip/priv/memp_std.h:142, from ../Middlewares/Third_Party/LwIP/src/include/lwip/memp.h:54, from ../LWIP/App/lwip.h:31, from ../Application/Ethernet/EthernetConnection.cpp:13: ../LWIP/Target/lwippools.h:32:2: error: expected identifier before 'extern' 32 | extern "C" { | ^~~~~~ ../LWIP/Target/lwippools.
Controller:STM32G473RET6IDE:STM32CubeMX+Keil(LL library)Using DMA1 channel 1, copy the data collected by the ADC during half transfer interrupts and transfer complete interrupts.Discovered that half transmission interrupts and full transmission interrupts cannot be used independently.Specifically reflected in:(1)When DMA1 is initialized, if the half transfer interrupt is turned on and the transfer complete interrupt is turned off, the full transfer interrupt can still be triggeredLL_DMA_EnableIT_HT(DMA1,LL_DMA_CHANNEL_1);LL_DMA_DisableIT_TC(DMA1,LL_DMA_CHANNEL_1);(2)During DMA1 initialization, if the half transfer interrupt is turned off and the transfer complete interrupt is turned on, the half transfer interrupt can still be triggeredLL_DMA_EnableIT_TC(DMA1,LL_DMA_CHANNEL_1);LL_DMA_DisableIT_HC(DMA1,LL_DMA_CHANNEL_1);
Is it possible to revert a project to an earlier firmware version? I was able to upgrade, but now I can't figure out how to change back to the previous version.I also can't create a new project with the older firmware version either (the dropdown is greyed-out / disabled), even though I have multiple firmware versions installed.
I can not open my project after update cubeMX to latest version.
Hi, Just to notify a bug :CubeMX injects LL_RTC_TAMPER_MASK_TAMPER1 for RTC Tamper 2 when generating codeSTM32CubeMX - STM32 Device Configuration Tool Version: 6.8.1-RC4STMCube FW_L0 V1.12.2 /** Enable the RTC Tamper 2*/LL_RTC_TAMPER_Enable(RTC, LL_RTC_TAMPER_2);LL_RTC_TAMPER_EnableMask(RTC, LL_RTC_TAMPER_MASK_TAMPER1);Best RegardsRLA
I am trying to configure ADC for STM32H562VGT in STM32CubeMX but it is limiting maximum source frequency for ADC. It limits it to 75MHz (which is maximum frequency of ADC clock) but ADC clock has its internal divider.For example I want to use 120MHz HCLK as a source for ADC clock and set internal divider to 64 but Cube is notifying me with Clock issues.In version 6.8.0 this problem was not present and I could use 120MHz clock as clock source for ADC.Is it some bug in new version of Cube?
STM32 DevloperBord : STM32F030C6T6TRCubeMX : version 6.7.0keil : version 5i2c config at standard mode I2C_Speed_Frequancy-100KHZ/*************************************************************************************/static void MX_I2C1_Init(void){/* USER CODE BEGIN I2C1_Init 0 *//* USER CODE END I2C1_Init 0 *//* USER CODE BEGIN I2C1_Init 1 *//* USER CODE END I2C1_Init 1 */hi2c1.Instance = I2C1;hi2c1.Init.Timing = 0x00201D2C;hi2c1.Init.OwnAddress1 = 0;hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;hi2c1.Init.OwnAddress2 = 0;hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK;hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;if (HAL_I2C_Init(&hi2c1) != HAL_OK){Error_Handler();}/** Configure Analogue filter*/if (HAL_I2CEx_ConfigAnalogFilter(&hi2c1, I2C_ANALOGFILTER_ENABLE) != HAL_OK){Error_Handler();}/** Configure Digital filter*/if (HAL_I2CEx_ConfigDigitalFilter(&hi2c1,
Hello,In CubeMX 4.26.1 one can find the following combobox:I tried to find something about it in the CubeMX documentation but in vain. What does it do?
stm32cubemx fails to download packages due to inability to authorize at "myST->login".According to the crash dump it has happend because of jxbrowser plugin-7.30.2 (chomium version 108.0.5359.215).All extended attributes had been cleared (not trusted software etc), all neccessary execution bits are set, firewall is turned off.Please see the log below.Could anybody help me? Is there any other way to autorise the app?Log: Spoiler (Highlight to read)Exception in thread "Browser Thread: af1bad7e-9d54-4fea-bf81-810f805fadf1" Exception in thread "Render Thread: 1e9167c2-a7d4-47ff-a51f-8766ace40d51" java.lang.IllegalStateException: Failed to receive the response.at com.teamdev.jxbrowser.internal.rpc.transport.RpcThreadCallExecutor.execute(RpcThreadCallExecutor.java:43)at com.teamdev.jxbrowser.internal.rpc.ServiceConnectionImpl.invoke(ServiceConnectionImpl.java:213)at com.teamdev.jxbrowser.frame.internal.FrameImpl.document(FrameImpl.java:449)at com.st.microxplorer.plugins.useraut
Hi,What am I missing ?The connection to the event source is grayed and non selectable, see screen copies of the configuration below.
Using STM32CubeMX version 6.2.1.1) Create a project using STM32H755ZI, I named the project CubeMXError.2) Generate code.3) Open code with IAR, version 8.50.6.4) In IAR, right click in the workspace to adjust options for node "CubeMXError".5) In IAR, Pick category C/C++ Compiler and then tab Preprocessor6) In IAR, Under Additional include directories, add on a line all by itself, $PROJ_DIR$7) In IAR save the workspace.8) Go back to STM323CubeMX and generate code again.Error: The Code is successfully generated under : C:/Users/Public/HgRepos/CubeMXError Project language : C but EWARM V8.32project generation have a problem.
Hi all,Comparing my old .ioc project (based on former version of cubeMX) and a fresh new .ioc I found those differences:but I see no difference in the CubeMX interface NVIC.Does someone know at what parameters corresponds each filed of line like this:NVIC.DMA1_Channel4_5_6_7_IRQn=true\:0\:0\:false\:false\:true\:false\:true ?In this old version I also had some IO with Locked=true attribute, for example in old .ioc file: "PA10.Locked=true"In new version I have PA13.Locked=true, PA14.Locked=true and PA15.Locked=true but not in the previous one.I see no functional difference but I'd like to understand what have changed?One last difference noticed:old: ProjectManager.CompilerOptimize=2new: ProjectManager.CompilerOptimize=6Do you know if this can have impact ?Any documentation explaining all this?Have a good day,
Hello everyone.Is there a way to generate the report files (pdf and txt) via command line in CubeMX?I run STM32CubeMX in command-line mode getting commands from a script,but I didn't find any commands about report generation in the command line summary table.Greetings
I enabled usb cdc by stm32cubemx in an empty project. I connected dp, dm, gnd and (to ground). I tried a 1.5k pull up resistor on dp pin. But still I get “usb not recognized”. I am using stm32l152re-nucleo board.I have set up usb cdc on other stm boards in the past and didn’t have this issue. I couldn’t find any solution or any information on how this board is different or if I’m doing something incorrectly.
you have to put "#define configUSE_TASK_NOTIFICATIONS 1" into FreeRTOSConfig.h to make notification to work.Even cube has enabled the funktion. Cube removes the line every time its saves the project.
I have octospi hyperram memory to use on stm32h7b0 with nor flash I usually use stm32cubemx because it make the life easier but it's my first time configuring memories with it..can anyone help me with that ?
STM32CubeIDE 1.13.2 is showing a warning about SMPS for STM32U5 chips every time the code is generated (see attached).This is done even for chips which do not have the SMPS pinout, e.g. STM32U595VJT (non Q), which is completely invalid.But even when a chip does have SMPS, a designer may choose not to use it - why does this warning have to be shown every time the code is generated?For reference CubeMX used in this version of IDE is:Version: 6.9.2-RC4Build: 20230910-1412 (UTC)
I have a question about the convention in STM32CubeMX to specify Flash size for QSPI and OCTOSPI.The two application notes do not state the same thing.Application note for QUADSPI says: "Flash size is 16 Mbytes => number of bytes in Flash memory = 2[FSIZE+1] = 2[23+1] => FSIZE = 23" Application note for OCTOSPI says:Which would mean that 24 stands for 16bytes.So which one is true and which one should I use for the OCTOSPI
Hi, I am trying to set 4 ADC in single-ended modes with a minimum of 26 GPIOs which will be used in inputs or outputs, the thing is I have a lot of conflict with the ADC. I have the yellow warning sign even if there are all green is that an issue even if I selected the ADCy_INx pin which are not in red or yellow in the configuration menu? For me it seems like it wont be a problem except that I'll be limited in the ADC pins i want to use.Am I right ?
Hello, I'd like to better understand some settings in CubeMX to be sure default settings are OK for my application.Starting with USART2 Configuration for example:- in "DMA Settings" tab, what behavior is modified by the Priority dropdown (Low, Medium, High, Very High)?- in "Parameter Settings", what exactly mean "Overrun" (Disable/Enable) and "DMA on RX Error" (Disable/Enable)- etc.Thank you for pointing me the existing (hopefully) documentation :) Thomas
Hi everyone,I'm working again on a Nucleo board, stm32H755 precisely. Cube MX is version 6.9.2 and FW_H7_1.11.1 I'm trying to work on a web server on my microcontroller by following some tuttorials online.I noted one thing right away, all tutorials have the "Middleware" folder sub-divided as follows:While in my case, the folder inside the M4 project is:And the folder in the "main project" section is as expected:Have you noted this behaviour already?Is it something I got wrong in the settings?Just so you know, if I compile with the fs files in the common section, it compiles but the web server doesn't open the expected file. If I place the fs files in the "undivided" folder, it doesn't compile at all.Thanks in advance,Zack
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.