Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I am not able to configure USB_Device mode (USB_Device not enabling permanently disabled how to enable USB_Device in middleware). I want to select CDC in USB_Device.please give me solution for the same ASAP.
I've been trying to implement over the air updating on a board with the mentioned MCU. According to the reference manual of the G4 MCU series, dual bank operation should be supported, but the Flash memory characteristics of the G431xB series only mentions one bank. Furthermore "FLASH_OPTR_DBANK" is not defined in HAL, which suggests that it isn't an option. Does this mean that this specific G4 series doesn't support this operating mode?
I was given an example that was created with version 6.6.1. I upgraded to from 6.6.0 to 6.6.1 and the system still thinks I am using 6.6.0. How do I fix this?
The chip I am using is the stm32H743IIT series. I want to detect the frequency of a signal through GPIOD1, but the external trigger cannot be performed normally. The configuration code is as follows GPIO_InitTypeDef GPIO_InitStruct = {0}; __HAL_RCC_GPIOD_CLK_ENABLE(); GPIO_InitStruct.Pin = GPIO_PIN_1; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); HAL_NVIC_SetPriority(EXTI1_IRQn,2,1); HAL_NVIC_EnableIRQ(EXTI1_IRQn);
Hello,I'm trying to imitate an I2C solution. I'm using STM32F100RB.When selecting I2C -> In the example, they have these GPIO settings for I2C pins:Note the GPIO Pull-up/Pull-down option:Here is mine:The CUBE version is identical.The I2C configuration is identical.What could be the reason?Thanks!
USB_OTG_FS: In one of two projects unselecting "Activate_SOF" in the .ioc environment doesn't disable its entry in the code! Error of the IDE or is there something else keeping the SOF enabled? As said, in another project it works a as expected.
We need to update CubeMx from 6.3.0 to the latest version. When updated before, we were told to completly remove CubeMx and start again. This caused all sorts of issues.There must be an easy way to update these days. We can't see any options on the CubeMx menu for updating CubeMx..
... I'm currently trying this on an STM32H7 nucleo board.Is it at all possible to use cubemx generated LWIP ? ... I don't think so!It must be said that there is a "no-go" point: It is completely unacceptable to choose a compiler version <= 5 in Keils latest uvision (37.0.0). There is no developer who could endure the compile times on larger projects (beyond 30 minutes). In this case the Keil support recommends switching to V6. And ok, if I switch to compiler version >= V6 in uvision, then I can compile very quickly. But, if I then want to use freertos, it no longer works. Freertos generated by Cubemx only works with V5 in uvision. But without freertos I can't activate the LWIP library, which I absolutely need for a web server. This means I will be forced to use V5, which is totally unacceptable. The freertos / compiler V5 problem has existed for years now, I`m patiently waiting for a fix. Is nobody interested in fixing it? This is probably due to the fact that the problem cannot
Hi. Is it possible to generate code with CubeMX for multiple configurations, which can be initialized on-the-fly?Example: I have only one UART available, e.g. UART1, which can be connecrted directly via RS232 voltage translator, or when USB VBUS voltage is detected, I would like to route UART1 to (external) USB/UART bridge. To spare glue logic I would like to use different pin mapping. Within CubeMX I can configure only one pinout for UART1. Is there any option to configure single periphery (UART1) to more than one pinout configuration? Thanks. Marko
Hi,I am using STM32G071RB MCU 64-PIN TQFP and using Timer TIM6.The ARR Register in not updated Immediate and It updated on Next Transistion.Please understand below situation . 1) I have set below in STMCube.2) As as Per calculation.3) When I write ARR = 10 and after ARR = 90. . a) The Timer first generate delay according 90. b) Then according to ARR = 10.I am Reload as below function.void TimerReload(Reload Value){ TIM6->PSC = 6350 ; TIM6->ARR = ReloadValue ; HAL_TIM_Base_Start_IT(&htim6) ;}Is my Timer reloading method is correct or not ?Anybody please reply..Thanks in advance..--Karan
I have examples but they do not use the .ioc file. I need to find a way to integrate the drivers using the ioc file.
In the STM32CubeMX there is a preload setting. If I enable the preload then I can see the update interrupts are working as expected. But, if the preload setting is set to disabled, then no update interrupts are seen. This is true for all timers A-F and also Master timer.NOTE: Only the update interrupt is impacted here, while other interrupts are working fine.
i want implement software AES-GMC algotithen by STM32F030cct6. i download the CubeMX crypto library Ver 4.01. but it does not include driver for STM32F030 mcu. also in UM1924 manual is only about CubeMX crypto Ver 3.0?please help methank you
I am using a stm32f105RBt6, just teasing with FreeRTOS (cmsis_v2) at the moment.Two unexpected things are happening:If i stay with Dynamic allocated memory but increase my Queue size further than 10, i get thrown into a hardfault..... maybe some nefarious Ram accesses/stepping out of the heap? im still learning about that. If i declare the Mem allocation to be static, same error. Increasing Heap size doesnt help Any tips of how to debugg this? I think i have alocated enough heap in RAM....
I'm new to Cube IDE and Cube MX but I've been trying to create a simple project based on an STM32H753ZI to investigate ADC capture.Having enabled a few channels on ADC3 I looked in the clock tree to find the ADC clock speed but it's greyed out. When I hover over the ADC Clock Mux section I get a message saying "ADC Clock Source is not available" and to configure one in the Pinout Tab ADC.I can't see any options that mention anything to do with a clock in the ADC section (or , I've seen screenshots from the STM32H743 where there is a "Clock Prescaler" option under ADC_Settings, but I don't see this option in my case. I've seen that sometimes options only become visible when other options have first been set, so hopefully this is something simple that I've overlooked.Any help would be welcomed.
Under the HAL template the SPI2/DMA in received only which worked fine. I have MISO and MOSI loop back for test purpose and need to send 3 or 4 byte per session.Because the client code is LL template so I can't use HAL solution. Below is the LL snips for which I use UART command to run the init. The DMA interrupt is not invoked after transmitting 3 or 4 byte data. After checking out the SRC in DMA1 and SPI2 register list including NVIC I found no difference from the working HAL template code. I don't see DMA interrupt flag set. I'm running out of ideas about what to do next and why DMA interrupt is not invoked by SPI2 received operation, have I missed something?NB: The BOOT1 is grounded by eval board (via 10K). I also have UART/Systick up and running which means the interrupt system is working fine. I wish to note this is demo FW as testbed which is MIXED HAL and LL template. //========================================================================// Purpose:- None MX Way to setup GPI
I'm using STM32H747I-DISCO board to test. I connected OTG adapter and USB disk to CN1 (OTG HS) port.In my STM32CubeIDE I have USB_OTG_FS enabled and configured.The software initialized the driver (successfully), then I try to mount my USB disk and I get FR_DISK_ERR.I checked in the documentation, that the LD7 should indicate the VBUS voltage presence. The LED is off, so I guess I don't have VBUS voltage.Why is that?Is this related to the USB_HOST settings?Especially I'm interested in Drive_BUS_FS pin. I found nothing in documentation on what pin I should connect it to. I just selected a random free pin and configured it as GPIO output. But it does not help. The LD7 is still off, my USB disk is not mounted.What am I doing wrong here?
I have used the CubeMX version with 5.6.1 and 6.6.1, and this problem always happened. What's more, I used this software in my Windows10.
Hello Support Team,Currently, I am working on the STM32H745-Disc board.In that, I have used the SPI2 module and I have also configured the baud rate as a 3Mbit/s using the STM32CubeMX configuration tool and generated code for the same. (SPI Init done Inside the main() function)Now, I need to change the SPI2 module baud rate to 12Mbit/s from 3Mbit/s baud rate at run time.Please suggest any API or an appropriate way for the above scenario.Thanks In Advance.
How do I get a callback function for the HAL_TIM_OnePulse_Start_IT function?I have a STM32G071 Nucleo board.I whish to start a one-shot timer that calls an interrupt callback function when the time has elapsed. For this I have chosen the timer 6 and had the CubeMX, to generate the code:static void MX_TIM6_Init(void) { /* USER CODE BEGIN TIM6_Init 0 */ /* USER CODE END TIM6_Init 0 */ TIM_MasterConfigTypeDef sMasterConfig = {0}; /* USER CODE BEGIN TIM6_Init 1 */ /* USER CODE END TIM6_Init 1 */ htim6.Instance = TIM6; htim6.Init.Prescaler = 3; htim6.Init.CounterMode = TIM_COUNTERMODE_UP; htim6.Init.Period = 40000; htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_Base_Init(&htim6) != HAL_OK) { Error_Handler(); } if (HAL_TIM_OnePulse_Init(&htim6, TIM_OPMODE_SINGLE) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterOutputTrigger = TIM_TRGO_UPDATE; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISA
I am currently developing software for STM32H7 processors. For this I use the current development environment from Keil (uvision 37.0.0) and Cubemx 6.4.0. I created an "empty" project for the Nucleo Board STM32H743ZI with Cubemx. In it I only activated one property: SystemCore/COREX_M7/CPU DCache : Enabled When I compile and upload the generated code I have a strange phenomenon: The program doesn't stop at __Main in the startup-code and also not at HAL_Init() in main.c, but it stops in core_cm7.h in the line: if (SCB->CCR & SCB_CCR_DC_Msk) return; But I didn't set a breakpoint there! My question is about this unwanted "stopping effect" during start phase. The example above is the easiest to reproduce and demonstrate the problem. In fact, I'm working on another project, but that's where this effect degenerates. Sometimes I have to press the F5 key 4 times before the program finally gets to main. This is unbearable in the long run. Does anyone know this effect and has a workaroun
I need to use FreeRTOS 10.4.6 in order to use SystemView. Therefore, I downloaded the new FreeRTOS version and replaced the relevant files in the repository file. However, the "Tool Code Generation" generates a FreeRTOSConfig.h with the old version. I replaced the FreeRTOSConfig.h manually with a file from the demo project. Applying the "Tool Code Generation" replaces the Config file with the old FreeRTOS version. How can I make sure a proper config file exists for my project? "Tool Code Generation" might be applied several times.
hi! i am using timer interrup tim3 in stm32f030k6t6, i want configure diferent timer update for 5ms, i am using the ecuation: tout=(prescaler*preload)/(clock_frecuency). other ecuation for preload is : preload=(tout*clock_frecuency)/(prescaler). now for 5ms(0,005s) the preload is: preload=(0.005*48*1000000)/100 , preload=2400, prescaler=100, clock_frecuency= 48Mhz. the timer is configurate with value, the code is:/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2022 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * *********************************************
Hi,not sure if this is an question regarding ST or Segger, but i will start here:Problem:New Project (my example uses the Nucleo-H723ZG board) with SEGGER_I-CUBE-embOS software package included (like from the wiki.segger.com under Using_I-CUBE-embOS_with_STM32CubeMX )This works fine, but if I enable the Flag "Generate peripherial initalization as pair of '.c/.h' files" in the "Project_Manager/Code_Generator/Generated_Files", the generated code does not include anymore the "OS_Task_Create"-Functions, OS_Stacks and more...Is this a unkown feature? Or can someone help me out?Thanks for your help & best regardsMichael
I'm trying to get into UART interrupt. It used to be copying the 'weak' function declaration and declare our own in main such as:main() { .... void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { // usr code here } .... } However, this apparently became legacy. Now I get the following:"stm32h7xx_it.c""stm32h7xx_it.c" ** * @brief This function handles USART3 global interrupt. */ void USART3_IRQHandler(void) { /* USER CODE BEGIN USART3_IRQn 0 */ /* USER CODE END USART3_IRQn 0 */ HAL_UART_IRQHandler(&huart3); /* USER CODE BEGIN USART3_IRQn 1 */ /* USER CODE END USART3_IRQn 1 */ } Please advise an App Note describing how we handle the interrupt the same way we used to do.
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.