Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I have a project with an STM32H745. After I opened it with CubeMX 6.7 and migrated the project I noticed there were many errors in the clock configuration. I recognized these errors as relating the the Voltage Scale setting. I noticed it was missing?Before: After:
The TIM SR register value always be 0x1F, And Can not use ____HAL_TIM_CLEAR_FLAG to clear the reg.
Good afternoon everyone....I am trying to learn more about the stm32 and am using a nucleo L476 and an oscilloscope. In particular I want to understand more about the output compares of the timers. I have read many an app-note , user guide and data sheet regarding these and am now at the stage of testing stuff out.....I am running into complete confusion with respect to this...I have a 26MHz clock with a prescaler of 26 -1 (should be a 1MHz Cnt clock). I have the ARR register loaded with 100 - 1 (should create an UIF event every 100us). I am using CubeMX to set this up. There are a few questions: I had to code the macro (see below) bcz CubeMx doesn't seem to check the UIE bit when setting up as compare output.....Can anyone comment as to why?__HAL_TIM_ENABLE_IT(&htim3, TIM_IT_UPDATE);The following below is my ISR.....My attempt was to have UIF interrupt me every 10khz (see above comment on this), turn the output on and arm the CCR with counter + 10. My thought was that after this e
So, we are using ADCs on the STM32h743XIH6 rev V to read DC and low-frequency signals. We noticed we have half the ADC channels working correctly and half not working correctly. Those working correctly are:ADC3P1 PC3_CADC2P1 PA1_CADC3P0 PC2_CADC3P2 PF9ADC2P4 PC4ADC2P0 PA0_Cand those not working areADC1P12 PC2ADC2P5 PB1ADC2P10 PC0ADC1P2 PF11ADC1P3 PA6ADC3P3 PF7ADC3P4 PF5Note that we switched the signals from ADC1 to ADC2 on the signals not working and still would not read correct values. We are reading varying signals (even with dc signal in) with usually a low value around 0x9ff or 0x9df (on 16 bits reading). Good signals keep working when changing ADC too. The pins are working both in GPIO output and input correclty so we do not think it is a solder issue. We also probed the signal right by the processor and it stays clean.Any idea what the problem could be? We ran out of ideas.
I have problem with configuration ADC (6 regular channel) and DMA. CubeMX generate next code:static void MX_ADC_Init(void) { ... /** Configure Regular Channel */ LL_ADC_REG_SetSequencerChAdd(ADC1, LL_ADC_PATH_INTERNAL_VREFINT); /** Configure Internal Channel */ LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), ADC_CHANNEL_VREFINT); /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion) */But Vref not worked (ADC->CCR bit VREFEN is 0 and ADC->CHESEL bit CHESEL17 is 0)Correct code is:static void MX_ADC_Init(void) { ... /** Configure Regular Channel * LL_ADC_PATH_INTERNAL_VREFINT change to LL_ADC_CHANNEL_VREFINT */ LL_ADC_REG_SetSequencerChAdd(ADC1,LL_ADC_CHANNEL_VREFINT); //Fixed! /** Configure Internal Channel * ADC_CHANNEL_VREFINT change to LL_ADC_CHANNEL_VREFINT */ LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_CHANNEL_VREFINT); //Fixed!For fix it on my application I add n
..
I am able to run the example STM32H7_ETH_Example_IDE1.6.1 properly.This is a basic LWIP/FREERTOS example implementing ping on fixed IP.I recreated the example in minute detail in STM32CubeMX V6.6.1 FW_H71.10.0; it failed.In the process of finding the culprit I let STM32CubeMX do the upgrade V6.2.1->V6.6.1 and FW_H71.9.0->1.10.0 of the original demo automatically.After the upgrade, the demo failed as well.(I can rebuild the original demo and change the configuration without problems)Should I check all modifications made by the upgrade or is there a better way to solve this?Update: After configuration, the HAL_ETH_IRQHandler() is called with a fatal bus error (DMAErrorCode 0x1100))
I try to implement an FFT on the STM32F429I controller. I succeeded in accessing cmsis files and compilation worked fine by including arm_math.h and libarm_cortexM4lf_math.a. in CubeIDE Version: 1.8.However, when I try to debug the program, it goes into the HardFault_Handler().If I execute the program in singel stepping (pressing F5), I get the following information:Can't find a source file at "C:\CMSIS\CMSIS_Setup_V4.xx\CMSIS\DSP_Lib\Source\GCC/../TransformFunctions/arm_rfft_q15.c"
I created a new project from a downloaded example Nx_TCP_Echo_Server for a Nucleo board. But when I attempt to edit the CubeMX .ioc file, I get the error listed above. I can't find a way to edit the .ioc file or upgrade CubeMX to V6.6. Can anyone offer suggestions?
Hi!I'm using STM32CubeMX 4.24.0 (I know, extremely old but I need this version to be able to follow along a course) and JRE 1.8.0_351 on Ubuntu 20.04.It seems the tool cannot find updates or other necessary STM32 Cube packages, with the following error:2022-12-30 12:09:05,402 [ERROR] ServerAccessManage:932 - Problem during Server Connexion : IO error No appropriate protocol (protocol is disabled or cipher suites are inappropriate) 2022-12-30 12:09:05,403 [ERROR] ServerAccessManage:419 - Problem during Server Connexion : : updaters.zip.How could I fix this problem?Thanks!
Hi,i am using stm32F411 and generate programs with cubeMX.now I want to use the FPU in main and in interrupt context. Is it possible to use the FPU in interrupt context?I do not know how CubeMX generated programs handle the FPU context save within interrupt.
Hello.I have stm32h743vit6. After Cubemx 6.3.0, the adc clock prescaler setting is not available, it does not appear. Also, even if I open the adc channels, the adc mux is never active on the Clock Config page.In older projects (6.3.0 and earlier) adc clock settings can be configured. Is this an error?
I would like to construct an sampling system via using ADC+DMA method on STM32L4R9I official Discovery Board. I use STM32CubeMX to configure the peripherals and then compose the HAL code in Keil-MDK. The problem I met is ADC&DMA works well, but the sampling value from temperature sensor is 4095(always appears this value). How can I solve this problem?The configurations of peripherals are as follows.1. ADC1 only connects to Temperature Sensor Channel(detailed configurations are showed in figure1).2.DMA is configured as follows3.main code(only edited parts are displayed) /* USER CODE BEGIN 2 */ HAL_ADCEx_Calibration_Start(&hadc1,ADC_SINGLE_ENDED); HAL_ADC_Start_DMA(&hadc1,(uint32_t*)&val,1); /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ int i=val; data[0]=48+i/1000; data[1]=48+(i%1000)/100; data[2]=48+(i%100)/10; data[3]=48+i%10; data[4]=0x0d; data[5]
I just make a simple test. My cpu is stm32F303VET6,. Use Stm32cubeMx to generate a simple project with few lines of code, like:int main(void){ /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* 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(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */}But everytime when it runned to MX_GPIO_Init(), then it was dead. And i found it hanged in HardFault_Handle
I am working on a STM32f030.I need to convert 2 channels of ADC, and decided to use DMA.After reading the "HAL ADC Generic Driver" - UM1785 section, I got the idea that I don't have to use the "HAL_ADC_MspInit ()" function.However, nothing works until I call this function again.The following code is only for debugging and demonstrating the idea. Don't mind the rawness of it.Do not work:volatile uint16_t ADC_DMA[2] = { 0 }; uint32_t timeout_ms; while (1) { timeout_ms = HAL_GetTick() + 50; adc_conv_done_flag = 0; HAL_ADC_Start_DMA(&hadc, (uint32_t*) ADC_DMA, 2); while (adc_conv_done_flag == 0) { if (HAL_GetTick() > timeout_ms) break; } HAL_ADC_Stop(&hadc); HAL_Delay(500); }It works:volatile uint16_t ADC_DMA[2] = { 0 }; uint32_t timeout_ms; HAL_ADC_MspInit(&hadc); while (1) { timeout_ms = HAL_GetTick() + 50; adc_conv_done_flag = 0; HAL_ADC_Start_DMA(&hadc, (uint32_t*) ADC_DMA, 2); w
I am trying to add PDM2PCM for STM32G4 in CubeMX/IDE, but I cannot add it.Why is that so?
Hello, I am using STM32CubeMX to generate the code and test some peripherals which runs at different clock speeds(optimally).Since there is lot of code I have (specific to application) post STM32CubeMX code generation being written I don't want to reinsert my code after I experiment with different clock speed .So what I am doing is generating different SystemClockConfig methods with different clock settings to test the peripherals(mostly I2C ) by just replacing this SystemClockConfig with the newly generated ones.I want to know is it Ok to do like this.? I understand in case of SPI there is a change in the prescaler (only one macro) which gets changed or to be changed whenever we change the system clock Is there any other portion of the code which changes by just changing the Clock Settings(Sys Clock)Br,D
Hi guys,I am very new to continuous integration. My company has tasked me to set up a gitlab ci for there STM32CubeMX project. They want the following:A self hosted gitlab on a docker container on a machine (This I have already set up)Gitlab runner on a different machine which is connected to the project on gitlab this machine will be different than the self hosted gitlab and will have windows as OS. (I have already set this up)They want to have all the necessary tools installed on the windows machine which has the gitlab runner.When some commit any changes to the self-hosted gitlab repository the runner should start to execute.After that, the runner should run the batch file head-less.bat of the project. But this file will be in the windows with the runner and executes from there.In the end, when the runner executes the job then the output should be shown on gitlab. I mean info about the build.I want to know is this possible or not? They want all the tools for compiling and testing et
I have updated from stm32cube IDE 1.10.1 to 1.11.0 . After update and open the .ioc file, clock configuration show some problem like the CPU max clock frequency i can't use 480MHz any more. Do you know anything about this bug?The H7 Package in CubeMX was updated too from 1.10 to 1.11.0
The latest version of CubeMX 6.6.1 is still at LWIP 2.0.3http://savannah.nongnu.org/projects/lwip/
I am using an STM32H757-eval board. From the CM7 I can detect a Tamper button press (PC13). I would like to detect this same button press from the CM4. Using CubeMX, I assign PC13 to the CM4. After rebuilding, I am not able to detect Tamper button presses from CM4. I connected a DMM and can see the line is being pulled low on button press.
I installed CubeMX but i can't see the program when i try to search it on windows. Other ST programs can't see it too (Motor Control Workbench)
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.