Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello,while configuring the CSI interface for camera , on its enablement in the STM32CubeMX why I can’t see the GPIOs corresponding to it in the flip section? does it has any dependency on any other peripheral?or clock setting?under the configuration it says warning: this peripheral has no parameters to be configured.Unlike in any other peripheral like I2C or SPI where I can see the corresponding GPIO i am checking this on STM32N657X0HxQ .regards,
Using an STM32H7Rx or Sx, using I2C2 clocked by PLL3R at 10 MHz:If you set the I2C speed to 10 kHz with analog filter disabled, you get a timing value of 0x1010F1FF, with SCLH and SCLL values of 241 and 255. This seems reasonable.However, if you enable the analog filter, you get 0x400007BE. This does produce the correct frequency - but the SCLH and SCLL values are 7 and 190, which do not appear to be sensible.Is this a bug?(I've sent an IOC file to @Souhaib MAZHOUD ; you'll need to edit the I2C2 settings to see this happen.)
Hi all,I recently updated the IDE to v1.19 and MX to v6.15.0, and the MX code generation is no longer working for me.After some testing, I found out I can create new projects and code is (apparently) well generated. After this first generation, if i change anything in CubeMX and regenerate, the .ioc file is updated accordingly but the code is not changing at all.My device is STM32U575VG (FW package 1.8.0).As an example I created a project with just TIM1, generated the code, added TIM2 through CubeMX and renegerated.I attach the first .ioc file (DELME_New_Project.ioc) and the updated (DELME_Updated_Project.ioc) for reference. The code has not been updated:Any ideas? Am I missing something? Is anyone else facing this problem?Alex
STM32CubeIDE Version 1.19.0Build: 25607_20250703_0907I created a project using the STM32F107 and Ethernet. Everything was setup using the .ioc template with Ethernet and various GPIO stuff. Lwip was not included. I generated the code and all of the Ethernet configuration was created. Compiling the code worked with no errors.I have not connected my board and tried to program it as I just wanted to see if CubeIDE would generate the code properly for the STM32F107 part.I then re-opened the .ioc file and enabled Lwip since that was my goal. Now when I generate the code, it removes all of the Ethernet setup code. This means none of the Ethernet RMII pin mapping is in place and none of the Ethernet files are in the project.Is the STM32F107 no longer supported for Ethernet+Lwip applications? I just need a simple application with 2 buttons to control 2 relays. An STM32F7xx is overkill.I think I remember reading somewhere a couple of years ago that ST was no longer going to support Ethernet for
Hi,Using STM32CubeMX version 6.15.0When I start a new project from the NUCLDO-F767ZI board I just get a blank chip, none of the component configuration at all, I tried it on two PC's both the same.This used to work and was quite handy starting a new project. At the moment I am going through a selection of processors so having to manually configure it before I can test it is a bit of a pain, any solutions?
Hi Support team, I am working on the FREERTOS based project and i need to disable the code generation for pendsv handler, systick handler, svc handler . As this handlers are written in freeRTOS, I am getting error for multiple definations. I have seen the option to skip the code generation in previous versions of the software but now i am not able to do so. you can see an empty page in code generation option. Please help solve the issue.
Hardware: STM32L071CZTXSoftware Versions:STM32CubeMX 6.14STM32CubeIDE 1.18Problem Description:I'm experiencing code generation issues with both Cube software tools on an existing STM32L071CZTX project:Issue 1 - STM32CubeMX 6.14:Code generation process gets stuck and becomes unresponsiveOnly way to terminate is through Task Manager (killing OpenJDK Platform binary process)Issue 2 - STM32CubeIDE 1.18:Code generation fails when modifying clock parametersNo code is generated after clock configuration changesSteps Already Taken:Performed complete uninstallation of all STM32 softwareFresh installation using newly downloaded files from ST websiteVerified MyST account login on both applicationsRequest: Has anyone encountered similar issues with these software versions? Any guidance on resolving these code generation problems would be greatly appreciated.Thank you for your assistance.
Hello,I have an STM32G474RE Nucleo board configured in Dual Regular Simultaneous Mode for ADC 3/4 using CubeMX. I noticed some strange behavior with ADC 4, specifically that its conversions freeze after operating for some length of time. I thought I was experiencing a software problem on my end, but after much testing and ordering another board, I believe the issue is inherent to the STM32G474RE. When I configure a simple test for ADC pair 1/2 with DMA, using Dual Regular Simultaneous Mode and triggered by a timer, and separate the resulting conversions into two 16-bit values in the debugging window, no issues arise. But when I repeat the test and only change the ADC pair to ADC 3 (master) and ADC 4 (slave), the conversions from ADC 4 freeze every time after some length of time. I also noticed that any other code makes the problem worse. For example, if I poll SPI Transmit/Receive in the while loop in main, the readings from ADC 4 freeze almost immediately. I even tested a simple "cnt_
The longevity statement in stmcufinder does not list e.b. U0/3/5 and states that all periods start 2020. An update should be considered.
Hi there! Not entirely sure if I'm missing anything here: I've been running issue when usign FatFs library with SDMMC1 on a STM32H755ZI due to the MBR sector readback been partially incorrect. Specifically during check_fs() where we check location where the ASCII for "FAT32" is store in the MBR sector (first 512bytes). The card can be verified to function correctly using HxD tool on Windows:However, through SDIO on the STM32 platform, I was getting different result for the byte [82:86], as the location is completely cleared. byte[32:24] seems to be offset to a completely different location instead:Here is the code snippet where I used HAL library to grab the first (block) 512bytes: const uint32_t BlockAdd = 0; const uint32_t NumberOfBlocks = 1; HAL_StatusTypeDef status = HAL_SD_ReadBlocks( hsd, (uint8_t*)pData, BlockAdd, NumberOfBlocks, Timeout ); if (status == HAL_OK) { if (HAL_SD_GetCardState(hsd) != HAL_SD_CARD_TRANSFER) { return HAL_ERROR; } }If anyone have any
Hey! I'm trying to get USB up and running on a STM32U595VJT6. From the reference manual, it says it's supported. However, when in STM32CubeMX, the USB_OTG_HS is grayed out. This is on a fresh project, so there's no pin conflicts or similar. This is how it looks: Do you have any ideas what the problem might be?
When trying to build an STM32CubeMX V6.13.0 generated cmake+gcc project with clang there are two files that generate errors:sysmem.cthe linker script (STM32L431RCTX_FLASH.ld and stm32l476rgtx_flash.ld)sysmem.c produces the following error:Core/Src/sysmem.c:30:35: error: use of undeclared identifier 'NULL'[build] 30 | static uint8_t *__sbrk_heap_end = NULL;This is caused by the fact that only errno.h and stdint.h are included. None of them officially define NULL. But they probably do in gcc. Also ptrdiff_t is undefined.sysmem.c can easily be modified by either:The easiest is not to use NULL but (void*)0. This is something ST could do. including stddef.h . This defines NULL and also ptrdiff_t.or modifying build to forcebly include such a file in all files (adding "-include stddef.h" to compile command). I did this so I wouldn't have to modify the file (which would get overwritten by regenerating code). But it's kind of a hack.Linker script:Linker scmemory region not defined: RAM[bui
Hi everyone,I’m using the new Arm Toolchain for Embedded with CMake. I generated a project template from STM32CubeMX using the following settings:Toolchain/IDE: CMakeDefault compiler/linker: Arm-ClangCompilation works fine, but when linking starts, I get this error:ld.lld: error: STM32G474XX_FLASH.ld:105: symbol not found: READONLYIt looks like the Arm toolchain (even the latest v21.1.1) doesn’t support the READONLY keyword. It’s not a big deal to adjust the .ld file - just remove the READONLY keywords - but it would be nice if the generated template worked out of the box.Am I missing a setting somewhere? Is there an alternative/better way to obtain the linker file?Edit: I'm using the STM32G474.
I've been trying to build example projects (i.e. Ux_Host_HID) with the make tool chain config with stm32cubeMXSo when i run make, a bunch of stuff compiles, then i get this error.make: *** No rule to make target 'build/tx_initialize_low_level.o', needed by 'build/Ux_Host_HID.elf'. Stop. So when I search for that tx_initialize_low_level I find a .s assembly file in Ux_Host/Core.SrcAlso, the make file seems to already be looking for assembly files to create the .o but for some reason, make is not recognizing it has a valid rule. $(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)$(AS) -c $(CFLAGS) $< -o $@$(BUILD_DIR)/%.o: %.S Makefile | $(BUILD_DIR)$(AS) -c $(CFLAGS) $< -o $@ Note: all files are generated from STM32CubeMX form their examples directory.
Hello, I'm trying to implement a USBX host... and the code generates a lot of runtime errors. I assume everything is setup properly from CubeMX, but the code always fails. 1- I see that the mutex was created from the debug session: (ux_system_mutex)2- the system fails when trying to initialize the UX system.3- The error came from _ux_utility_mutex_on() and generates an error code 0x04VOID _ux_utility_mutex_on(UX_MUTEX *mutex) { UINT status; /* Call ThreadX to get system mutex. */ status = tx_mutex_get(mutex, TX_WAIT_FOREVER); /* Check for status. */ if (status != UX_SUCCESS) { /* Error trap. */ _ux_system_error_handler(UX_SYSTEM_LEVEL_THREAD, UX_SYSTEM_CONTEXT_UTILITY, status); } /* Return to caller. */ return; }so, it is trying to get the mutex (ux_system_mutex) and then wait forever....4- If I look at the AzRTOS manual: 0x045- The base code was auto generated by CubeMX. So basically it is trying to initialize memory using a mutex before starting
I run STM32CubeMX from the terminal and get an errror message in termianl.You can find the details in ‘error.txt'.
I have enable the hfmpi2c1 in STM32CubeMX tools, but I can find the FMPI2C_HandleTypeDef is undefined in the source code. Do we have a demo code to show how to setup and use hfmpi2c1. It's very confuse that the F446 only have one Fast Plus Mode IIC interface.
The STM32CubeMX generated main.c has the function MX_TouchGFX_PreOSInit() called directly after the MX_xxx_Init() functions, before I can insert my External Flash Initialisation (in /* USER CODE BEGIN 2 */).This prevents the use of the External Flash for the TextFlashSection defined by TouchGFX.It would be better to call MX_TouchGFX_PreOSInit() immediatly before MX_xxx_Init() (in my case MX_ThreadX_Init()).
Hello!As the title suggests, the demonstration program is generated from the options shown in the following figure.After the program is burned onto the board, it won't run. It enters the debug mode and stops at the "SystemInit" point. After clicking continuously several times, it will then enter the "main" section.Any help would be appreciated as I am losing hair over this haha.
I am migrating my project in CubeMX(6.15) from "FW_H7 V1.11.1" to "FW_H7 V1.12.1"I loose my QSPI configuration.It seems like a dependency to SPI2, but we are already using SPI in the old project. Please see the pictures from before and after upgrade. Also my project file file from before and after.
When I try to allocation any available analog inputs, Cube-MX hangs!!!!Attached is the .ioc file... To replicate, try to allocate any available Single ended analog input....sad....
Dear AllI am new to STM32CubeIDE and imported an example project I2C_OneBoard_AdcCommunication_DMAAndIT_Init, it work well, but when I try to do same with my own project, the generated code like MX_I2C2_Init(void) is totally different with the example, it seem use all LL drivers, and my project generate HAL code, my question are:1. How can I let my STM32CubeIDE to generate same LL driver? is use LL encouraged instead of HAL? 2. If I use example code function like Handle_I2C_Master_TransmitReceive() to interface with generated HAL code, will it work?3. When they generate different code, it is confusing and I cannot compare them and found which code is added by user later or generated by MX. I am using Nucleo-H563Zi board and my STM32CubeIDE version is v1.19. Thank you in advance.Ping
Hi!I have a board with an external oscillator. The oscillator would not start, and I spent a few hours debugging the issue only to find out the automatically generated code initialized the clock and the OSC_EN pin in the wrong order!relevant ioc lines:PC14-OSC32_IN\ (PC14).Mode=HSE-External-Clock-Source PC14-OSC32_IN\ (PC14).Signal=RCC_OSC_IN PC15-OSC32_OUT\ (PC15).Mode=OSC enable PC15-OSC32_OUT\ (PC15).Signal=RCC_OSC_ENthe generated code:/* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_ADC1_Init(); MX_TIM1_Init(); /* USER CODE BEGIN 2 */ ... void SystemClock_Config(void) { ... if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_O
Hello.In CubeMX, there is a Bug with a wrong Clock of USART2 and a wrong BRR-ValueI've used CubeMX to configure the Clock, based on the Nucleon-H563.For the USART2, i want to use the stable crystal oszillator (25MHz) from the Board (not the HSI-Clock)So i configure a 125MHz-Clock on PLL2Q and set this as clock for USART2.The Baudrate should be: 9600.After generating code, the baudrate of USART2 ist 3078,81 Baud (measured). To calculate the uart baudrate divider (USART2_BRR), MX use the: STM32Cube_FW_H5_V1.5.0\Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_uart.cIn Function: UART_SetConfig(UART_HandleTypeDef *huart) Line 3329, the usartdiv is calculated with: 407( (125000000 / 32) + ((9600)/2)) / 9600 = 407But with this, a wrong baudrate is generated (3078,81Baud) If i use 130 as divider, the Baudrate is near correct, because the USART-Clock seems to be 39,9013776MHz instead of 125MHz .What is the reason for the wrong clock of PLL2Q or the BRR?
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.