Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
It is same error for me with stm32g071cbt6 I just made a new project. And tried to use ADC1_IN16 pin for analog conversion. Still I can not use ADC1_IN16 Do you have a solution?
Hi,When the STM32CubeMX or STM32MCUFinder try to update the database, I receive this error at the final step. I tried many things but all failed. It happens recently. I had not such a problem before.
Does the STM32G491KC have Quad SPI capability? The documentation and product selector tools (on website and within Cube IDE) say that it does have QSPI, but when I try to configure it within the Cube IDE the options is grayed out with the message "Dual Bank mode must be enabled"
In a project I made with the stm32f072 processor, I am using version 1.16.1 for stm32 CUBE IDE and version 6.12 for Stm32CUBEMX.In this project, I want to define the 2 pins that I defined as interrupt as input. However, after making changes, my code does not work. When I define input and then define the pins as interrupt again without making any code changes, my working code does not work. Is there a problem when updating ioc files?
I'm working on a STM32H755ZIQ. I am setting up a SPI master, with CPol= 0, CPha = 1, accordingly I need the clock to be low when inactive. Additionally I want the clock to be low when idling, even when the SPI is not active. To achieve this, I have modified the GPIO settings to use a pulldown resistor on the clock pin.I set this up using the CubeMX utility, but I don't necessarily trust it, so I have checked the generated code, and I find, in main.c, within the function MX_SPI1_Init(void), the polarity is set low:and also, in stm32h7xx_hal_msp.c, within the function HAL_SPI_MspInit(SPI_HandleTypeDef* hspi), the GPIO is set to use the pulldown resistor:And yet, the clock is idling high. You can see in the logic trace below, that the clock is NOT normally pulled down, but only goes low when the SPI is activated. I assert the CS pin before carrying out an SPI write operation. The clock is still high when the slave detects the CS change, and the slave fails
CubeMX upgrade 6.13 -> 6.14left in linker script following configuration:_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of RAM */MEMORY{/* Start MX regions */DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128KFLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048KRAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64KITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64KRAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288KRAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K/* End MX regions */RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K}.data :{} >RAM_D1 AT> FLASH.bss :{} >RAM_D1 ._user_heap_stack : {} >RAMduplicated area of RAM and overlapping heap with data
Hello Guys,I am trying to read data via I2C bus using HAL_I2C_Master_Receive_DMA and HAL_I2C_Mem_Read_DMA, but both are not workingIf I use HAL_I2C_Master_Receive it is workingI tried to manually disable and then re-enable DMA channel used by setting enable bit but this doesn't helpIf I add DMA function in addition to HAL_I2C_Master_Receive iw also stoped working except on first use.Also in debugger instruction marker is skipping DMA functionsI tried to add volatile to array definition and to set compilator optimization level to 0, but nothing helpedI tried my simple code in uVision5 and True Studio debuggers and result is the same, DMA functions are not workingCould you help me with this issue and give me some examples of using above functions?
Hi,I am designing a custom board with a STM32F405RGTv being flashed by a FT2232 over the 4-wire JTAG protocol, where the FT2232 chip triggers the STM RESET line as needed. This circuit has been verified in my previous designs. However this new board contains a EXTI configuration for pin PA4. In creating the CubeMX configuration for the board, I added this EXTI configuration and that disabled my 4-wire JTAG configuration. I attempted to add it back and found it greyed out. Is there a conflict between running JTAG without the nJRST line and the EXTI4 interupt controller? Is this related to errata 2.2.7, which although different mentions how one cannot use PB4 as a GPIO when the other 4 wires of JTAG are active? I want to ensure I can move foward with this EXTI channel before I finalize board design, any help would be much appreciated. TLDR: Do 4-wire JTAG and EXTI4 channel conflict on the STM32F405RG? If so, can I be pointed to a resou
I tried to validate on desktop... an ai model but ended with this error...please help me with this error
Hi! I'm using an STM32F401RET6 and was planning on using both USART1 in Asynchronous mode and USB_OTG_FS peripherals.In STM32CubeIDE when they are configured at the same time there is an error. I've tried PA9/10 and PB6/7 for TX/RX for USART1 but the same warning/error shows. I wonder if there is some pin configuration interference that it isn't showing or if maybe some interference with the boot modes (Section 3.12 of DS9716).Can I use USART1 and and USB_OTG_FS at the same time?
Hi, Not sure if this is an issue or if I'm missing something.Shouldn't the processors reset-pin be pinned by default even though it allows for alternative functions?Maybe this is a non issue, but I feel like the reset pin is somewhat critical.
I just started working with the STM32N6570-DK and tried a simple blink the LED example based on the "How to create an STM32N6 FSBL load and run" article. I selected the Initialize with default parameters option and without touching any configuration options, I received this warning on Code Generation. "Main Config: These peripherals still have some not configured or wrong parameter values: [Clock]." If I cancel the build, I can go back and get the option to run automatic clock issue solver. The Clock Configuration screen has a complete section in yellow related to PLLs and frequencies to IC1 to IC20 listed individually (partial screenshot attached). Is this yellow indicating the configuration error or just highlighting something that CubeMX wants to emphasize? What are these IC1 to IC20 designations represent? Without doing anything I can exit, and code will be generated without another error. Trying to run that code results in the Error
By setting up a new project in STM32CubeMX 6.10.0, when adding a Semaphore in FREERTOS, the generated code is not correct, and the binary semaphores are initialised in a Taken state ( initial_count=0 of osSemaphoreNew() ) - resulting in the fact that the application will never be able to take the semaphore - see code snippet below. /** * @brief FreeRTOS initialization * None * @retval None */ void MX_FREERTOS_Init(void) { /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* USER CODE BEGIN RTOS_MUTEX */ /* add mutexes, ... */ /* USER CODE END RTOS_MUTEX */ /* Create the semaphores(s) */ /* creation of i2sHalfCpltReadySem */ i2sHalfCpltReadySemHandle = osSemaphoreNew(1, 0, &i2sHalfCpltReadySem_attributes); The correct function call should be with initial_count=1 as here below and how it was in older MX versions foo = osSemaphoreNew(1,1, &bar); For users having the same issu
I make a new product with NetXDuo for STM32H743.But, it is included error code in RTE_Components.h RTE_Components.h (A project)/* USER CODE END Header */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __RTE_COMPONENTS_H__ #define __RTE_COMPONENTS_H__ /* Defines ------------------------------------------------------------------*/ /* STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0 */ #define FILEX_ENABLED #define FX_SD_INTERFACE NX_ETH_INTERFACE_ENABLED #define LAN8742 #define THREADX_ENABLED #define TRACEX_SUPPORT_ENABLED #define NETXDUO_ENABLED #endif /* __RTE_COMPONENTS_H__ */ RTE_Components.h (B project) /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __RTE_COMPONENTS_H__ #define __RTE_COMPONENTS_H__ /* Defines ------------------------------------------------------------------*/ /* STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0 */ #define USBXDEVICE_ENABLED #define UX_DEVICE_CONTROLLERS_ENABLE
Hi,In CubeIDE, new project, choosing STM32H755ZIT6 (the NUCLEO-H755ZI-Q), the board stops responding when turning off and on the power to the board. I have made a simple LED example with everything set to default with the addition of two user LEDs blinking - one controlled by M7 and one by M4 core. It works fine until you remove the USB and put it back in. Then ST-link cannot connect. I have used the debug configuration from the application note:Getting started with projects based on dual-core STM32H7 microcontrollers in STM32CubeIDE - Application note STM32Cube Version: 1.17.0CubeMX version: 6.13Firmware package: H7 V1.12.1 Best regards Nikolaj
In file generated by CubeMx when creating a new project, the SystemInit function does not set the register of the interrupt vector table (SCB-> VTOR) !!! The default value is zero, which causes a crash on the first interrupt trigger, i.e. the code loops to an address 0x1FFFxxxx (system memory)freshly generated code/** * @brief Setup the microcontroller system. * @retval None */void SystemInit(void){#if defined(USER_VECT_TAB_ADDRESS) /* Configure the Vector Table location -------------------------------------*/ SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET;#endif /* FPU settings ------------------------------------------------------------*/#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) SCB->CPACR |= ((3UL << 20U)|(3UL << 22U)); /* set CP10 and CP11 Full Access */#endif /* Reset the RCC clock configuration to the default reset state ------------*/...code of the previous version of the package/** * @b
I'm trying to verify my connection to the STM32H745 built in bootloader over UART 1, using pins PA9 and PA10 using STM32CubeProgrammer. First I erased flash by using full chip erase flash memory in STM32CubeProgrammer using JLink/Flasher. I then disconnect the JLink and change STM32CubeProgrammer to connect via UART, and power cycle. Is my assumption correct that an erased flash on the H745 will automatically jump to the bootloader at power up?The board is our own design, not a demo board, and is functioning as expected when our application code is loaded.. I have pin BOOT0 low. I have a pull up on PB15. I have flash erased. STM32CubeProgrammer won't connect over UART. When I have my application code in flash UART1 fully works, sending and receiving data so I can rule that out as a problem. Anybody have suggestions what I might have wrong, or can confirm my assumption that a blank flash will jump to the bootloader on its own?
I installed stm32CubeIDE version 1.18.0Started a new stm32 project, selected my board, clicked ok for everything (like it showed a window which contained 5 checked options of led,virtual port etc etc.), i selected all and clicked ok.Then activated XCubeAI package, checked core and selected validation under application, then clicked on OK.Then i tried to open that network window... but before that a small window opened which showed configuring usart3 and it got stuck at 70% for very long time... i tried closing the app and disconnecting, restarting pc... but the same thing is happening... i shared a screenshot of where it got stuck...PLease help me with this...
When generating code in CubeMX for the MDK-ARM Toolchain, the uVision Project file (.uvprojx) is corrupted.When I try to open the project it shows the following message: Comparing the project files shows that the following section gets removed:Manually adding this section back solves the problem temporarily until the next code generation is done.What could be the cause for this?I´ve already tried different versions of STM32CubeMX and uVision. Current Versions: CubeMX: 6.14.0uVision: 5.41STM32U585 V 1.7.0
For a project I am using the STM32U073 and for testing the development board with the STM32U083. I have encountered several issues in CubeMX and perhaps also in the hardware: The code that CubeMX generates for the low power timer contains a typo. Line 4214 says "tmpccmr2 = hlptim->Instance->CCMR1;", but it should read CCMR2 instead LCD_MspInit() should be called during startup (probably in MX_LCD_Init() in main.c), but that does not happen. __HAL_RCC_PWR_CLK_ENABLE() is not called at startup, but it needs to be. LCD_IRQHandler() in stm32u0xx_it.c does not call a weak function like every other interrupt handler, but requires code in the USER CODE BEGIN/END block in there. In stm32u0xx_hal_msp.c, at line 568, the alternate function of the timer pin needs to be set to enable a PWM on timer 2: GPIO_InitStruct.Alternate = 1; Finally, the encoder on low power timer 1 is behaving very weird. Apparently, even though this is not very clear from the reference manual, the "match" event ha
Hello ST,I'm encountering an issue when generating an STM32G474 project using STM32CubeMX V6.14.0. When using the default Scatter File (stm32g474xx_flash.sct) generated by CubeMX in Keil, the program gets stuck at HAL_Init(). However, if I check the "Use Memory Layout from Target Dialog" option in Keil to let it generate the sct file instead, the program compiles and runs normally.This problem didn't occur in the previous version, V6.13.0. Could you please look into this and verify if there's an error in the Scatter File configuration generated by CubeMX V6.14.0 for STM32G474 projects?To give you a better understanding of the issue, I've included some relevant code snippets below:stm32g474xx_flash.sct (generated by CubeMX V6.14.0); ********************************************************************************* ; *** Scatter-Loading Description File generated by STM32CubeMX/LinkerGenerator *** ; *********************************************************************************; LR_IRO
I use the STM32L496ZG. When generating the files using STM32CubeMX it also generates MX_Device.h which contains several defines. When using LPUART1 with DMA it also generates defines like:#define MX_LPUART_RX_DMA_DMA_Handle #define MX_LPUART_RX_DMA_Instance DMA2_Channel7The CMSIS Driver for the UART however uses:#ifdef MX_LPUART1_RX_DMA_Instance #define UART6_DMA_USE_RX UART_DMA_USE_RX #else #define UART6_DMA_USE_RX 0 #endifSo using MX_LPUART1_RX_DMA_Instance is not the same as MX_LPUART_RX_DMA_Instance and causes the DMA to be disabled.MX_Device.h should contain LPUART1 instead of LPUART with regards to the DMA defines as it also does with the Pin and IRQ defines.
I followed this tutorial: https://www.youtube.com/watch?v=xbWaHARjSmk and this github link: https://github.com/micro-ROS/micro_ros_stm32cubemx_utils to create a custom board support for micro-ros. When i compile my project, I get the following errors:====================[ Build | stm32f4_uros.elf | Debug ]======================== /snap/clion/234/bin/cmake/linux/x64/bin/cmake --build \/home/tzinkii/Workspace/Embedded/stm32f4_uros/cmake-build-debug --target stm32f4_uros.elf -- -j 3\ -- Minimal optimization, debug info included\ -- Configuring done\ -- Generating done\ -- Build files have been written to: /home/tzinkii/Workspace/Embedded/stm32f4_uros/cmake-build-debug\ [ 2%] Linking C executable stm32f4_uros.elf /usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: error: stm32f4_uros.elf uses VFP register arguments, /home/tzinkii/Workspace/Embedded/stm32f4_uros/micro_ros_stm32cubemx_utils/microros_static_libr
Hello st forum,I'm currently working with STM32G0B1VCI6, I'm trying to configure the ADC1 channel but it is not working properly. I need to convert 11 channels (10 external and 1 internal channel) and I'm configuring the driver in such a way it can convert all channels at once. According to the documentation, when sequencer is set to not fully configurable, the conversion is done for the enabled channels using their defined channel ID. My plan is to catch each ECO event to save the data until detect the last element (EOS event). However, I'm getting the interrupt immediately with the EOS flag enabled, causing to just read one data instead of 11. This is the configuration I'm using: @Roger SHIVELY
Hi,I just updated CubeIDE/CubeMX, and after creating a new project, I began configuring the microcontroller. However, when I tried to install FreeRTOS, it didn’t seem to be available. In the older version of CubeMX, there was a FreeRTOS option under Middleware (as shown in the first screenshot from a video), but it appears to be missing now. I did find X-CUBE-FREERTOS, but it doesn’t seem to offer any options like CMSIS_V1 or CMSIS_V2 or any ther very many parameters that FreeRTOS that in the previous version were available.What happened?1. Is that X-CUBE-FREERTOS, the only or perhaps the preferred option to use/install hrough MX?2. How do I select CMSIS_V1 or CMSIS_V2 and all other parameters like in the older configurator (third screenshot)?3. Are all ST libraries that rely on FreeRTOS now using X-CUBE-FREERTOS?Thanks you :)Ricko
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.