Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
CubeMX selects and will not disable code generation for SVC and PendSV interrupts. The generated empty ISR handlers in stm32f4xx_it.c conflict with FreeRTOS handlers:IOC is attached. This did not happen in other projects.Windows 10, STM32CubeIDE Version: 1.0.2, Build: 3566_20190716-0927 (UTC)@Markus GIRDLAND - Can you verify that you can reproduce and ticket opened?Thanks, Best Regards, Dave
Hi,I'm working with STEVAL-STLKT01V1 and wanted to create a custom program from STM32CubeMX. The problem is that in the program I don't have the option to create from Sensortile specifically, with onboard pre configurations ready. Is there a file where I can start to work from for this board?Thanks.
I Modified General Setting as attaching files, and generated codes. but It's not generated IP & NETMASK & GATEWAY ADDRESS value in MX_LWIP_Init() It also attached.I want to know What I did wrong.
Hi,what's needed to make CubeIDE to use the HAL implementation for the SysTick? I'm using STM32L011F4 device. It seems that the generated code uses Systick_Handler() from stm32l0xx_it.c instead of HAL_SYSTICK_IRQHandler() from stm32l0xx_hal_cortex.c.This seems to be something I observed when enabling LL for any of the used peripherals (which is an error IMHO) - it shouldn't disable the HAL for the SysTick or anything other than the affected peripheral.Even in a project which hasn't enabled any peripherals, I can't get the HAL implementation for SysTick up and running.I already reported some other bugs regarding using this device with CubeIDE - if this is another bug I've to get rid of CubeIDE, it isn't usable for me in this state. But I hope I only missed some setting.Regards
I have a Nucleo F411RE board and I noticed in STM32CubeIDE Version 1.3.0, that I can't change the LSE clock source to external. However, I can change the HSE clock source to external (see attached).On the Nucleo board it looks like only the LSE clock is populated (X2) and the HSE clock is unpopulated (X3).Is this a bug in STM32CubeIDE or did I miss something? FWIW I'm not using any external clock for my particular design, just playing around when I noticed this.
I took it from this video.I 'm using STM32CubeMX 5.2.1 + Atollic TrueStudio 9.3.0 + Proteus 8.6.Till now I haven't managed to make it work.I think I'm making a mistake in pins setup or some clock 's setup.I have tried any possible potion for pins: pull up, pull down, no pull up - no pull down, output level high, low...anything!!Here are all the files (Proteus project + TrueStudio-CubeMX poject). Click on the green button 'Clone or download'->Download Zip.Any help appreciated.EDIT: is there a way to make a pin of the STM32 to source current instead of sinking current? I think this is the key in finding a solution to my problem.
I have an IAR example STM32F746 project which brings up an LwIP stack on top of FreeRTOS; however I'm trying to turn it into a library and link into around 10-15 applications. This is breaking badly because linking via libraries doesn't appear to obey the __weak attribute.The STM32F7xx_HAL_Driver uses __weak to expose symbols it allows the user to override, e.g: __weak void HAL_MspInit(void)I have an override of this in my application code (the auto-generated stm32f7xx_hal_msp.c file). When compiled as an application, the linker selects my version over the __weak version. When compiled as a library and then linked into an empty application, the linker selects the __weak version.The only workaround I have found is to comment out the __weak versions of the functions when they have been overridden and my program works again.Do you have any better suggestions than commenting out chunks of the HAL_Driver library?---- UPDATE ---I found a different solution which I believe works better than t
In the clock tool picture below, no less than 3 separate and different clocks are labeled PLLI2SCLK.Top output of PLLI2SBottom output of PLLI2S (which has another divisor Q)Input to SAI-A mux (which has yet another unlabeled divisor)So, which one is input to MCO2 source mux?Also, calculated clock values should be shown on arcs!ST, Please confirm you understand and reproduced the problems and have filed one or two bug reports...IOC attached.PS: CC @Amel NASRI (ST Employee), @Camilo LEMOS (ST Employee)
..
I am a first time user of ST microcontrollers. I had just selected the MCU, and with (or) without even configuring anything in STMcubeMX, after generating the project, I got quite a numbers of the above kind of error messages. I did not write anything in the code and just build it. This happened even for different MCU selections.Thank you.
Hi,I am using STM32CubeMx of version 5.6 and trueStudio9.3 as IDE and STM32L476 as micro-controller.After generating code, when i load code into truestudio 9.3 ,its showing error follow error:"selected processor does not support `dmb 0xF' in Thumb mode".and when i generated code for keil(version 5.6),its show the popup unable generat code for MDK.i already have done re installing of every software but still same.Please help me out to solve this problem.
When I generate code from STM32CubeMx it removes the USE_FULL_LL_DRIVER in my project.Why is CubeMX doing this?The green marked USE_FULL_LL_DRIVER disappears when I generate code.
Not really an issue, but it is worth mentioning...inside cubeIDE, i generate a new stm32 project, in target selector i select the nucleo f446re board and initialize it with the standard peripheral settings. When checking the clock configuration, i would expect the HCLK at 180MHz (which is max for that mcu). Unfortunately it´s set to 84MHz, like a f401. It´s no problem to enter just 180 there and let the "Resolve Clock Issues"-Button do the job here, but anyway: it´s a little bit strange ...Edit: This applies to both versions. cubeMX stand alone and the integrated one in cubeIDE
image 2.
We wanted to use a UART periphal in transfer DMA mode. When configuring it with CubeMX, nothing happens, event when trying it on an empty project.When manually configuring the various registers for DMA transfer between memory and the peripheral data register, the behaviour was correct, so I suspected an issue with the HAL library.I tracked the bug down to the function HAL_DMA_Init in Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c The following line (line 251) is supposed to set the config register for the appropriate DMA stream:hdma->Instance->CR = tmp;But, when step debugging, it appears to have no effect on the register (as seen on the SFRs tab), even if the tmp variable has the correct value... How could this be explained? A weird silicon bug that doesn't allow to set the register in certain state of the mcu? An error in the library?In the meantime, we can just set the DMA stream CR register from the main function.Maybe it's worth mentioning that the issue occured with t
I don't need NSS signal or pin, I would rather use it as a real Chip select. But it looks like it there is no SPI at all without NSS? What should I change? CPU is STM32H750.Edit: Where did my screen capture go? For a short while I thought that I could insert images from clipboard. But no.
have periodic tasks (with period set by timer interrupts) running on both cores and i want to exchange data between cores. Here is a simple example.. M7-- Does some calculations and generates a variable at 20KHz M4-- Has to use the above variable for some other calculations running at 10KHz I don't want either core to have a "blocking wait" for the data generated by the other core. So how do i achieve the above and ensure that M4 doesn't read "half written data" ? It is alright if the code on M4 does not use the most "up-to-date" instance of the variable generated by M7. Should we use L1 cache or some other special RAM to achieve this ?
to start with,please forgive me that the mistake of grammar and words ,thank you very much! I found the tutorial on the ST website, where the test file data set was 10 rows, 270 columns, and then it was divided into 10 branches. then divided into (10,90,3,1), and finally succeeded. I used my own data set, 80 rows, 2 columns, and it didn't work. Do you know why?this is the print information:Starting AI validation on target with custom dataset : D:\pycharm\my projects\ch4_线性回归代�?\data.csv... Neural Network Tools for STM32 v1.2.0 (AI tools v5.0.0) -- Importing model -- Importing model - done (elapsed time 2.455s) -- Building X86 C-model .............. -- Building X86 C-model - done (elapsed time 13.749s) -- Setting inputs (and outputs) data
Running CubeMX version 5.6.1 on Win10. No internet connection, so I manually copy the CubeL4 zip files to the PC and then try to install via the "Install/Remove" button under software packages. I have CubeL4 1.15.0 installed. When I check 1.15.1 and click on "From Local", and select the ZIP file, I get this error:"Missing dependency for this package. - STM32Cube FW_L4 V1.15.0"I uninstall 1.15.0, then re-install 1.15.0, same error. Uninstall 1.15.0, try to install 1.15.1, same error.I manually un-zip'd the 1.15.1 on top of the 1.15.0 directory tree. Now CubeMX shows 1.15.1 installed (checked) and 1.15.0 not installed. Is this a valid configuration? Or do I need to find another way to install 1.15.1 through CubeMX?
I still struggle with SWO on a custom board with two H743s on it. No matter what I try, SWO pin PB3 is floating. I could get the SWO of a H743 Nucleo board with the hack of clive1 in this post below work a few years ago, but with current firmware/CubeMX/STLINKv3, I can't make it work again...https://community.st.com/s/feed/0D50X00009nNBBHSA4What I tried:In the CubeMX, I set "Trace Asynchronous Sw" enabling it PB3 (SWO). I tried the code of Clive1 in the post above, there PB3 will also be enabled, clock will be activated etc.Tried several SW and Clock speeds.As soon as I try to activate SWO, CubeIDE freezes, debug connection gets lost. I'm using the standard printf implementation on syscalls.c. Tested that strings arrive to FIFO and _write() gets triggered.I'm using ST-Link V3. Flashing/debugging work well at 24MHz both using SW and JTAG.Can somebody please help me to make my SWO (PB3) initialize correctly? Which part of API does that? Is it implemented at all?
When attempting to configure SAI1 A on an STM32F722R package the only option allowed is "SPDIF TX Transmitter (IEC60958)". I am able to manually set SAI1 A up as a normal I2S port if it its synchronized externally to SAI2 B but CubeMX doesn't appear to recognize that this is a valid configuration. This is misleading since it implies that the F722R is incapable of doing full-duplex I2S with SAI ports, when in fact it seems to be possible with proper external synchronization settings.
Hi,please help me out!!!I am trying to sort of an array in descending order with the help of test.cpp andexternal user defined header file.STM32F407VGTxAnd it is working properly with STM32F407VGTx dev board main.c ---> STM32F407VGT_TEST/SRC/main.cTEST.cpp --->MDK-ARM/TEST/TEST.cppTEST.h--->MDK-ARM/TEST/TEST.hSTM32F423CHUxBut when we are using STM32F423CHUx its not working and with same code and its get stuck in array initialization with zero and it got stuck while doing assignment. Below is the snippet for(int k=0; k<FRAME_SIZE/2; k++){ objects[k].value = off_set_final_ptr[k]; objects[k].index = k; }main.c--->STM32F423CH_TEST/SRC/main.cTEST.cpp--->MDK-ARM/TEST/TEST.cppTEST.h--->MDK-ARM/TEST/TEST.hboth code is genrated from stmcube mx
Is it possibile to choose the CMSIS Version in Cube? What's a good way to manage CMSIS updates? Copy/Paste manually?I'am using Keil µVision 5.29 (Keil Project manually generated -> Reference to copied STM32CubeMX Files).STM32CubeMX 5.6.1Cube MCU Package 1.16 for STM32F7Updated CMSIS in Cube to 5.6.0, files copied in the path STCubeGenerated\Drivers\CMSIS are from CMSIS 5.1.0.Thank you and kind regards Lasse
It's really hard to use CubeMX on high DPI monitors. Zooming on clock tree breaks labels arrangement. Every GUI element is very small. Platform: Windows 10Hw: Surface Book 2, (res: 3k x 2k - 267 PPI)
Hello everyone,For some reason, STM32CubeIDE generates a small binary, almost less than 1kb, after re-generating the project from CubeMX at certain point. Clean and build project didn't work. Project compiles successfully without any issue, however, the same incomplete binary is being generated over and over again. The only way to solve it was to remove the entire project from workspace and from disk, create a new project, generate project from CubeMX, then add my own sources from scratch. The problem is this workaround doesn't last long as I need to re-generate the project from CubeMX many times and at certain time re-generating project from CubeMX corrupts the entire build and results in that weird binary. Hopefully someone has something to say about it! Thanks,Zaher
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.