Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi,I found an issue when generating code for a BLE application with STM32CubeMX v6.17.0.In particular, I have a service called DataTransferService with three characteristics:DataStreamCommandControlTransferStatusThe DataStream characteristic is configured as a notification with a fixed value length of 100 bytes.When I try to increase its length up to 250 bytes and regenerate the code, the following functions in custom_app.c are removed:Custom_Datastream_Update_Char()Custom_Datastream_Send_Notification()I have attached the .ioc file for reference.
Code generation of the attached .ioc file (copy of ST example file of similar name) does not generate clock init for UART4. This means the example application hard faults. I see no reason why the UART clock should not be initialised here and would save someone time debugging in the future!In stm32mp2xx_hal.c:void HAL_UART_MspInit(UART_HandleTypeDef* huart) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(huart->Instance==UART4) { /* USER CODE BEGIN UART4_MspInit 0 */ // TODO: Need this here! __HAL_RCC_UART4_CLK_ENABLE(); /* USER CODE END UART4_MspInit 0 */ /**UART4 GPIO Configuration PH8 ------> UART4_RX PH7 ------> UART4_TX */ GPIO_InitStruct.Pin = GPIO_PIN_8; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Alternate = GPIO_AF4_UART4; HAL_GPIO_Init(GPIOH, &GPIO_InitStruct); GPIO_InitStruct.Pin = GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Sp
When configuring the LTDC Layer Settings for an STM32N6 chip in CubeMX, the Layer 0 - Color Frame Buffer Start Address is missing: This parameter is available with other chips, such as STM32F750:
The STM32N6 supports YCbCr as an input format (see reference manual RM0486 section 21.3.5). As of version 6.16.1, this option is still not available in STM32CubeMX. The generated code can be manually modified to make it work by settinghdma2d.LayerCfg[x].InputColorMode = DMA2D_INPUT_YCBCR;
CubeMX 6.16.0 "Memory Management" used for ethernet and with enabled linker file generation creates the following [ORIGIN adapted from default]:RxDescripSection (rwx) : ORIGIN = 0x30040000, LENGTH = 0K TxDescripSection (rwx) : ORIGIN = 0x30040060, LENGTH = 0K Rx_PoolSection (rwx) : ORIGIN = 0x30040200, LENGTH = 1KWhat I would have expected was:RxDescripSection (rwx) : ORIGIN = 0x30040000, LENGTH = 96 TxDescripSection (rwx) : ORIGIN = 0x30040060, LENGTH = 96 Rx_PoolSection (rwx) : ORIGIN = 0x30040200, LENGTH = 1536[with just 1 ETH RX buffer - see this other post ].Can someone explain to me whether this is intentional - maybe because of a constriction with the MPU granularity?Or whether CubeMX handles this wrong and should allow sub-kilo-byte granularity?Best regardsJohannes
Hi,My actual CubeMX v. 6.17 offers some updates, but these update are for Cube MX 6.18. Cube Mx 6.18 is not available yet. When can we expect the MX update ? St.
Hi! I'm working on setting up FDCAN communication using the STM32N6570X0-Q Nucleo Board. However, when I try to modify the bit timing parameters—such as the Nominal Prescaler, Nominal Time Seg1, or Seg2—the baud rate doesn't seem to change regardless of the values I set.On the receiving side, I'm using a STM32H533RE Nucleo Board to echo the messages, but it doesn't receive anything—so I suspect the issue may be with the timing configuration on the N6570X0-Q.Do you have any idea what might be causing this behavior?Thanks in advance!
I am currently evaluating thefor use with 1000Base-T Ethernet and am attempting to configure the peripherals using STM32CubeMX. While following the same process as with other STM32 chips, I was unable to find the Ethernet configuration under Pinout & Configuration -> Connectivity. Could you kindly advise where I should configure the Ethernet settings?Thank you for your assistance.
STM32CubeMX generates by default a xx.ld file.It has copyrights from 2023. However, if I set "Apply Application Regions Settings to Linker File", it will generate a file with 2025 copyright, different template, also with XX.ld case, which on Linux, will give issues. Version 6.16.1
I created a new project using CubeMX, and after that I plan to implement a framework for my firmware. I would like to better understand the best way to organize a clean and maintainable folder structure.A colleague told me that all folders should be created inside the Core directory. I would like to understand whether using Core to contain my framework is the best approach, or if it is acceptable to create additional source folders outside of it.Additionally, where can I find examples of STM32 firmware projects generated using CubeMX?
Specific STM32H7 series MCUs have the DCMI peripheral greyed out in STM32CubeMX version 6.17.0.See this image:Hovering over the peripheral it displays "Not available: DCMI and PSSI are in exclusive choice"I opened a few projects with different MCUs and checked whether the DCMI was greyed out:STM32H723ZGIx - WorkingSTM32H725IEKx - WorkingSTM32H730ZBIx - WorkingSTM32H733ZGIx - WorkingSTM32H735IGKx - WorkingSTM32H742BITx - Not workingSTM32H743XGHx - Not workingSTM32H745BGTx - Not workingSTM32H747XGHx - Not workingSTM32H750IBTx - Not workingSTM32H753Allx - Not workingSTM32H755XIHx - Not workingThe PSSI peripheral is notably absent from the list of available peripherals (correctly as per the datasheet) in STM32CubeMX for the parts where DCMI has been disabled.This is clearly a bug in the mutually exclusive check in STM32CubeMX between the DCMI and PSSI, failing on the parts without the PSSI peripheral. See: STM32CubeMX 6.15.0 claims "DCMI and PSSI are in exclusive choice" for STM32H753ZIT
as per the the datasheet its show max is upto 90MHZ but i cannot even set for 72mhz in cubemx for mp135F. whats going on
Hello, few days ago ST MCU FINDER PC v 6.1.0 stop downloading updates with error message:It's only me, or server problem? Thank you. Regards,Slavomir Tomascik
STM32CubeMX generates incorrect linker script for BKPRAM (Backup RAM) via Memory Management ToolEnvironmentSTM32CubeMX: v6.17.0, see "Memory Management" (Tools > Memory Management) MCU: STM32H523RETx Toolchain: STM32CubeIDE - GNU Tools for STM32 (14.3.rel1)Applied Memory Setup (screenshot):STM32CubeMX generates 3 linker scripts (STM32H523RETX_FLASH.ld, STM32H523RETX_FLASH_MMT_TEMPLATE.ld, STM32H523RETX_RAM.ld). The STM32H523RETX_FLASH_MMT_TEMPLATE.ld is used in the generated STM32CubeIDE project output. Issue 1: BKPRAM memory region has incorrect x (execute) permissionGenerated linker script contains:BKPRAM (xrw) : ORIGIN = 0x40036400, LENGTH = 2KThe x (executable) flag is incorrect. BKPSRAM is a data-only backup memory — it is not executable. According to RM0481 sec. 2.3, BKPSRAM is accessible only via the system bus (S-AHB), not the code bus (C-AHB). Marking it executable is misleading and may cause incorrect MPU configuration.Expected:BKPRAM (rw) : ORIGIN = 0x40036400, LENGTH = 2
I use one Nucleo-F401RE create one project for TIM1-CH1-DMA, check RM0368 (rm0368-stm32f401xbc-and-stm32f401xde-advanced-armbased-32bit-mcus-stmicroelectronics.pdf) table 29, I can use DMA2_stream 6.(support ch1,ch2,ch3)When I open CUBEMX, there doesn’t support ch1, only support ch3, which one is correct CUBEMX or RM0368?
I am using CubeIde for the first time.First test - run minimal program with HAL from CubeIDe Configurator, under debuggerSimple program, only SYSTICK and uart , but SysTick_Handler() is not trigged at all .And function HAL_Delay hangs because uwTick is always 0. Tried with setting brakepoint inside handler - no resultsUsed HSI, SYSCLK 16MHZ, Cortex System Timer 16MHz,RCC GPIO and USART1 - HAL configured.here is main() generated from cubeide (I removed comments):-----------------------------------------------------------int main(void){ HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_USART1_UART_Init(); HAL_Delay(100); // here program hangs, when reaches HAL_Delay function. uwTick = 0 while (1) { }}-----------------------------------------------------------and here is the SysTick_handler from stm32g0xx_it.c-----------------------------------------------------------void SysTick_Handler(void){ HAL_IncTick();}-----------------------
hello,When using MDMA (STM32H753), and more than one transfer, the code generated doesn't align correctly the struct MDMA_LinkNodeTypeDef. This structure should be aligned with 64 bits.Please, see : https://community.st.com/t5/stm32-mcus-embedded-software/stm32h753zi-mdma-issue-with-linked-list-dma-adc/m-p/897390CubeMX : V6.17Thanks,best regards,Laurent
Hi,the cubemx HRTIM configuration will not let me set the set sources for Output 2, even though deadtime insertion is turned off.I had previously enabled it, and now disabled it. Since then I am unable to add a set source for Output 2.See the attached screenshots and .ioc file.I am using version 6.17.0
Hi I probably found a bug in STM32CubeMXCubeIDE = v2.1.1CubeMX = v6.17.0While configuring FMC like this. This code is generated. The Timing.AddressHoldTime is set to 15 instead of 2 as configured in CubeMXstatic void MX_FMC_Init(void){ /* USER CODE BEGIN FMC_Init 0 */ /* USER CODE END FMC_Init 0 */ FMC_NORSRAM_TimingTypeDef Timing = {0}; /* USER CODE BEGIN FMC_Init 1 */ /* USER CODE END FMC_Init 1 */ /** Perform the SRAM1 memory initialization sequence */ hsram1.Instance = FMC_NORSRAM_DEVICE; hsram1.Extended = FMC_NORSRAM_EXTENDED_DEVICE; /* hsram1.Init */ hsram1.Init.NSBank = FMC_NORSRAM_BANK1; hsram1.Init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE; hsram1.Init.MemoryType = FMC_MEMORY_TYPE_SRAM; hsram1.Init.MemoryDataWidth = FMC_NORSRAM_MEM_BUS_WIDTH_16; hsram1.Init.BurstAccessMode = FMC_BURST_ACCESS_MODE_DISABLE; hsram1.Init.WaitSignalPolarity = FMC_WAIT_SIGNAL_POLARITY_LOW; hsram1.Init.WaitSignalActive = FMC_WAIT_TIMING_BEFORE_WS; hsram1.Init.WriteOperation = FM
I am trying to set up an STMWB55CGUx device for THREAD. I want to set it up to have no log or CLI interface on any UART. When I select the FTD THREAD application type the CFG_CLI_UART setting is still requiring a UART to be able to auto generate a hw_uart.c file that is useless to me. This essentially blocks off a UART without editing files that could be overwritten via a re-generation. Is there any fix apart from manually editing auto-generated code? STM32CubeIDE v1.18.1STM32CubeMX v6.12.1
I’m setting up a new project in STM32CubeMX for an STM32L073RZ using the internal LCD controller in 1/3 bias mode.According to the STM32L0 reference manual (RM0367), the LCD voltage rails should be configured as:PB12 - VLCDrail1PB2 - VLCDrail2 However, in STM32CubeMX, the GPIO configuration only allows:PB12 - VLCDrail2PB2 - VLCDrail2There does not appear to be any option to configure either pin as VLCDrail1.Am I misunderstanding the LCD rail configuration for 1/3 bias mode on STM32L073RZ, or is this a limitation/bug in STM32CubeMX?Thank you!
Hello ST Team, We are evaluating the STM32H747BIT6 in the LQFP208 package for our application. To verify the feasibility of our design, we created a CubeMX project and configured the required peripherals, including LTDC RGB888 (24-bit), FMC SDRAM (32-bit), USB FS, I2C1/I2C2/I2C3, USART1/USART3, SPI1 and TIM PWM outputs. While configuring the project, CubeMX allowed us to assign all the required signals, and all pins are shown in green. We also checked the LTDC and FMC SDRAM signals and found that they are assigned to unique pins with no visible pin conflicts in the pinout view. Could you also review the attached .ioc file and confirm whether there are any pin conflicts that we may have overlooked? However, CubeMX displays the following warning on the FMC peripheral"Partly disabled conflict with:FMC (SDRAM1): Clock and chip enable SDCKE0 + SDNE0 and/orLTDC: Display Type RGB888 (24 bits)". Could you please help us understand what this warning indicates and why CubeMX is reporting it? We
I am using an STM32F401RET with the Simulink STM32 support package.My problem is that I am measuring a pure sine wave from a voltage sensor. I verified the sensor output using an oscilloscope, and the waveform is clean. However, the ADC readings on the STM32 show a very low-quality signal that appears as a stepped waveform rather than a smooth sine wave.I have already tried increasing the sampling rate, running the ADC at its maximum clock speed, and using a timer as an external trigger source for the ADC, but none of these solutions improved the result.I would appreciate any suggestions on what could be causing this issue.
Are there plans to update CubeMX to support MacOS 27 and later? I have just installed 6.17.0 under MacOS 26 and I get a warning to say the installer will not work with later versions:This is because support for the Intel translation layer will be removed (M series Macs are now into their 5th year).Note the CubeMX app itself does not get this - just the installer.
Hello.I have a project created earlier in CubeIDE 1.9.x, which I imported into the new CubeIDE 2.1.1. However, due to some issues with the project/code, I want to revert to the basics and create a fresh new project.There are some issues:In CubeMX 6.17.0, when configuring GPIO pins, nothing appears in the GPIO window:Additionally, there are problems with ICACHE:I cannot generate code without warnings.These problems occur when creating the project.Closing the IOC file and CubeMX, then reopening the IOC file a second time, resolves the issue. I can live with this workaround, but I’m reporting it.The second problem is in CubeIDE: when importing a project, the “C/C++ Index” tab is missing:Also some tabs missing in Properties:What I’m doing wrong?I followed the instructions exactly as in the video from this topic: PS. Sorry, there are mistake in title: CubeMX 6.17.0, not 1.67.0.
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.