Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi,I am working on STM32G0 Nucleo Board with STM32 Cube IDE 1.3.0How to configure STM32G071R8 64-Pin LQFP Packageas Input or Output or Interrupt with STM32 Cube IDE 1.3.0 . ?Is there any special setting ? Which I am missing ?--Karan
I want to use DMA to move data from memory to DAC1 channel 1 and channel 2. Channel 1 uses DMA Channel 5 and that works. CubeMX configured DAC1 Channel 2 for DMA1 Channel 6. The datasheet says STM32G431 is a category 2 device which has only channel 0 to 5 for DMA1 and DMA2. So what is the correct channel to use for DAC1 Channel 2?
Hi,I have read the STM32F303RE reference manual along with using CubeMX 5.6.1 but can't seem to do what I want. The documentation of CubeMX is less than desirable IMHO.As an aside I am already using TIM2_CH2 on pin PB3 in Input Capture Direct Mode and using this to generate a DMA request. This is working.Now I want COMP7 to use DAC1_CH1 on the inv input and use pin PC1 on the non-inverting input. Then I want COMP7 output to go to TIM2_IC3.I'm unclear how to set up TIM2_CH3 in this scenario. When I select Input Capture Direct Mode CubeMX automatically chooses pin PB10 as TIM2_Ch3. I don't want an external pin selected, I want the COMP7 output.In CubeMX for TIM2 what do I choose as the mode for Ch3 ?
Just installed SMT32CubeMX and wanted to install CMSIS but it fails..... Screen shot shows errors.... anyone else having issues ?
I have an existing STM32F078VB firmware application. The following code used to work perfectly fine to jump to the DFU bootloader shortly after power up, based on the application firmware detecting 2 buttons being pressed on the board:#define BOOT_STACK_ADDR 0x200014A8 /**< Bootloader stack address */ #define SYS_MEM_START_ADDR 0x1FFFC800 /**< System memory start address */ void DfuStart(void) { void (*boot_jump)(void); /** * Disable peripheral clocks */ __HAL_RCC_GPIOE_CLK_DISABLE(); __HAL_RCC_GPIOD_CLK_DISABLE(); __HAL_RCC_GPIOA_CLK_DISABLE(); __HAL_RCC_GPIOB_CLK_DISABLE(); __HAL_RCC_GPIOC_CLK_DISABLE(); __HAL_RCC_GPIOF_CLK_DISABLE(); HAL_DeInit(); HAL_RCC_DeInit(); /** * Disable systick */ SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; /* Disable Timer 6 which is used as HAL tick source. */ __HAL_RCC_TIM6_CLK_DISABLE(); /* NOTE WELL: Do NOT disable interrupts here! */ /** * Run to s
Hello, I just bought stm32h747-disco. I would like to use it will keil, but the MX_Device.h file is not generated from stm32cubemx.Do you know maybe any way for this to be generated?Thanks in advance for your help.
Hi,I have a problem using UART7 on STM32H750VB. It is configured by STM32CubeMx to receive and transmit with DMA with a baud rate of 115200 but all the data that arrive from the external device cause FRAME or NOISE errors.I checked with my oscilloscope and the received baud rate is perfect, with minimal deviation (less than 0.5%), and there is no noise on the received data.Here are the clock and the UART7 configuration:/** * @brief System Clock Configuration * @retval None */void SystemClock_Config(void){ RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; /** Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); /** Configure the main internal regulator output voltage */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3); while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} /** Macro to co
Hello, I am trying to use SPI programmable amplifier MCP6S21 from TI with my STM32H743ZI2 nucleo board but nothing seems to happen. When I try to observe the signals from CLK and MOSI pins, there is nothing (even when it is supposed to be transmitting data). My SPI4 port is in Transmit Mode Only Master with a baud rate of 8Mbits/s and I transmit 8bits words. I use the HAL_SPI_Transmit(&hspi4, buf_tx, 2, 100); function to transmit.HAL library seems to be in 1.8 version .My CubeIDE is in 1.3.1 version and my CubeMX is in 5.6.1.202004052303 version.Do you have any idea to help me ? Thanks for future answers ;)
Hi, I updated everything to the latest CubeMX and packages. When I generate BLE code now (just a simple P2P Server) the build fails because of multiplye defined symbols. Anyone a soluition?compiling app_ble.c...../Src/app_ble.c(224): warning: #1296-D: extended constant initialiser used PLACE_IN_SECTION("TAG_OTA_START") const uint32_t MagicKeywordAddress = (uint32_t)&MagicKeywordValue;../Src/app_ble.c: 1 warning, 0 errorslinking...SH_V2_BLE\SH_V2_BLE.axf: Error: L6200E: Symbol OTP_Read multiply defined (by otp_1.o and otp.o).SH_V2_BLE\SH_V2_BLE.axf: Error: L6200E: Symbol LST_init_head multiply defined (by stm_list_1.o and stm_list.o).SH_V2_BLE\SH_V2_BLE.axf: Error: L6200E: Symbol LST_insert_tail multiply defined (by stm_list_1.o and stm_list.o).SH_V2_BLE\SH_V2_BLE.axf: Error: L6200E: Symbol LST_is_empty multiply defined (by stm_list_1.o and stm_list.o).SH_V2_BLE\SH_V2_BLE.axf: Error: L6200E: Symbol LST_remove_head multiply defined (by stm_list_1.o and stm_list.o).SH_V2_BLE
Hello,I'm in the process of learning the STM32 MCU. I have the STM32F4DISCOVERYBOARD with a STM32F407VGT on it.At first I tried the simple LED blink tutorial and noticed that the LED will light up, but won't blink.I did some more attempts and figured that the HAL_Delay() function doesn't work properly.These are my configurations in CubeMX; I didn't change anything afterwards in the initialization code generated by CubeMX.Using CubeMX I defined an output pin, wrote a simple code where I can change the on and off time of the pin and connected it to an oscilloscope. // #1 while(1) { HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, GPIO_PIN_SET); HAL_Delay(600); HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, GPIO_PIN_RESET); HAL_Delay(600); }#1#1: Signal stays high and has spike every 480ms//#2 while(1) { HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, GPIO_PIN_SET); HAL_Delay(50); HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, GPIO_PIN_RESET); HAL_Delay(10); }#2: HIGH for 50ms and one impuls lasts for 33ms, LOW for 10ms as
Hi everybody!I'm using STM32H754 Nucleo-144 Eval Board in the combination with the lwIP (bare-metal) to make it work as a simple TCP echo client.Also, I'm using STMCubeMX for basic configuration and code generation.I'm stuck at the very beginning of my solution because it seems like I can't get an IP address from a router (DHCP enabled in lwIP).Details:JP6 is connected, ETH adapter LEDs (green and yellow) are turned on normally when the cable is connectedAll the functions called from the MX_LWIP_Init() are executed without errors (including dhcp_start ) - checked by debuggingnetif_is_up() returns true => network interface is upcode snippet from main.c:/* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USART3_UART_Init(); MX_USB_OTG_FS_PCD_Init(); MX_LWIP_Init(); MX_USART2_UART_Init(); MX_LWIP_Process(); /* USER CODE BEGIN 2 */ error = tcp_application_start(); if(error != ERROR_OK) { error_handling(error); } if(dhcp_supplied_address(&
Hi,I am a new bee to STM ...tried generating the code to get the UART up for STM32L476 series discovery board...but could not compile the code in ac6 compiler as this gives following errorError: selected processor does not support `isb 0xF' in Thumb modeas I found we need to enter -mcpu-cortex-m3 ..but could not do so in ac6..kindly guide me and let me know how I can proceed further also any configuaration missing let me know.thanks for all your supportRavi chandran
..
I have a development kit for the STM32L562, I'm trying to create a blinky-script that will use FreeRTOS to blink a led in the secure-world and the non-secure world simultaneously.Steps to reproduce:Install STM32CubeIDE 1.3.0New STM32 ProjectLook for the board that matches l562 in the search barCreate projectSet project nameSet targeted language to c++check "Enable TrustZone"click finishClick yes to both popupsOnce the project is loaded, the following configuration needs to be done in the "projectname.ioc" :Go to Middleware->FreeRTOSSelect "interface: CMSIS_V2"save the configurationgenerate the device configuration codeRight click "projectname_Secure" project and click on "build project"You should now be getting errors about "FreeRTOS.h" not being found by several files.If you add '/projectname/Middlewares/Third_Party/FreeRTOS/Source/include' to your include paths, you should no longer be getting the not found error, but should be getting multiple definition errors.Does anyone know w
STM32CubeMX 5.6.1 does not generate the Application app_x-cube-ble1.c so the initialization is also missing in main.cIs there a fix for this?
Generated code in main.c looks like this and lacks function name for the second block./** * Enable DMA controller clock */static void MX_BDMA_Init(void) { /* DMA controller clock enable */ __HAL_RCC_BDMA_CLK_ENABLE(); /* DMA interrupt init */ /* BDMA_Channel0_IRQn interrupt configuration */ HAL_NVIC_SetPriority(BDMA_Channel0_IRQn, 5, 0); HAL_NVIC_EnableIRQ(BDMA_Channel0_IRQn);}/** * Enable DMA controller clock */{ /* DMA controller clock enable */ __HAL_RCC_DMA1_CLK_ENABLE(); /* DMA interrupt init */ /* DMA1_Stream0_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Stream0_IRQn, 5, 0); HAL_NVIC_EnableIRQ(DMA1_Stream0_IRQn);}
I'm using NUCLEO-F031K6 (MCU: STM32F031K6) for PWM output generation (100Hz clock). Project is generated from STM32CubeMx v5.6.1. PA11 (TIM1_CH4) is used for PWM output. No clock pulses are seen. APB1 timer clock is 8MHz. ------------------------------------Timer-1 settings:-------------------------------------Prescaler: 79Counter Period: 999Pulse: 500Any clue?GPIO toggle is working for the same pin, PA11
I've been trying to download the CMSIS 5.7 update for almost a month now.But when I try to download and install the library every day, I get errors in the file in the attached screenshot.Every day I hope that you have noticed the problem or that someone has reported it and you have corrected the package in the meantime but I see that after a month the file is still defective.
Im trying to operate an external interrupt on my STM32F031K6, using STM32cube IDE. Ive been following a tutorial here https://simonmartin.ch/resources/stm32/dl/STM32%20Tutorial%2007%20-%20GPIO%20Interrupts%20(EXTI)%20using%20HAL%20(and%20FreeRTOS).pdf but im not sure it really applies to my chip... The first difference is although I have pins PA11 and PA12 setup for GPIO_EXTI11 and GPIO_EXTI12 in the cubemx, I in the setup preamble /*Configure GPIO pins : PA11 PA12 */ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);but i don't see anything like/* EXTI interrupt init*/ HAL_NVIC_SetPriority(EXTI4_15_IRQn, 3, 0); HAL_NVIC_EnableIRQ(EXTI4_15_IRQn); as is mentioned in the tutorial, in fact there doesn't seem to be any mention of interrupts in the setup outside GPIO pa11 & pa12 setup - is this right? Secondly, the file stm32f0xx_it.c doesn't contain the
the title says it all. Please let me know!
I can not use CANBUS and USB together. I configurated USB and CAN together but PC does not recognise the STM32F103C8 as an USB driver.When I use only USB without CAN configuration then USB work properly and recognise it as an USB driver.When I add CAN configuration from different pins (PB8 and PB9) then CANBUS works on these pins but USB not.How can I recognise the STM32F103C8 as an USB drive to my PC with using CANBUS together? Could you help me about this please?
Hi, by following some video i am able to create a GUI ( ST32F469I-DISCO ) and get a complete CubeIDE project... I create the GUI by selecting the right application template for the TouchGFX project ( device ). Then i can generate the code. After that i can change the project name ( STMCubeIDE\-project ) and open the folder with the CubeIDE editor. Now the .ioc file is not present in the CubeIDE project folder and i try to use the link to the file, the template file imported by TouchGFX i think i get one error, that say i cannot use that file to manage peripheral configuration. So try to hack.... If i copy the file .ioc in the project folder and rename it, i can open the CubeMX file and change the pheripheral configuration, but when i try to compile the project some library ( header ) cannot be found anymore. So... what is the right way to create a GUI, manage the hardware correctly and develop my software... ? Thanks.
Hello,Context: I'm using a Nucleo board based on STM32L433RC. FreeRTOS is running on the target. I'm using IAR and my project is configured with STM32CubeMX V5.6.0 and STM32Cube_FW_V1.15.1.I have an interruption on USART1 RX (1200 or 9600bps) and I'm also using SPI1 to interface an external SPI Flash. I'm also using this with interruption on SPI1 RX and TX.Problem: When no data is received on UART, SPI is working properly. If one of my task is using SPI to write to the flash (for example), while data is received through UART (and so the UART interruption called), an Hardfault is generated.Also, I'm forced to use SPI at less than 8Mbits/s (doesn't work at 16Mbit/s) and I don't know why..I've already checked stacks (of the mcu and freeRTOS tasks) and they seemed alright.I noticed that SPI1 and USART1 share the same peripheral bus (I don't know if it is revelant)Do you have any idea of where does it could come from?Thank you,Charles B.
In the example of STM32F469, the clock frequency is reduced from 180 to 120 MHz.
Hi !Don't know if this issue relies to new version V5.6.1, but if SW4STM32 is chosen as tool chain the linker script file (*.ld) is not generated anymore!Steps to reproduce:1) generate a new project (e.g. from board selector: NUCLEO-F072RB)2) goto "Project Manager" tab:enter Project Name and Project Locationselect SW4STM32 toolchain3) press button GENERATE CODE==> the generated output folder contains no *.ld file.Same procedure with makefile as toolchain: file STM32F072RBTx_FLASH.ld is generated
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.