Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
When using HSI RC, everything works fine. After switching to HSE, Pinout&Configuration tab in STM32CubeIDE calculates a wrong TQ, as far as I can see. I use 250 kHz Bus, so 4 MHz clock results in TQ 250 ns. 16 TQ is 250 kHz. For example, for PLLMult 4I get, for prescaler 2 62.5 ns, although the value should be 250 ns:I think that cannot be right, as my scope shows that frequency is 250 kHz:and the device works fine in 250 kHz bus. Therefore, the prescaler divides external 8 MHz frequency by 2 and 4 MHz is 250 ns. If I choose any other prescaler, I get a wrong frequency.The way to do it is to generate code with setup in the first 2 pictures and then changeRCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL4;intoRCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;in the generated code.If I try to choose multiplier 6, the IDE refuses to generate code as it calculates a wrong TQ.Am I doing something wrong?
Hi,Beforehand, let me tell you my setup:Board selected on CubeMX: STM32L100C-DISCO.Input Capture with TIM2, Channel 2, Pin A1.I've been working on a project where I have to measure frequency, so I setted up the Input Capture on Timer 2 as in the Picture:After exporting the code, and implementing the functions as needed based on a tutorial I watched I didn't get any result out, nor any execution of the interrupt that should start at the capture event, what I noticed is that the GPIO pin is being declared as a alternate function push pull output instead of an input... is that ok?, you can watch that in this picture:In case anyone is interested, this is the tutorial I followed: https://www.youtube.com/watch?v=de4tfSzXrGM&t=693sThanks in advance for your comments, I am not posting the code as I first would like to check that the way cube mx is showing the info as in the pictures is correct...Víctor.
We are seeing intermittent hard faults on our custom STM32F413 board when connected with ST-Link V2.The hard fault happens in Reset_Handler() when FLASH contents are copied to SRAM.Obviously this happens long before any of our code is executed.Reset_Handler() is ST supplied code from MX Cube.Other than this, our board works fine.Any ideas?
Hi,I used CubeMX 5.6.1 and then I tried to generate code for project with '&' sign in it, and generation stucked in Copying library files. I restarted CubeMX several times, but nothing changed so I deleted '&' sign and everything goes fine. I tried again by adding '&' and generation of code stuck. Is this some kind of bug in the CubeMX? I'm using Windows 10.Thanks in advance,Nenad
I am prototyping some code on a Nucleo-144 board with a STM32H745 on it. I had a project that was working at a slow speed using the HAL driver for everything, but when I tried to run it faster, it could not keep up. So I decided to pursue using the LL driver for the Timers, ADC, and DMA in an effort to streamline the code. After working out changing the HAL code needed for starting things up over to LL code (which was not as trivial as I was hoping), I was not getting the ADC data from ADC3 that I was expecting, just all half-scale. I thought maybe I had missed something in the start up code and spent time directly converting the HAL code I was using that worked to LL code with as few changes as I could. But that still did not work.I finally started looking through the generated code to see if there was any initialization that was missing. Then I noticed this in MX_ADC3_Init: /* Disable ADC deep power down (enabled by default after reset state) */ LL_ADC_DisableDe
Attempting to open the example selector from the main window of STM32CubeMX 6.0.1 results in a spinning wheel and the software remains forever stuck, like it's waiting for something. Its next life, maybe, who knows.That's STM32CubeMX 6.0.1 on Linux. Let me know if you need more information.
Operating System: Windows 10 Pro 64-bit (10.0, Build 17134) (17134.rs4_release.180410-1804) Language: English (Regional Setting: English) System Manufacturer: Dell Inc. System Model: Latitude E6430 BIOS: A18 (type: UEFI) Processor: Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz (4 CPUs), ~3.0GHz Memory: 4096MB RAM Available OS Memory: 4002MB RAM Page File: 4149MB used, 1260MB
I re-installed the newest CubeMX 6.0.0 recently. But when I open my old projects which created with CubeMX 5.6.0 or earlier to open some TIM channels, it reported an error message:The Code is sccessfully generated under {my path} , but Library creation and copy have a problem.At first I thought that it wouldn't make any differences though it reported error, but after I flashed it the mcu didn't run as normal as before even I HAVE NOT CHANGE any code except what the CubeMX did.Then I looked up the log file in ~\.stm32cubemx\STM32CubeMX.log and I found that tons of files can't be copied and part of the error report is listed in the following:2020-08-01 20:13:55,001 [ERROR] ProjectBuilder:4890 - Problem during Copy of File core_sc000.h 2020-08-01 20:13:55,001 [ERROR] ProjectBuilder:4890 - Problem during Copy of File core_sc300.h 2020-08-01 20:13:55,002 [ERROR] ProjectBuilder:4890 - Problem during Copy of File mpu_armv7.h 2020-08-01 20:13:55,003 [ERROR] ProjectBuilder:4890 - Problem durin
Currently using the STM32l476 and changing to stml552 on existing board since needing more RAM. This occurs on STM32cube generated project with only RTOS enable and timebase set to TIM6.
Creating a template for the STM32F407G-DISC1 project in STM32CubeMX 6.0 (library 1.25). Adding FreeRTOS CMSIS-v1 to the project. Changing the size of the heap and stack to 0x2000/0x4000. Building a project for SW4STM32.In the StartDefaultTask() task, I add HAL_GPIO_TogglePin(LD4_GPIO_Port, LD4_Pin) to the loop.But the program always ends up in HardFault_Handler() after osKernelStart(). What am I doing wrong?
After Oracle announcement related to ‘End of Public Updates for Oracle JDK 8’, you can access OpenJDK 8 via https://adoptopenjdk.net/. But it will not
Hi !What a trouble in new version of CubeMX 6.0 ?Why :1. CubeMX v.6 reset preemtion priority to 0 from any nonzero values in projects whth FreeRTOS when to migrate from old version?This is original setting:this is migrated to 6:2. Where a checkbox "Uses the FreeRTOS functions" in NVIC tab ?STM Employes, answer please, another way need to return to old stable version 5.6.1.
Getting started with STM32H7, faced a problem. Ive worked for a long time with STM32F4 in Keil uVision (version 5.24.2.0), used a "classic" option, configuration via RTE_Device.h. Worked perfect.Now I dont have such option with STM32H7, only CubeMX, and adventures began.Created project with CubeMX, project building successfully. But when Im trying to add something i.e. filesystem, rtos, etc, it says that it is necessary to start CubeMX (again), and it starts complete different CubeMX project, a new one. Ok, fine, It adds a new main.c, stm32h7xx_it.c, etc. Obviously fails to build.Creating project with Keil looks makes a bit more sense, but still unable to build up a complete application, got the same issue ashttps://community.st.com/s/question/0D50X00009kHvWr/keil-mdk-and-st32cubemx-not-interactingIs there a way to not use CubeMX in any way?
Hi All,Can stm32f103 use C++? for programing not c.I'm using stm32f103 / truestudio / cubemx.I want to use some c++ grammer for programing.If there's way to use c++How i can use c++ in stm32f103?regard.
I want to a project from the scratch using the STM32CubeIDE for a STM32 Nucleo board. But I don't want to use the CubeMX feature of the IDE. I just to use the HAL libraries like we can do Ac6 workbench software. In Ac6 software, we have an option to use the SPL or HAL library to build the code, can't we do in this IDE also, with just the use of HAL library not MX thing.TIA.
..
Trying to read out a resistive touchscreen right now. To keep everything as simple as possible for testing I created an empty project in CubeMX just for testing this and set up all the pins in a static fashion (No reconfiguration at runtime)Measuring the ADC input with a multimeter I correctly see the voltage depending on where I touch, however no matter what I try, the ADC always either outputs a static number (Usually the max value of my configured resolution) or at random will (E.g. with 10 bit) Output a value like 0, 255, 512 or 1024.To eliminate the variable of the touchscreen I've also tried to remove the Touchscreen and connect a potentiometer directly which is connected between ground and 3v3 which made no difference.I tried pretty much all combinations of resolutions, sample times, Interrupt or not, its always the same result. I have also tried to use ADC2 / ADC3 instead of ADC1 with the same result.My code looks like this:HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&
In Windows 10 I visited www.st.com and accept the cookies and then all screen is changed to black and is not able to operate.I asked this question in Mac OS.
When I install the STM32CubeMX in Windows 10 it prompts requiring Java 1.8.0_45(64-bit), in fact there is Java 1.8.0_261_b12 in my computer and my computer is 64_bit but it can't recognize.
We have an issue with CubeMx and the I2S port. We set the port up as Half Duplex Master (so that the master clock goes out) and then in Configuration set the type to Master Receive. All good except that the two pins shows are CK and SDO. I am not sure how ST expects data to be received on the SDO pin. In the end, we set the type to Full Duplex Master and then we connected to the SDI pin. Any chance of getting this fixed in the next version?
I'm using STM32CubeMx 6.0.0 to develop for our STM32L4 board with a VL53L0X sensor on I2C. The X-CUBE-53L0A1 package is not listed, and attempting to load the zip file fails. Is this package supposed to be loadable? Or will I have to figure out how to interface the API myself? All the documentation in the API package seems to be for Windows and the Nucleo card, neither of which I use.
Hi, I just installed the new CubeMX 6.01 version. When I download a software package via the package manager the zip is downloaded and unzipped but then the following message shows up: "Error downloading the following files:stm32_cube_fw_f4_v1250.zip (Target directory allready exists)"I have Win 10, CubeMX is in admin mode and not blocked by a firewall. What is the problem?thanks for helpDave
I don't understand what's wrong as only auto generated code is involved; execution enters a dead lock waiting for a tick by HAL_GetTick() but no tick interrupt are invoked.
STM32CubeMX-5.2.1 - why I can't install it in d:\STM32\STM32CubeMX path?I use d:\STM\ for \STM32 ST-LINK Utility\ , \STMStudio\ and other STM application. Why not CubeMX?Setup returns error: Invalid directory path. Please enter a directory path meets the operation system's requirements.
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.