Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi, I found a small bug in STM32CubeMX for STM32WL55:Enabling the option "MSI Auto Calibration" for section "RCC" does nothing, i.e. generated code doesn't change.I think it should add a call to HAL_RCCEx_EnableMSIPLLMode() or LL_RCC_MSI_EnablePLLMode () in SystemClock_Config() - same as it does for STM32U0. This enables RCC_CR_MSIPLLEN.
Hi there,I found an issue with the CubeMX 6.16.1 during the TouchGFX usage. I generated the files by TouchGFX 4.26 (selected the Stm32h7s7 development board with 24bpp project) and opened the cubemx to generate the code (I've been using vscode so I changed only the toolchain/IDE to Cmake and and with these settings the project was flashed and worked everything correctly.However, when I wanted to use the generate perpheral initialization as par of 'c/h' files and screen was struggled and couldn't read it's content. Nothing else was changed. In the visual studio I cleaned and rebuild the project but it did not work at all.Would it be possible to solve this?Thank you in advance!
The erroneous configuration in the tx_initialize_low_level.S is this: LDR r1, =0x40FF0000 // SysT, PnSV, Rsrv, DbgMThe tx_initialize_low_level.S file is generated upon selecting ThreadX 'Core' in the STM32CubeMX v6.15.0, and the above line is thereafter never changed. Specifically, upon enabling 'Enable BASEPRI support' and selecting a very common value of 5 for the TX_BASEPRI_VALUE, the above line is not updated accordingly. Not syncing the SYSTICK IRQ priority with the TX_BASE_PRI_VALUE of course leads to a system failure.This issue can be duplicated by creating a brand new project with STM32CubeMX v6.15.0 and it can be seen in the sample projects included in the Applications/ThreadX in the STM32Cube_FW_U5_V1.8.0
Hi all, I am trying to get a zephyr project running on an STM32N6570-DK, including Camera, NPU, VENC and Ethernet.I have been using STMCubeMX 6.16.1 to create the project based on the provided DK default settings.For the Ethernet block, the configurator shows pin conflicts, I double-checked and the pins are not in use by the Ethernet driver:There are similar warnings for the SD/MMC2 block:Am I missing something here or can it safely be ignored? Simon
Using latest STM32CubeMX version 6.16.1 on STM32N6570-DK. It is possible to assign peripherals like UART, I2C, etc. into multiple contexts - boot, app, memloader, but I cannot find a way to assign plain simple GPIO's into multiple contexts. CubeMX only allows to pick Free (which means none) or one of them. Needless to say, I would like to use same LEDs and buttons from multiple contexts. I don't think the RIF is the cause, not using it right now. Seems like a missing feature.
Hello!I wanted to set up some settings from CubeMX, specifically NX_IP_PERIODIC_RATE in NetXDuo and Rx Descriptor Length in ETH section. NX_IP_PERIODIC_RATE default value is set to 100, but when I set it to 1000, the value does not change when re-generating the code.Rx Descriptor Length default value is set to 4, but when I set it to 8/16/32, the value does not change when re-generating the code. Right now, whenever I re-generate the code, I just manually change these settings in my code due to these settings being set to their default ones. The same problem occurred in CubeMX version 6.15. One thing to point out also, is that the settings I changed are not set back to their default ones in CubeMX, only in the generated code. Also, no errors or warnings are displayed.Is this a bug or am I supposed to do something else before being able to change and apply these settings?
Despite enabling ADC, the ADC clock option is greyed out for MCU STM32G0B1KBUx. I'm using version 6.16.1
Howdy!I'm encountering a peculiar issue using STM32CubeMX ( version 16.6.1 ) and configuring the I2C1 peripheral with firmware version STM32Cube FW_G4 V1.6.1.In short, I'm trying to configure it for SMBus-two-wire-Interface, but this option fails to appear in the drop-down, only making SMBus-Alert-Mode available. This is a problem since the alert pin is already being utilized for a different purpose.This appears to be true for all the I2Cx on this device, and in desperation, I checked a handful of other STMG4x microcontrollers, and this issue remains present throughout. Additionally, I randomly checked STM32H7x, and it appears these did NOT share this issue, with the SMBus-two-wire-Interface option appearing as expected.We have a client with a tight deadline, and using SMBUS is essential. Any updates on when this could be fixed, or workarounds would be greatly appreciated.Thanks a million in advance!
Hello,Due to limitations with the STM32WBA's silicon & Bluetooth stack we've had to significantly re-engineer our hardware and add an external Bluetooth chip. As part of this, we updated our SAI blocks so that one block is transmit and one is receive, and moved our PDM microphones to a SPI bus.Since we have two PDM microphones, we've followed AN5027 "Interfacing PDM Digital Microphones":In our setup, we have SPI2 SCK (mapped to PB10) connected to PA1, and connected PA9 to the DMIC_CLK line. Our plan has been to map PA1 (input) -> TIM17_CH1, which then triggers (via ITR8) TIM3_CH2 which is mapped to PA9 (output).However, I'm struggling to set up the signals properly. I am able to configure TIM17_CH1 so that I can count SPI2_SCK. However, I am unable to trigger TIM3 to count at all.I've attached my example project for the NUCLEO-WBA65RI board.Any insight on this issue?Thank you,Jonathan
Hello,I searched on Google but I don't know if anyone has encountered this problem before. As we know, CubeMx and Cube IDE were recently released as two separate programs. I think this error might be related to that.The error is this: I open a project I created in CubeMx in the IDE and upload it to the chip; there's no problem up to this point. However, whenever I make an update in CubeMx, the entire update isn't reflected in the IDE (or rather, in main.c). If there were no updates at all, I would look for the problem elsewhere, but some of the configuration settings are transferred to the IDE while others are not. The most recent example I experienced was that changes to the ARR and Prescaler registers of the TIMER module were transferred to the IDE, but the changes to the PWM (CCR1) register remained the same. In this case, I had to manually change the relevant value in main.c (and it was quite difficult to notice).Look, the main problem here is that we developers ultimately trust ST
When I used the MMT tool in STM32CubeMX to configure a 256MB NAND FLASH based on FMC, an error appeared. I am using the STM32H743IIT6 chip and have configured NAND FLASH in the FMC. I want to know how to solve this problem.
Yes I should have taken a backup - but modern software must always have build-in backup solution so you do not corrupt your own files. Ask chatgpt if you need the code. I used 2 days to make this project, luckily I have the main.c so I can copy names from this. I am on Linux Mint version 22.2 with STM32CubeMX version 6.16.1 and Visual Studio Code Version: 1.107.1.The fault was in STM32CubeMX, that did not save correctly. During my work I experienced the software closing without saying a word on the error, especially in the ADC1 setup. But every time I could just start it again, but not this time:-(Attached you find the surviving part of the IOC file.Thank you for listening to my disaster. Best regards
We are using the STM32N657Z0H3Q (142-pin TFBGA package).CSI behavior in STM32CubeMX is inconsistent across versions:In older CubeMX versions(1.64), CSI lanes (CSI_D0P/N, CSI_D1P/N, CSI_CKP/CKN, CSI_REXT, etc.) are displayed in the Pinout view, but these signals are not actually assignable to physical pins. They appear as virtual pins only.In newer CubeMX versions(1.65), CSI is still listed in the peripheral view, but no CSI lane pins are shown at all. In case, the generated .ioc file contains only virtual signals:VP_CSI_VS_CSI.Mode=CSI VP_CSI_VS_CSI.Signal=CSI_VS_CSI VP_DCMIPP_CSI.Mode=SerialInterface VP_DCMIPP_CSI.Signal=DCMIPP_CSIOn hardware, when connecting a CSI-2 camera, the following is observed:DCMIPP and CSI registers initialize correctly,no LP-to-HS transition on the supposed CSI pins,ClkAct remains at 0,CSI interrupts never trigger.This behavior strongly suggests that the CSI-2 D-PHY pins are not bonded out on the STM32N657Z0H3Q package, even though CubeMX and the
Hello ST Community,I am writing to report a serious regression in STM32CubeMX 6.16.0 running on Arch Linux (KDE Plasma) with a 1920x1080 resolution.Environment:OS: Arch Linux (Rolling)Java: OpenJDK 25Desktop: KDE Plasma (Wayland/X11)Screen Resolution: 1920x1080The Regression (Comparison):1. STM32CubeMX 6.15.0 (Previous Version):Status: Works perfectly out-of-the-box.Details: I did not need to modify any configuration files or set any environment variables. The application launched correctly, the UI was usable, and the window could be resized and maximized without issues.2. STM32CubeMX 6.16.0 (Current Version):Status: Unusable / Broken.Details:The default UI rendering has issues (fonts are tiny or behavior is inconsistent).When trying to fix it using standard scaling methods (e.g., _JAVA_OPTIONS="-Dsun.java2d.uiScale=2" or GDK_SCALE=2), the window management breaks.The window refuses to maximize, enter full screen, or resize properly. It seems internal window constraints have been chang
The STM32H7RS series includes a USB HS PHY with a special PLL that generates the 480MHz clock required as well as a 60MHz clock for the OTG HS peripheral and optionally a 48MHz clock for the separate OTG FS peripheral. The PLL for the USB PHY has several configuration bitfields in the RCC->CCIPR1 register that are used to set the source of the PLL reference clock, as well as its frequency: Bits 13:12 USBPHYCSEL[1:0]: USBPHYC kernel clock source selection. Set and reset by software.00: hse_ker_ck (default after reset)01: hse_ker_ck / 210: pll3_q_ck11: reserved, the kernel clock is disabledBits 11:8 USBREFCKSEL[3:0]: USBPHYC kernel clock frequency selection .Set and reset by software.This field is used to indicate to the USBPHYC, the frequency of the reference kernel clock providedto the USBPHYC.0011: The kernel clock frequency provided to the USBPHYC is 16 MHz1000: The kernel clock frequency provided to the USBPHYC is 19.2 MHz1001: The kernel clock frequency provided to the USBP
Greetings everyone,Using the C programming language, I'm creating the encryption algorithm AES-256 code for a trusted execution environment and checking to see if the hardware supports it.AES/CRYP enabling is giving me trouble. I can't find it under Connectivity or Security, and I can't enable it with STM32CubeMX.I'm getting this error, so please assist.
We are using STM MCU MPN : STM32U375VGT6Q for one of our new projects, we are currently using HSE External 16 MHz crystal for system clock.We are trying to configure the STM32U375 MCU to run at 96 MHz using an HSE external 16 MHz crystal. In STM32CubeMX, we are unable to find the PLL option sourced from HSE in the clock tree on the Clock Configuration page.Could you please advise us on below points:Use HSE (16 MHz) as the PLL sourceSet the PLL multipliers/dividers to achieve SYSCLK = 96 MHz
It seems like CubeMX sets this default value hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_DISABLE; when doing software NSS and SPI Mode 3 like: hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH; hspi1.Init.CLKPhase = SPI_PHASE_2EDGE; hspi1.Init.NSS = SPI_NSS_SOFT; This results in a non working SPI at least on STM32H652 (did not check the signals with Oscilloscope, but I assume the CLK and/or MOSI float back to an undefined value after the first transaction, breaking the next one). This can be fixed by doing:hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_ENABLE; Wouldn't it be recommended CubeMX defaults the IO_STATE_ENABLE in this case? This one Bit just cost me 5 Hours of headache :\
Why can’t my cubemx configure L1 cache? How to enable it?Also, the MPU cannot be configured. You can only use the default configuration and modify it in the generate code.I also configured Memory management, but did not see the enable Cache and MPU synchronization settingsCubeMx 6.16.1 on macos MAC 26.1MCU:STM32H743IIT6
I need to learn more (detail) about STMCubeMX "extended mode" and small-pincount multi-bonded MCUs (this posting label specifies STM32C0 series which is what I'm currently working with.)STM32CubeMX UM1718 section 4.5.8 describes extended mode (I encountered when exploring this option while using STM32CubeMX with a new project), but other than cautions (that an option byte is required and that improper use can affect power consumption etc) I could find no further ("how it works") detail there.HAL_SYSCONFIG_SetBinBinding doesn't provide a suitable solution (concurrent access to a single physical pin by more than one possible peripheral.)Any recommendations on where (=application note?) I can proceed to learn about multi-bonding implementation and limitations for these small-packaged MCU products?Thanks!
Hello allI am trying to integrate CMSIS-DSP in my CMake project. From CubeMX, I have the following options:and I see the following folder struct:and to include DSP folder in my project, I have done the following changes in my top level CMakeLists.txt.... some code # Enable CMake support for ASM and C languages enable_language(C ASM) # Create an executable object type add_executable(${CMAKE_PROJECT_NAME}) # Add STM32CubeMX generated sources add_subdirectory(cmake/stm32cubemx) add_subdirectory(Drivers/CMSIS/DSP/Source) # Link directories setup target_link_directories(${CMAKE_PROJECT_NAME} PRIVATE # Add user defined library search paths ) # Add sources to executable target_sources(${CMAKE_PROJECT_NAME} PRIVATE # Add user sources here ${CMAKE_SOURCE_DIR}/Core/Src/tm1638.c ) # Add include paths target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE # Add user defined include paths # Include CMSIS core headers ${CMAKE_SOURCE_DIR}/Drivers/CMSIS/Include ${CMAKE_SOURCE_DIR}/Driv
My projects are all in C++ and were building completely fine. After I generated the code from CubeMX, the language switched back to C. I had to go and manually switch to C++, then it gave me build errors with linker script... Please fix!
Created a new project with v6.8 and reproduced the issueSteps: 1.cubeMX create new STM32F334 project and generate code.(Project-application structure-advancedProject-IDE-MDK-v5.32Code Generator- copy only the necessary library filesCode Generator- Delete previously gernerated files) 2.Create a Middlewares folder (/project folder/Middlewares), copy some folders in this folder (/project folder/Middlewares/mymiddleware).3.Generate code again, Middlewares folder is deleted.os:Win10jre:IBM Semeru jre 11.0.18.10
I am starting use of UM3029 Rev 3 (STM32C0 HAL drivers) and trying ensure I use HAL_SYSCONFIG_SetPinBinding properly (important because the 6 usable IO pins are multiply bonded to device peripheral pads.)I am working with STM32C011J6 (SO8 package) and am using STM32CubeMX and HAL to create example device support code (i.e., drivers.)UM3029 Rev 3 section 6 (HAL System Driver) takes me to section 6.2.1 (HAL Bind Pin Config) which has a listing for some device package/pin assignments for GPIO (my current task is to get a pin working as GPIO input), however, the list does not include any defines for SO8 package. The instruction I'm currently trying to verify (generated by STM32CubeMX for my project) is HAL_SYSCFG_SetPinBinding(HAL_BIND_SO8_PIN5_PA8), but there are others and I'd like to fully understand the utility of this function and it's arguments.I looked in UM3029 Rev 3 for a listing of allowed arguments to SetPinBinding for C0 series SO8 package in UM3029 and came up empty hande
I'm working on a project with the STM32H503CBU7 which requires USB. I have a 32MHz external crystal on my board that appears to be stable. The chip works and can be programmed and such. I also troubleshot out other physical issues like cold joints and shorts because that has burned me before when the USB device fails to enumerate.My intent was to use the PLL2Q source with the USB peripheral so I could also specify a 200MHz sys clock for everything else via PLL1. When I use the PLL2Q source however, I get no interrupts from the `USB_DRD_FS_IRQHandler` handler and so my USB stack does not operate.To make things more confusing, it also does not work even when both PLL's have the same values set for all parameters, as shown in the image below.It is important to note that this works with the PLL1Q source, as it is shown in the image, and I'm currently compromising a little on the sys clock speed. It will work for my purposes, but I'm more interested to know whether there's some "magic
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.