Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
The update system of CubeMxX don't work. Event at some time, the software don't run at all, only the ST logo appears and... nothing!
HelloI dont know what is the problem that when I compile my code with Keil, the USB works nicely,but when I use cubeide compiler, the usb doesnt work. Both codes are generated by cubemxwhen the code compiled by cubeide, the usb is recognised, but communication is denied.I use USB in CDC mode. When the code compiled by keil everythings works.
Hi,when switching from e.g. a C file to CubeMX file, the view is changed to Device Configuration view. This is also the case if the CubeMX file is already opened in the IDE. Closing the CubeMX file also restores the view back.However, switching to a C (or another) file while leaving the CubeMX file opened doesn't switch back the view. This is a bit annoying, because the view must always be changed back manually.Regards
Hello,some functions like _read()/_write() are marked as weak, so they can be overriden by own implementations. But other functions, like _exit(), etc. are not marked as weak. Why is this the case?I made a small experiment and changed some functions in syscalls.c, just to see what happens when re-generating the code from the CubeMX file. The changes are preserved, so the file is only generated once. So, doesn't this make the weak attribute of _read()/_write() useless? In fact, either all or none of the functions should be marked as weak. And the file should always be re-generated.The same seems to be true for the linker script, it's not re-generated. However, re-generating it would destroy any changes made to the memory layout, etc. so it's obvious why it's not re-generated.This is a bit confusing - what are the rules for (not) re-generating files?Regards
..
STM32CubeIDE version: 1.5.1, Build: 9029_20201210_1234 (UTC)STM32CubeMX version: 6.1.1
Also, that board has a power amplifier that seems to be controlled by the POWER8 register. How do the register values of that register affect the dbm of the PA? Or where is that information described?
Code generated by CubeMXstatic void MX_SDMMC1_SD_Init(void) { /* USER CODE BEGIN SDMMC1_Init 0 */ /* USER CODE END SDMMC1_Init 0 */ /* USER CODE BEGIN SDMMC1_Init 1 */ /* USER CODE END SDMMC1_Init 1 */ hsd1.Instance = SDMMC1; hsd1.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING; hsd1.Init.ClockBypass = SDMMC_CLOCK_BYPASS_DISABLE; hsd1.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE; hsd1.Init.BusWide = SDMMC_BUS_WIDE_1B; hsd1.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE; hsd1.Init.ClockDiv = 0; HAL_SD_Init(&hsd1); /* USER CODE BEGIN SDMMC1_Init 2 */ BSP_SD_Init(); HAL_Delay(200); /* USER CODE END SDMMC1_Init 2 */ }There is a function in - SDMMC_GetCmdResp1(SD MMC x, SD MMC_CMD_UP_CMD, SD MMC_CMD TIMEOUT);When the Sdmmc->STA register is checked in the body of this function, the check takes a very long time, since the CMDACT bit is in one. After 20-30 seconds, the bit is reset and the card works perfectly. Tellingl
Hey all! I'm working on a project with the STM32L151C8T6. However, my STM32CubeMX generated project (For STM32CubeIDE) launches straight into a hardfault. Any idea what could cause this or what I could debug to get this to work? I've already generated a new empty MX project that doesn't have anything configured - same problem. Thanks!
Hi!I want to report a bug.I tried SDADC and I found a bug.Also it should stand "Multi mode" not "Mulimode" and the STM32CubeIDE 1.5.0 (I'm using) missing calibration options in the STM32CubeIDE project starter. To solve this issue. Write this code inside the "SDADC_init()" function// Multi mode for SDADC1 and SDADC3 if (HAL_SDADC_InjectedMultiModeConfigChannel(&hsdadc1, SDADC_MULTIMODE_SDADC1_SDADC3) != HAL_OK) { Error_Handler(); }Example:/** * @brief SDADC1 Initialization Function * @param None * @retval None */ static void MX_SDADC1_Init(void) { /* USER CODE BEGIN SDADC1_Init 0 */ /* USER CODE END SDADC1_Init 0 */ SDADC_ConfParamTypeDef ConfParamStruct = {0}; /* USER CODE BEGIN SDADC1_Init 1 */ /* USER CODE END SDADC1_Init 1 */ /** Configure the SDADC low power mode, fast conversion mode, slow clock mode and SDADC1 reference voltage */ hsdadc1.Instance = SDADC1; hsdadc1.Init.IdleLowPowerMode = SDADC_LOWPOWER_NONE; hsdadc1.Init.Fa
Hello, I can not set 1MB/s baudrate on CAN peripheral. Used configuration on pictures. It looks like the rounding error. It worked in the previous version of CUBEIDE (1.4.0).
Hi,I'm trying STM32F769I-DISC1 board with an Sd Card 8 GB Class 4 (4MB/s max) performance, the SD Card is FAT32 with 4096 bytes blocks to fullfill STM32CubeIDE allocation unit values. I build the testing project with the onboard SDMMC2 with RX and TX on DMA as 4 bit wide. I'm using FATFS to write data with f_write() function. With this setup I achieved 800 kB/s but I need 192000 freq * 3 bytes * 2 channel = 1152 kB/s or more. A thing that I don't understand is why if I change PLLSDMC frequency, SD Card will have same performance with 48MHz clock (/8) or 25 MHz clock(/15)... Do you know some tips to increase performance? Thank you very much, the product is great actually permit to record 96kHz * 24 bit * 2 channel audio streams.
Hi,To configure my uart baud rate i use a variable on cube MX. To disable error i select "no check" in option --> that work find on previous version.Now with version 6.1.1 the error stay even if i select "no check" with the version 6.1.1.If you have an idea how to solve it !
Hi!I think there is a lack of information to configure a Sigma Delta ADC 16-bit in STM32CubeIDE and I want to configure:2 Single ended zero reference3 Differential endedSo I have a lot of questions for the STM32 Team here.I begin first to configure on SDADC1. Then I select 3 conversions because I have 1 Single ended and 2 Differential endedI want VDD = 3.3v to be my reference voltage and I don't want low power mode and fast conversions mode. Den I select my conversions: Question:What is "Common mode"? I have read the document AN4207 and I don't know what Common Mode has to do with Differential mode? I know that VSSA är analog ground. Now it's time to configure the settings. Question:What should I select?Assume that I'm selecting Regular and I want my SDADC1 to sample values continuously.Question:What is Mulimode type? Assume that I'm selecting Injected. Question:What is Configuration Index?What is Injected Delay?Assume that I'm selecting an external trigger, instea
I just added FreeRtos to my project through .ioc file. I tried to compile my project, but I get an error "Error: Cannot find the specified linker script. Check the linker settings in the build configuration.". I am very new with CubeIDE and have only worked with IAR where the project settings have been set before I got there.
Ok, so I decided to change from Arduino IDE (STM32F103) to STM32CubeIDE (STM32F334R8).I can't get perfect timing.My program just have to toogle my pin after x us (that is presented inside a vector)Just to illustrate, here is my arduino code (I only get 1us of error):// Function called when overflow count is detected void Update_IT_callback(void){ // Tootlge pin digitalWrite(pin, !digitalRead(pin)); // This loop is just because I need to repeat it if (id_vector >= aux_signalsize){ id_vector = 0; loop_count++; if (loop_count >= size_loop){ MyTim->pause(); MyTim->refresh(); loop_count = 0; } } // Set wait time in us to next toogle MyTim->setOverflow(aux_signal[id_vector++], MICROSEC_FORMAT); }And here is my HAL code (I get 2.3us error).void TIM1_UP_TIM16_IRQHandler(void) { /* USER CODE BEGIN TIM1_UP_TIM16_IRQn 0 */ HAL_GPIO_TogglePin(RF_Pin_GPIO_Port, RF_Pin_Pin); if (vector_run == vector_max){ vector_run = 0; if (repeat_id == repeat){
I'm using a STM32G030K6 device. It was working fine until I migrated from 1.3.0 version to 1.4.0 version MCU Package. Now when I try to compile it throws the errors below. Could someone give an explanation why this? How could I make CubeMx switch back to the previous package 1.3.0? It's always asking for 1.4.0
Hello @ALABB , @Khouloud ZEMMELI I am requesting an enhancement in file FreeRTOSConfig.h. I observe STM32CubeMX adds the file to any STM32H7 project that uses FreeRTOS version 10.2.1 (with CMSIS version 2).https://github.com/STMicroelectronics/STM32CubeH7/blob/beced99ac090fece04d1e0eb6648b8075e156c6c/Projects/STM32H743I-EVAL/Demonstrations/STemWin/Config/FreeRTOSConfig.h#L121And in the template file:https://github.com/STMicroelectronics/STM32CubeH7/blob/beced99ac090fece04d1e0eb6648b8075e156c6c/Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOSConfig_template.h#L149During code execution, ifconfigASSERT(0) gets executed, the code execution will stop, and without a debugger it is impossible to know why code got stuck.I therefore request to please update the ST provided Header file, and add a weak function to the statement, which can later be coded by the user.Is it possible to change the below line of code:#defineconfigASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTE
Hi I am trying to get ADC injected data in 3 channel at the same period.Oversampling ratio = 8xthree bit shiftevery channel 12.5 cyleADC resolution 12 bitAnd one regular channel activate in 3 second period VrefInt170 Mhz ADC clockFadc_ker_ck = 170 MhzTCONV = (12.5 + 12.5) = 25 cycle -> (1/170Mhz) * 25 = 147 ns per channel8 sampling per channel -> 147ns * 8 = 1.18 usFor 3 channel -> 1.18us * 3 = 3.53 usThis executes in 10 Khz -> 100 usSo what can be the problem.ioc file attached.void callback_ADC_injected(void) { ADC_injected_raw[0] = LL_ADC_INJ_ReadConversionData12(ADC1, LL_ADC_INJ_RANK_1); // U Phase ADC_injected_raw[1] = LL_ADC_INJ_ReadConversionData12(ADC1, LL_ADC_INJ_RANK_2); // V Phase ADC_injected_raw[2] = LL_ADC_INJ_ReadConversionData12(ADC1, LL_ADC_INJ_RANK_3); // V_Bus } void callback_ADC_regular(void) { ADC_regular_raw[0] = LL_ADC_REG_ReadConversionData12(ADC1); }
I recently installed the latest STM32CubeMX. Much to my great regret, I did not find the ability to generate code for the Keil / IAR IDE. Is this option really no more, or has it been hidden? If not, which of the latest STM32CubeMX versions has these features?
We have selected the Nucleo-L073rz board in STM32CubeMx, created a project and are copying the code from STSW-IOD01 into the new project but this is very tedious and prone to errors. Also, please note that the STSW-IOD01 firmware comes preloaded in the Nucleo-073rz board.
I am able to set pins (high/low) that I have specified to be GPIO_Output in the Pinout& Configuration tab of the .ioc file. Using the code written below (changing the pin number) I am able to observe the expected behaviour on a oscilloscope using all of the PA pins except (PA2,PA3 and PA8). Why am I not able to observe the behaviour on these pins? I am using the STM 32L072 Nucleo-64. Thanks in advancewhile (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ HAL_GPIO_WritePin(GPIOA,GPIO_PIN_15,GPIO_PIN_SET); HAL_Delay(100); // HAL_ADC_Start(&hadc); // HAL_ADC_PollForConversion(&hadc,HAL_MAX_DELAY); // raw = HAL_ADC_GetValue(&hadc); HAL_GPIO_WritePin(GPIOA,GPIO_PIN_15,GPIO_PIN_RESET); HAL_Delay(500); }
Here is the error message I am getting from CubeMX:Here is my project manager window:See also STM32 Cube MX file log:eThanks very much for taking the time to read and hopefully help me with this issue.Thanks,Luke
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.