Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I downloaded stm32cubemx-win-v6-17-0.zip on Windows 11 direct from the ST web page:STM32CubeMX | Software - STMicroelectronicsDownloaded file size 676,525 MBBut it does not uncompress and install, all I get is a kind of ghost window that tries to launch but then aborts.Any ideas please?Kind regards,Al
This thread is split from this old discussion @FBL RCC_USBPHY1REFCLKSOURCE_OTGPHY1 and RCC_USBOTGHS1CLKSOURCE_HSE_DIV2 are missing in generated code I created a simple FSBL application that is jump to the AppliThe Appli is using the same approach (SW solution) like it was implemented inside "Ux_Device_CDC_ACM" example, (it was migrated in to the Appli)Currently, during debug, I am observing the same issue like it was described before (stuck in USB_CoreReset() during checking the "USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST" )The solution, that you provided, it looks like it does not working anymore by using the latest Cube_FW and generated compilation errors (no defines for the RCC_USBPHY1REFCLKSOURCE_OTGPHY1 and RCC_USBOTGHS1CLKSOURCE_HSE_DIV2).Could you please provide a solution (it would be better to see an example) how to solve this issue base on the latest MXCube and STM32CubeIDE versions. Currently it is : STM32CubeIDE_2.1.1 STM32Cube_FW_N6_V1.3.
When I click ACCESS TO MCU SELECTOR, the console prints :(I tried uninstalling and reinstalling, but the problem persists)command:jre\bin\java -jar STM32CubeMX.exe -ioutput:2024-10-09 19:44:07,992 [INFO] DbMcus:218 - Found 0 MCUs, 0 are supported2024-10-09 19:44:07,993 [INFO] ApiDb:423 - Load user favorites file C:\Users\PCH/.stm32cubemx/favorites.mcus.txt: 0 item(s)2024-10-09 19:44:07,993 [INFO] ApiDb:427 - User favorites MCUs=[]2024-10-09 19:44:07,993 [INFO] DbMcus:224 - Set 0 / 0 favorites MCUsException in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot load from int array because "minMax" is nullat com.st.microxplorer.mcufinder.gui.mcuselector.McuFilterPanel.createControls(McuFilterPanel.java:1476)at com.st.microxplorer.mcufinder.gui.mcuselector.McuFilterPanel.createGUI(McuFilterPanel.java:241)at com.st.microxplorer.mcufinder.gui.selector.FilterPanel.<init>(FilterPanel.java:124)at com.st.microxplorer.mcufinder.gui.mcuselector.McuFilterPanel.<init>
Hi, everyone.I'm trying to configure I2S in a STM32H523CET. I'd like to activate MCLK signal, but I can't find how. I'd also like activate external clock input for I2s (AUDIOCLK signal). The CubeMX says:"Audio Clock Input is not available.To enable it, one of the following RCC Mode(s) or IP(s) have to be configured from the Pinout TAb:-EnableExtClockForSAI1"But again, I can't find where to activate that.
STM32CubeMX 6.17.0 STM32CubeCLT 1.21.0 which provides GNU Tools for STM32 which provides a toolchain with GCC 14.3 and newlib 4.5.0. STM32CubeH5 1.6.0 (as downloaded by STM32CubeMX) STM32H563 With these tools, you can easily generate a project which uses ThreadX as RTOS and NetX Duo as network stack by point and click in STM32CubeMX. In this case, the project is generated to use CMake and the GCC toolchain. NetX Duo requires some random numbers even for non-cryptography use cases. E.g. this code for allocating a random ephemeral TCP port so that the other endpoint doesn't think an old socket is reused when the MCU restarts for some reason: Middlewares/ST/netxduo/common/src/nx_tcp_client_socket_bind.c: UINT _nx_tcp_client_socket_bind(NX_TCP_SOCKET *socket_ptr, UINT port, ULONG wait_option) { ... /* Determine if the port needs to be allocated. */ if (port == NX_ANY_PORT) { /* Call the find routine to allocate a TCP port. */ port = NX_SEARCH_PORT_START + (UINT)(((
Hello,STM32CubeMX installer on linux doesn't creating desktop entry file.Thanks in advance.
Dear STM expert: Currently, Iam facing an issue:when using the stm32f030f6p6 chip, I cannot find this chip model when creating new projects in stm32cubeide and stm32cubeMX ,thus it making it impossible to new projects,what this?hope a reply..thanks.
CubeMX 6.17. When creating a new project for H533RETx or for the corresponding Nucleo-H533, SYSCLK is set at 32 MHz.Not sure whether or not it is intended, but it looks like a trap for a new user, since the MCU datasheet talks about 250 MHz.Instead, example projects for Nucleo-H533 (at least the couple that I've seen) quite reasonably run the MCU at 250 MHz, driven from the crystal present on the board.
Hi, I'm working on the STM32H7S7L86H with cube MX 6.17 and cube H7RS 1.3.0I need to use RNG in appli and boot context but it is grayed because it accept only one context. It also block the usage of the hash module.Any idea how to fix this ?Thanks
Hi All,I have an issue with STM32CubeMX 6.17.0 (Windows 11 + Visual Studio Code)I want to start a STiRoT Full secure project (with DA and encryption) for STM32H573 with FREERTOS.But when I add the freertos software pack, I don't get any configuration options.Open STM32CubeMXStart My project from MCUSelect STM32H573IIK3Q (same as STM32H573I-DK)Enable ICACHE and MPU -> YesWith TrustZoneSoftware packs -> Select Component -> Cortex-M33 Secure -> X-CUBE-FREERTOS 1.5.0 -> CMSIS RTOS2 11.2.0 -> Core : TZ_Secure (I can't select Heap???)No configuration is shownIf I add FREERTOS to non-secure I am able to open configuration optionsI have added my IOC file.Can someone tell me what I'm doing wrong?Thanks!With kind regards,Marty
Hello, I have a simple CubeMX project with the STM32N6 MCU, and I cannot seem to be able to uncheck the FREERTOS option from the FSBL to move it to the Application. Is there something I am doing wrong? Thank you
Hi,I'm using STM32H5F5LJHxQ. External HSE Oscillator is 48MHz. RTC clock mux is set to HSE_RTC, divider set to "/48" and the tool shows correctly that RTC clock is 1000kHz (48MHz / 48).During my tests I discovered a wrong RTC time, error ~2%. (1.2 seconds deviation per minute)In the generated function HAL_RTC_MspInit() is see: (49 instead of the expected 48)PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_HSE_DIV49; If I change the configuration in CubeMX to create a divider of 47, the correct RCC_RTCCLKSOURCE_HSE_DIV47 is generatedIf I change the configuration in CubeMX to create a divider of 49, the correct RCC_RTCCLKSOURCE_HSE_DIV49 is. generated.If I manually set the correct RCC_RTCCLKSOURCE_HSE_DIV48 in the sources, the RTC runs correctly. Regards,Gunnar BohlenHMS Networks
See attachment, field gets erased every time I re-generate code using STM32 CubeMX.problem seen on versionsSTM32CubeMX version 6.16.1uVuion/Keil version 5.43This has been ongoing for a while so problem does exist on older versions of both.
Hello, maybe someone can check this,it seems to be incorrectly generated code. In my application for STM32H5xx I want to use ADC3. void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc) { GPIO_InitTypeDef GPIO_InitStruct = {0}; RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; if(hadc->Instance==ADC3) { ... .../* Peripheral clock enable */ __HAL_RCC_ADC_CLK_ENABLE(); This macro does not enable ADC3. #define __HAL_RCC_ADC_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_ADCEN); \ /* Delay after an RCC peripheral clock enabling */ \ tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_ADCEN); \ UNUSED(tmpreg); \ } while(0) I think something like this is required: #define __HAL_RCC_ADC3_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_ADC3EN); \ /* Delay after an RCC peripheral clock enabling */ \ tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_ADC3EN); \ UNUSED(tmpreg); \ } while(0)
Hi, i'm missing something in the configuration of alternate function on STM32C092. I can't get working alternare function on shared pin, interested physical pin are PIN 1, 15, 20. Example1: PIN15 only the function on PA8 are working properly, neither (PB0,PB1 or PB2) are working at all with any function even a simple toggle. I'm pretty sure that the Alternate Function property are being generated correctly. Example2: PIN20 Generating a PWM with TIM3_CH1 only works on PB6, if the same timer is passed to PB4 i can't get any output. Same on PIN1 i can get output only on PB7. There is the HAL_TIM_MspPostInit where PB6 is working as expected but PB1 isn't: void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(htim->Instance==TIM3) { /* USER CODE BEGIN TIM3_MspPostInit 0 */ /* USER CODE END TIM3_MspPostInit 0 */ __HAL_RCC_GPIOB_CLK_ENABLE(); /**TIM3 GPIO Configuration PB1 ------> TIM3_CH4 PB6
It has been verified that the installations of STM32CubeMX, STM32CubeIDE, and STM32CubeProgrammer are completed successfully and operate normally under standard conditions; however, when STM32CubeAI is installed, a critical issue arises in which STM32CubeMX no longer functions properly, specifically preventing the creation of new projects. This behavior was reproduced on two different computers, with identical results observed in both cases. Additional tests were conducted in which all programs were uninstalled and then reinstalled without STM32CubeAI, resulting in normal operation; subsequently, when all programs were reinstalled including STM32CubeAI, the issue reappeared, and finally, upon uninstalling only STM32CubeAI, STM32CubeMX returned to normal operation. This strongly suggests the existence of a direct conflict between STM32CubeAI and STM32CubeMX, and therefore guidance is requested to resolve this issue or to confirm whether it is a known bug, as well as any possible solutio
When configuring the LEDs for the STM32H573I-DK using the STM32CubeMX it generated code which initializes the LED pins as PushPull (rather than OpenDrain).Lookign at the schematics of the STM32H573I-DK it seems to be not "the best option".Would you agree that OpenDrain (GPIO_MODE_OUTPUT_OD) is the better option here, rather than PushPull (GPIO_MODE_OUTPUT_PP)? /** * @brief Configures LED on GPIO. * @PAram Led LED to be configured. * This parameter can be one of the following values: * @arg LED1 * @arg LED2 * @arg LED3 * @arg LED4 * @retval BSP status */ int32_t BSP_LED_Init(Led_TypeDef Led) { int32_t ret = BSP_ERROR_NONE; GPIO_InitTypeDef gpio_init_structure; if ((Led != LED1) && (Led != LED2) && (Led != LED3) && (Led != LED4)) { ret = BSP_ERROR_WRONG_PARAM; } else { switch (Led) { case LED2: /* Enable the LED2 GPIO clock */ LED2_GPIO_CLK_ENABLE(); break; case LED3: /* Enable the LED3 GPIO clock */ LED3_GPIO_CLK_ENABLE()
I'm running Bazzite (Fedora 43) and tried to install STM32CubeMX on a Fedora distrobox and was met with some issues.First, the installer is unable use /bin/chmod, this is fixed by switching out the installer's `jre\bin` directory for OpenJDK.Second, if you run as a normal user it fails with:com.izforge.izpack.api.exception.IzPackException: An error occured in java.lang.Thread.run() at Thread.java:1583 in com.izforge.izpack.installer.unpacker.UnpackerBase.run() at UnpackerBase.java:241 in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:319 Caused by: com.izforge.izpack.api.exception.InstallerException: File execution failed in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:299 in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:483 in com.izforge.izpack.installer.unpacker.UnpackerBase.executeFiles() at UnpackerBase.java:959This is fixed by running the installer via sudo.This is what I did
Hello all, I need to use some FFT functions. I have installed the CMSIS-DSP 1.16.2 and CMSIS 6.3 core as it was required from CMSIS-DSP. Surprisingly, CubeMX did only a part of its job, namely it did not copy source files and did not add proper include paths to the project so I have to do it myself. But after this there is still a bunch of unresolved references, namely arm_cfft_sR_f32_lenxxx and twiddleCoef_rfft_xxx. I have looked all sources in the CubeMX H7 pack version 1.13.0 I use through but could not find these sources. With best regards,Dmitry
I have tried using STM32CubeMX 6.17.0 to generate an STM32F429 DISC1 project.The generated project opened in STM32CubeIDE could not be compiled unless I add <root folder> in Project -> Properties -> C/C++ General -> Path and Symbols, the source location tab.I don't know how this happen. It's disturbing to modify project settings each time after modifying the CubeMX and generating the project.It's probably that should happened after I add some source folders to the projects.
I am experiencing an issue in STM32CubeMX where all peripheral Configuration panels stay empty, while the Mode panels and System Core → Parameters render correctly.What I have already tried:Starting CubeMX standalone (not via CubeIDE)Creating a completely new empty projectDeleting the .stm32cubemx folderDeleting and rebuilding the entire STM32Cube\RepositoryReinstalling CubeMXForcing JavaFX software rendering (-Dprism.order=sw)Setting Windows display scaling to 100%Enabling/disabling GPU accelerationVerifying that the bundled JRE is complete (java.exe + jvm.dll present)In all cases, every peripheral Configuration section remains empty, while Mode sections work normally.It appears that the JavaFX UI for peripheral configuration does not initialize, but without any error message.Has anyone seen this before, or is there a way to force or debug the JavaFX UI subsystem in CubeMX?Thank you in advance.Kind regards, Cornelis Dekker (Netherlands)
I am using STM32C071FBP6N MCU TSSOP 20 pin package for one of our project.I am observing Pin_20 is muxed with lot of other pins like PB3/PB4/PB5/PB6. if i select PB3 as GPIO_Output using STM32CubeMx and generated a code. If i try to toggle the pin but its not working at all, none of the peripheral on that pin for PB3 is working. But if i select PB6 as GPIO_Output i can able to toggle or modify.This issue is not only with Pin_20, same with Pin_1 also which shares with PB7/PB8, only PB7 is working.I have tried with multiple chips what could be wrong in this scenario??
Hello,The latest version of STM32CubeMX no longer lists x-cube-spn5 as an available package.Could someone help me how to use a X-Nucleo-IHM05A1 expansion board with the latest tools please?
When I clicked the "Access to MCU Selector" button, the interface did not respond. The pointer just kept rotating to indicate loading. However, when I clicked the "Access to Board Selector" button at this time, the selection interface could be opened.On the board selection interface, when I clicked the MCU/MPU Selector interface, it still showed the situation where the pointer was rotating and indicating a loading process, and I did not enter the MCU selection interface.
Software Versions: - STM32CubeMX: 6.15.0 - MCU: STM32G474QET6 - Firmware Package: STM32G4xx HAL Library V1.6.1 Bug Description: CubeMX 6.15.0 generates incorrect HRTIM deadtime prescaler macro definitions. These macros do NOT match the register bit definitions described in the STM32G4 reference manual (RM0440). This is a code generation bug in CubeMX, not a HAL library issue. Old Correct Macros (Previous Version): #define HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL8 (0x00000000U) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL4 (HRTIM_DTR_DTPRSC_0) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL2 (HRTIM_DTR_DTPRSC_1) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV1 (HRTIM_DTR_DTPRSC_1 | HRTIM_DTR_DTPRSC_0) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV2 (HRTIM_DTR_DTPRSC_2) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV4 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_0) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV8 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_1) #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV16 (HRT
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.