Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
STM32CubeMX version 6.1.1Generated a project using STM32CubeMX for an STM32L053R8T device. The import into VisualGDB on visual studio failed after consulting VisualGDB support. They found that the .gpdsc file generated by the STM32CubeMX is referencing a header file that doesn’t exist.The header file that was missing from the STM32CubeMX project was Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_dma_ex.hManually copying the file from the repo to this location in the project solved the import\build issue with VisualGDB
Hi,I have NUCLEO-G071RB board . My System Clock frequency is 64 MHz .The Timer (6) with Generates Continue Interrupt is working fine by CubeMx Code By Just adding HAL_TIM_Base_Start_IT(&htim6) ; LineI need only One Pulse But One Pulse Mode on "Cube Check Box Option" is not working at my endsif(SW == 0){ // Generate One Pulse according to Timer HAL_TIM_Base_Start_IT(&htim6) ;} Do I need something extra in code ?--Karan
How to updateTwo ways to update to the new release:1- Install directly from Web2- From STM32CubeMX GUI, update to 6.1.2 and then to 6.2.0/6.2.1 (compatibility break for the update due to JRE bundling in the new release)What is new in STM32CubeMX V6.2.1? Added the support for new firmware and manifest version in the STM32MP1 Series: • Linux Kernel 5.10 LTS • openstlinux-5.10-dunfell-mp1-21-03-31Main fixed issues in V6.2.1 88481 [STM32CubeMX][STM32MP15] PA10 assigned to USB_OTG_HS_ID when configuring USB OTG with device-only controller. 96553 [MBOX_IPCC] Unexpected rproc_virtio_notified call.What is new in STM32CubeMX V6.2.0? • JRE is now bundled in the install, no more need to install a JRE on your machine to use STM32CubeMX• WolfSSL and Unison RTOS I-Cube packs are available in STM32CubeMX• Enhanced the Software Packs feature with secure context support and others • Added new videos accessible to residents in mainland China • Added the support for new part numbers in the STM32G0 Series
Original post is here: https://community.st.com/s/question/0D53W00000asPehSAE/stm32l4-freertosdma2-channel-4-problemPossible solution: https://pastebin.com/yCxq9E6qMaybe in STM32L476RG it was fixed but problem occurs also in STM32L496ZGT.
This was reported almost 2 years ago but nothing has been done with it. There is still no implementation of memory pools with CubeMX. https://community.st.com/s/question/0D50X0000ArTaCESQ0/bug-cmsis-rtos-v2-missing-memory-pool-functions
Hi,I am checking the UART TX linking with DMA. I am not getting the data serially. I am checking in tera term at PC end sending the helloworld string.I generated code from the CubeMx. With out DMA it is working fine. I debugged that it is hanging the in the state of the UART_DMA_TX_BUSY state.I am using the stm32f401re nucleo.Can you please help me out. Regards,
Hi there, I'm working with the STM32CubeIDE and noticed that the automatically generated code from STMCubeMx in main.c implies the user is male, which strikes me as odd:void Error_Handler(void) { /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ __disable_irq(); while (1) { } /* USER CODE END Error_Handler_Debug */ }A more inclusive phrasing could be "User can add their own implementation..."I know it's a small thing, but as our industry is attempting to be more inclusive these little things are important. I of course don't think that ST or any employee is intentionally doing this, just to be clear, but wanted to point out the line. It also occurs elsewhere in automatically generated files.Thanks!
Hello to dear developersAll of us know that version 5 is really slow, while version 6 is really fast. The matter is while you use version 5 with browse information disabled, the speed tunes up, but with the price of browse information absence. It is rude of me, but I wonder what is the main problem that this option has not been yet developed.
I want to use the oversampling feature in SAI block in STM32H742/743/750 device to set MCLK = 512*Ffs (sample frequency).There is the OSR bit in SAI configuration register 1 (SAI_ACR1) to enable this feature. But I cannot configure this feature with CubeMX. There is no option in Parameter Settings of the SAI block in CubeMX.But it is supported from HAL. In the init structure you can set the option to set:hsai->Init.MckOverSampling = SAI_MCK_OVERSAMPLING_ENABLE;to enable this function. But if you add this line in sai.c MX_SAI1_Init(void) it will be overwritten from CubeMx code generation.Has anyone found a proper solution for that or any (hidden) optin in CubeMX to enable this function directly?
Hi,I have downloaded the en.x-cube-smbus.zip package.How can I added it to the stm32CubeIde as a middleware?I have unzipped the file and moved the folder into STM32Cube/Repository/STM32Cube_FW_F3_V1.11.2/Middlewares but it is not seen by the stm32CubeIde application.Thanks.Pedro.
Hello, Have you ever seen the "N" suffix at the part number? Is the first time I see it. It seems to be some pinout differences, but... it implies any more differences?Thanks!
Hi All,With CMSIS V1 the default priority for the FreeRTOS Timer Task is set to 2. In CMSIS V1 that is the highest priority for a thread (low numbers = high priority). In CMSIS V2 the priority scheme was reversed (high numbers = high priority). However the default priority for the Timer Task remained at 2. That means the Timer Task is now the lowest priority thread in the system (excluding idle).The job of the Timer Task is to unblock higher priority threads. So unless I'm wrong, using the current default priority of 2 effectively disables much of its preemption capabilities.I discovered this when my highest priority thread could not preempt low priority threads. It sometimes took several seconds to wake up when there was high demand from the lower threads.So I think for CMSIS V2 the FreeRTOS Timer Task priority setting should be (MAX_PRIORITIES - 1) not 2.Note, the change can make the threads much more responsive, but also have an unforeseen impact if the design relies on a delayed re
I am not sure if this should be in github or here. But I encounter erroneous code when I use math operation on Timer Prescaler setting, details are belowDescribe the set-upThe board : NUCLEO-G474REIDE or at least the compiler and its version : CubeIDe 1.5.1 and CubeMX 6.1.1-RC2, F1.3.0Win10Describe the bugTIM6 LL in CubeIDE/MX prescaler cannot use math operation like 170 - 1, (170-1), 170-2, etc.This is not a problem with ARR. posted in https://github.com/STMicroelectronics/STM32CubeG4/issues/24
friends, I have a problem, can you help? I am working with the stm32f746vgt6 microcontroller. I came across something that had never happened to me before. I am using freertos. My crystal frequency is 25 Mhz. Whenever I select the sys timebase source as a source, the microcontroller cannot start, it constantly dials tim interup. but the microcontroller ends in the reset printing process. Has anyone been seen before?
I have a new pc with STM32CubeMX 6.1.1 and SW4STM32/OpenSTM32 IDE version 2.9.1.I created a simple project setting mcu to STM32L475GTx, activated a few pins and generated code. The project generated has no mcu selected. What is set up incorrectly in my cube project?
Hi,I can not generate a simple project for Keil any more, The problem happened after I have upgraded my CubeMX from version 6.0 to 6.1.1How should I solve the problem? what's going on wrong?
According to this post:https://community.st.com/s/question/0D50X0000C0vEvBSQU/cubemx-cmsisdsp-include-problemsit should be possible to use the latest CMSIS (e.g. 5.7.0 from https://github.com/ARM-software/CMSIS_5/releases/tag/5.7.0) in CubeMX 6.1.1. After package installation I can see it on the list but it does not appear under "Additional Software" section. Actually, this section is missing entirely.What I am trying to accomplish is to get the latest version of L1 cache management functions in generated code for STM32H7A3 MPU. Versions from CMSIS 5.7.0 package seem to significantly improved compared to those from STM32Cube_FW_H7_V1.8.0 package. Of course, I can generate code and then start making changes but I would rather not in likely case I need to regenerate.
Hello All, I need to start the flash program from 0x08020000 origin. I have updated the linker file with that value as you can see at below./* Memories definition */ MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K FLASH (rx) : ORIGIN = 0x8020000, LENGTH = 128K //previous one was 256K }Indeed, I have updated the vector table register which is VTOR from system_stm32f4xx.c. You can see the SystemInit function at below. /*!< Uncomment the following line if you need to relocate your vector Table in Internal SRAM. */ /* #define VECT_TAB_SRAM */ #define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. //0x00 This value must be a multiple of 0x200. */ /******************************************************************************/ void SystemInit(void) { /* FPU settings ------------------------------------------------------------*/ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 an
..
Info : STM32F746NGHx.cpu: hardware has 8 breakpoints, 4 watchpointsInfo : Listening on port 3333 for gdb connectionstarget halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0800b664 msp: 0x20050000Info : Stlink adapter speed set to 1800 kHzadapter speed: 1800 kHz** Programming Started **auto erase enabledInfo : flash size probed value 1024target halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x20000084 msp: 0x20050000wrote 65536 bytes from file Debug/PeripheralsTrial.elf in 1.273580s (50.252 KiB/s)** Programming Finished **** Verify Started **target halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x2000002e msp: 0x20050000verified 47680 bytes in 0.160581s (289.963 KiB/s)** Verified OK **** Resetting Target **shutdown command invokedI see that there are 8 breakpoints and 4 watchpoints in stmWorkbench. But I did not find which part of the project has this. I have also tried selecting option of 'remove all brea
Hi,I am using STM32CubeMX, ver 6.1.1 on Linux and I noticed the following bugs in the Makefile generation:The first problem: The C_INCLUDES variable.--------------------------------------------------------------If a Makefile does not exist in the target directory, a Makefile is generated and this mostly works. However, on regenerating the code after the initial generation, an extra line is appended after the C_INCLUDES variable. This causes a failure on running make. The variable looks something like this after the initial generation:C_INCLUDES = \-ICore/Inc \..-IDrivers/CMSIS/IncludeAfter the second generation, it looks like this:C_INCLUDES = \-ICore/Inc \..-IDrivers/CMSIS/Include-IDrivers/CMSIS/IncludeNote that the second last include line has no \ behind it, so make assumes that the last line is a make target "-IDrivers/CMSIS/Include". This is an error.The line should not be generated, so to get the Makefile to work, this line always needs to be deleted manually.The second
I'm using stm32h745. CubeMX Clock Configuration shows APB1 and APB2 clocks are 120MHz, and APB1 and APB2 Timer Clocks are 240MHz (2 x 120). When i call HAL_RCC_GetPCLK2Freq(), HAL_RCC_GetPCLK1Freq(), they indeed return 120MHz. I use general purpose timer to generate PWM based on timer clock freq of 240MHz. PWM signal freq is way off. For example i use timer clock of 240MHz to compute a 53KHz PWM; scope shows 16.95KHz PWM instead. This is the same code used to calculate PWM freq, from timer clk freq, used on other projects so i know it works correctly. It seems the timer clk is not 240MHz but something else. If someone has knowledge of stm32h7 timer clock freq, please let me know.
After updating to the latest release of CubeMX (6.1.1) I am seeing a bug in how the naming of IO pins with User Labels.When typing the User Label in, the field auto selects the text and erases the value typed in. This did not happen in the previous version.This is on macOS with Mojave (10.14.6) on a Mac Book Air 2015.The work around is to use the arrow keys to un select each time a new character is typed.Caleb
hi i have a problem with sd card, i am trying to write a file.txt using the fats libraryi am using cube mx old version and sdio reader data0, clk, cmd ....here the code: MX_GPIO_Init (); MX_USART2_UART_Init (); MX_SDIO_SD_Init (); MX_FATFS_Init (); / * USER CODE BEGIN 2 * / / * USER CODE END 2 * / UINT testbyte; / * USER CODE BEGIN 2 * / FATFS myFATFS; FIL myFILE; if (f_mount (& myFATFS, SDPath, 1) == FR_OK) { HAL_GPIO_TogglePin (LD2_GPIO_Port, LD2_Pin); char mypath [] = "test1.txt"; char myData [] = "hello world"; if (f_open (& myFILE, mypath, FA_WRITE | FA_CREATE_ALWAYS) == FR_OK) { HAL_GPIO_TogglePin (LD2_GPIO_Port, LD2_Pin); if (fwrite (& myFILE, myData, sizeof (myData), & testbyte) == FR_OK) { HAL_GPIO_TogglePin (LD2_GPIO_Port, LD2_Pin); } f_close (& myFILE); }the problem tha
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.