Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi,having problem with understanding of the following message (yellow triangle in ETH):Partly disabled conflicht with OCTOSPI I can select the Pins for ETH (RMII) and OCTOSPI (in QUAD-Mode) without any errors:ETH: OCTOSPI:I want to use the SPI in Quad-Mode to connect a SO-8 Quad SPI-NOR-Flash memory.Idon´t see any conflicts, so why this message?
I have experience with STM32CubeMX for a while.I usually use many projects in same time because I have to config a production board follow development board configuration or I have to find what the difference between them. So I think that it's easier to work if it's in same windows like as STM32CubeIDE.it just an Idea for considering.
Hello.Short Story:I'm doing a little project that has to write some sensor data to an SD-Card.After setting up with CubeMX, I found this (well-known) example of "kiwih" (https://github.com/kiwih/cubemx-mmc-sd-card?fbclid=IwAR1JE_SkRHDFSikRvwptlszMZUA-ZmuBhtI3UJPCThuC68mt_NsgG7M5qTE).Everything is working perfect and I can do f_mount, f_open, etc ...So far so good.Problem:To facilitate the connection of the SD-Card I used a uSD extension so I can not use the "card dettect" pin.Sometimes the system boots and no card is present. So when I do f_mount I check if the answer is "FR_OK".After that I wait to introduce the uSD and try "f_mount" again.The problem is that as long as I do not reset the MCU, the response from f_mount (already with the card inserted) is always "FR_DISK_ERR".I have already tried restart the SPI, the FATFS, clean the FATFS object, etc ...But all my attempts were unsuccessful.In this case, having to reset the MCU is not a solution for me.Does anyone have any ideas that
Hello, When Itry to open this file, I have this message. Do you know the way to update the version 6.9.1 for STM32CubeMX ? I don't know if I must update together with STM32CubeIDE version ? I have currently version 1.10.1 for STM32CubeIDE. Thank you for your helps. Regards
I am prototyping a neural net model on the STM32u5A9xx development kit that comes with a 64MB external NOR FLash and 64MB external PSRAM. I plan on using both in memory mapped mode for my project.I loaded my model into X-CUBE-AI (v 8.1.0) and analyzed it. The ROM and RAM usage were above the internal FLASH and RAM limits. I checked the box to use external FLASH (at 0x90000000) and RAM ( at 0xA0000000). but the tool continued to display the error that the design kit did not meet the requirements. When I asked it to generate the code, I did not see any middleware being linked or generated.I cannot tweak in the model -- it is a 32-bit floating point model and must use all layers.I see that there are some examples in the "FP-AI-VISION1_V3.1.0" but they do not tell me HOW TO GET PAST the errors I am seeing in the X-CUBE-AI.Does anybody have any clues or workarounds on how to get the GUI to generate the middleware firmware?Cheers
Hi,I'm trying to configure CubeMX to create a FatFS on an SD card using SDIO interface in STM32F103.I was reading https://community.st.com/t5/stm32-mcus/how-to-create-a-file-system-on-a-sd-card-using-stm32cubeide/ta-p/49830 but it's using SDMMC while I'd like SD card with SDIO.Is there some tutorial or reading stuff for it? Thanks for help,Aviv
Does anyone know how to view the Registers in CubeMX while changing?If not, I think it would be nice to add a way.
Has anyone had problems installing on Linux?UM1718 User manual3.2 Installing/uninstalling STM32CubeMX standalone versionOn Linux:a) On STM32CubeMX-Lin line, Click “Get software�? to download the packageb) Extract (unzip) the downloaded package.c) Make sure you have administrator rights to access the target installation directory. You can run the installation as root (or sudo) to install STM32CubeMX in shared directories.d) Do chmod 777 SetupSTM32CubeMX-VERSION to change the properties, so that the file is executable.e) Double-click on the SetupSTM32CubeMX-VERSION file, or launch it from the console window.Am I missing any details? The SetupSTM32CubeMX just says "Please install Java JRE 11.0.10 or a more recent version"$ sudo ./SetupSTM32CubeMX-6.5.0 Check exe path on linuxFullExe path1 is: /home/user/SetupSTM32CubeMX-6.5.0Exe path is: /home/userSearch java from relative path ----Checking java in /home/user/./jre/bin/javaChecking java in /home/user/../jre/bin/javaChecking java in /
I have similar problem for a long time. When looked log file in "C:\Users\user\.stm32cubemx" folder, i saw "delete error" log. I'm using Dropbox for my works, and it can ask a question "if i wanted to delete everywhere". So I moved project out of Dropbox folder, then freezing problem gone. Maybe that was actually the source of problem.
For calculating apriori PID parameters when running ST FOC SDK, you obviously need to consider the sampling time of the regulator for the integral term. According to UM1052, current sensing is synchronous to the PWM. Is the sampling period of the current sensing ADC the same as the sampling period of the current PI controllers ?Again, referencing UM1052, page 38/178, formula for Ki; is T equal to 1 / pwm_freq ?PS - I could not find motor control as a community anymore !
Hi, I don't see can filters in CubeMx. Someone point me where set it?
Hello,When I export the torch.nn.LSTM to ONNX and use onnxsim to simplify(and also eliminate onnx expand layer, which is not supprted) it,the generated .onnx model shows the following error after analyzing with stm32ai.exe (version 8.1.0)NOT IMPLEMENTED: Batch size greater than 1 not implementedI suspect that the transpose layer just before the LSTM misleads the stm32ai's analyzer to see 7 is batch size in the following onnx graph, which is the length of input sequence.And I wonder if I'm confused or missed the right way to convert the lstm model to onnx.For reproduction, I submit the code used for creating the model and lstm onnx file.the version of onnxsim is 0.4.33, pytorch is 2.0.0 import torch import torch.nn as nn class LSTMModel(nn.Module): def __init__(self, vocab_size, embedding_dim, hidden_dim, output_dim, num_layers): super(LSTMModel, self).__init__() self.lstm = nn.LSTM(embedding_dim, hidden_dim, num_layers=num_layers, batch_first=True) self.fc = nn.Linear(hidden_
Hello,I am newbie to use of these tools. I want to initialize all the I/O and some modules on a STM32F030CC micro-controller. I defined all the I/O from STM32CubeMX. I want to use the 2 PWM output on PB0 (TM3_CH3) and PB1 (TM3_CH4). I transfer the project on IDE, compile and run it. All GPIO work fine but the I do not have the PWM outputs. What is wrong?static void MX_TIM3_Init(void){/* USER CODE BEGIN TIM3_Init 0 *//* USER CODE END TIM3_Init 0 */TIM_MasterConfigTypeDef sMasterConfig = {0};TIM_OC_InitTypeDef sConfigOC = {0};/* USER CODE BEGIN TIM3_Init 1 *//* USER CODE END TIM3_Init 1 */htim3.Instance = TIM3;htim3.Init.Prescaler = 0;htim3.Init.CounterMode = TIM_COUNTERMODE_UP;htim3.Init.Period = 65535;htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;if (HAL_TIM_PWM_Init(&htim3) != HAL_OK){Error_Handler();}sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEM
To the people that take care of developing the MacOS version of CubeMX; for the vast majority of users, running as an administrator is not a thing. Keep that in mind when you are putting together the dialogs under "CHECK FOR UPDATES". If administrator rights are needed, ask for them. On a Mac, to get admin rights when you run an application, you have to fire up a command line, cd inside of the application bundle, then sudo run the application. Is that the experience that you were expecting your customers to have? (hint, the answer here is no) Perhaps a better option would be to bring up a dialog to get the admin group user id and password, just like every other application on MacOS. (and for the Community admins, I cannot choose STM32CubeMX as a label on this post)
Is it possible to generate #define from project parameters in CubeMX, such that they are produced in a header file my user code can reference?One example (of many possible ones) would be the HCLK frequency. I see MX generates the proper code to configure the RCC to generate the proper frequency, and at runtime I suppose I could look at how it's configured and do the math. but It'd be quite convenient, and a lot simpler, to be able to reference this frequency.Something like "#define HCLK_FREQ_Hz 216000000" pushed to main.h would be useful, so user does not need to maintain information both in MX and separately in their source code.Is there any way to get information that MX knows out into user code? Some sort of wildcard or symbol I can plug into the value of a user define to reference an internal variable, or something of the like?Any help or guidance here would be appreciated. Thanks!
I have a design with a STM32G030J6 (SOIC8) controller. I don't need an external reset. I want to use the pin 4 as a GPIO (PA1). I connect a button to this input. I select the appropriate option in CubeMX, but when the button is clicked, the controller resets. How can I disable NRST from this pin?
HelloOur software development environment is running on Internet offline computers.Is it possible to get alerts when new versions of STM32CubeMX and firmware packages is released so we can download them and move them to our offline environment ??best regardsHåkan
Hi,I've successfully generated a project with X-CUBE-AI. I searched for some examples on the internet and I've found that MX_X_CUBE_AI_Init is missing from my project. Why this function call is missing? I've the latest CubeMX.
I want to port the TIMCOOKER examples from STM32F302R8 to STM32F401RE. This is easily done according to the data-brief, as the examples are generated using CubeMX. However, there are no .ioc files present in the repository so I guess you need to change all files, e.g. stm32f3xx to stm32f4xx manually, both for BSP files, startup-files, source files and the HAL driver files ? Do I need to do this manually ? Is there documentation for porting CubeMX generated projects where .ioc files are missing ?Also, I've got EWARM licence for v8.3. I get errors trying to build the TIMCOOKER examples so I guess they are built using a newer version. But I don't know because neither the TIMCOOKER data-brief, the associated readme.txt files for each project, nor the AN4776 application notes says which version is required. Is this information simply missing ?
a) looking at UM1718 Rev 41 (July 2023) "11.4 Generating the report" there should be a button in the "Project Manager" Tab to start a export. I don't remember seeing it before and in "STM32CubeMX - STM32 Device Configuration Tool Version: 6.9.0-RC9 Build: 20230705-1724 (UTC)" in updatetd CubeIDE and "STM32CubeMX Version 6.9.0" separate install, both Windows I don't see the button.b) is there some Documentation for the ioc format or even better a ioc parser. my impression is that there are numberings in ioc files that depend on editing order -> makes it hard to diffc1) is there a a diff tool for ioc files?c2) is there a tool that writes a ioc file in canonical form - would allow diff with standard tools
I am trying to setup stm32h745 Nucleo board. Is the yellow triangle issue of concern or not ?I am using internal oscillator.
Hi,Latest CubeMX.Steps to reproduce RCC config error1. Board:STM32H747I-DISCO2. Click on X-CUBE-AI, select Cortex-CM7, select Install for X-CUBE-AI/Core, press OK3. Project manager: set project name, toolchain: CubeIDE, generate the code4. Click again X-CUBE-AI: suggests to fix clock issues, press Yes5. Go back Pinout & configuration: RCC reports error. Also how to fix it? (see the picture)
I have been trying to install STM32CubeMX (SetupSTM32CubeMX-6.9.1-Win.exe) for a *while* and yes I right-clicked and chose "Run as Administrator". It always fails during step 8/9 with the same message that "'C:\Program' is not recognized as an internal or external command, operable program or batch file." which is something anyone who has written many scripts or installers has overcome a couple times before not making that mistake again (or at least very often). If I choose "No" here, I can then get to the error details window:The full text from this window is :com.izforge.izpack.api.exception.IzPackException: An error occuredin java.lang.Thread.run() at Thread.java:833in com.izforge.izpack.installer.unpacker.UnpackerBase.run() at UnpackerBase.java:241in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:319Caused by: com.izforge.izpack.api.exception.InstallerException: File execution failedin com.izforge.izpack.installer.unpacker.UnpackerBase.u
Hello,I'm currently working with the STM32H750 and using a bootloader that runs a basic Clock and QUAD SPI Config for XiP and jumps to the main application.Once in the main application, a new clock config is applied using the generated SystemClock_Config. At this point, the MCU hangs after MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource); Is it possible to keep the bootloader and application clock config independent or I must have my clock configured by bootloader before I jump to the application?Bootloader SystemClock_Config: void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); /** Configure the main internal regulator output voltage */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} __HAL_RCC_SYSCFG_CLK_ENABLE(); __HAL_PW
HelloI found bug in BurstMode Configuration in HRTimer. There is not possible to set Burst Mode Period lower than DeadTime. It is OK, but CubeMX compare numbers only and does not count with prescalers values. I think Burst mode period must be grater that deadtime in time domain. In reference manual for STM32f334 (RM0364) is said:The burst mode period must not be less than or equal to the deadtime duration defined withDTRx[8:0] and DTFx[8:0] bitfields.But I think it is logical to compare it as time interval...Best regards
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.