Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
My code generation fails with the following exception :Exception in thread "Thread-4645" java.lang.IllegalAccessError: class parsers.FromScratchParser (in unnamed module @0x6a84a97d) cannot access class com.sun.org.apache.xerces.internal.parsers.DOMParser (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.parsers to unnamed module @0x6a84a97d at parsers.FromScratchParser.getDestinations(FromScratchParser.java:257) at convertor.Convertor.generate(Convertor.java:354) at com.st.microxplorer.plugins.projectmanager.model.ToolchainGenerator.generate(ToolchainGenerator.java:370) at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createToolChainFolders(ProjectBuilder.java:4150) at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:916) at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:54)Here's my java version�?�
The program is uploaded to the board but still unable to view the printf function data on SWO. I have soldered the SB9 to view data on SWV/ SWO pin but still unable to see the printf data on ITM SWV data console.The rest jumper status are:SB4, SB6, SB8, & SB14 : ONSB3, SB5, SB7, & SB15 : OFFProject build status is 0 error, 0 warning.Please resolve this issue immediately, it is my humble request to you.The STM32-MCUs are tremendous.Thank you!
I get this message whenever I try generating code with the "Other Toolchains (GPDSC)" in STM32CubeMX:The support of the “Tool chain / IDE�? you have selected will be soon discontinued in further STM32CubeMX version.If you want to benefit from further STM32CubeMX evolutions for your project, we advise you to target STM32CubeIDE or other IDE.I'm currently using this option to generate code for my IDE. Is this option being taken away soon? If so, what will my options be other than only using STM32CubeIDE?
There are many guides available online that explain how to set up DMA with ADC. I followed such a guide in version 1.7 and it worked out of the box. Now I'm trying the same thing in version 1.9 and it won't work.The first thing I noticed that the ADC Clock Prescaler setting seems to be no longer a thing.The last time I set it up, I just chose continuous conversion with a prescaler and everything worked. Even without an timer. These were my settings back then: Note here that it is the same MCU on the same board in the same project. I only updated the cubeIDE.I now tried it with a timer (which is preferred anyway) but this still doesn't work. The timer works as can be seen on the oscilloscope here: The yellow line is the timer, the blue line should have a peak triggered in the convCplt interrupt. DMA is set up with a circular buffer.Here is the setup:https://github.com/TimGoll/masterthesis-lcr_driver/blob/main/Core/Code/Threads/AnalogIn.c#L10-L15https://github.com/TimGoll/maste
Hello,After Migrating my STM32H743ZITx project from CubeMX version 6.4.0 to 6.5.0, ADC stopped working (stucks at ADC_Calibration function).Found out that in v6.5.0 ADC Clock settings were removed for some reason.Please see comparison below: Also compared generated adc.c files. All Pheripheral Clock Init settings are missing. Is it a bug or a feature? How this problem could be solved using the latest CubeMX version.Thanks in advance.
I try to drive ST7735 oled display with nucleo board. I worked with a ready-made example I found on the internet, but I could not print anything to the screen. When I compile my code, I don't get any errors and my screen is getting power. Is there a point I missed in the spi settings?some friends suggested adding spi dma tx, i tried but the result did not change. Do I need to enter an extra parameter in the dma settings?
In the MX program I set up the rank. to scan 4 values. TemperatureSensor, VRefint, IN0, IN1.I Initially saw this in DMA mode, But see it also happens in Discontinuous Mode. But when read the order is off by 1 position. It looks like it is reading IN1, TemperatureSensor, VRefint, IN0,Here is the relevant code./* 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(); MX_DMA_Init(); MX_USART1_UART_Init(); MX_USART2_UART_Init(); MX_I2C1_Init(); MX_TIM2_Init(); MX_TIM3_Init(); MX_ADC1_Init(); /* Initialize interrupts */ MX_NVIC_Init(); /* USER CODE BEGIN 2 */ //ADC_init(); &n
The clock "to ADC (MHz)" is grey in clock configuration. Don't see prescaler field in configuration. Plus it remove PLL **** configuration in main.c. /* Configure the system clock */ SystemClock_Config(); //****** This below have been remove from my last commit! ********* /* Configure the peripherals common clocks */ PeriphCommonClock_Config(); // ****** //****** And this: /** * @brief Peripherals Common Clock Configuration * @retval None */ void PeriphCommonClock_Config(void) { RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; /** Initializes the peripherals clock */ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_ADC; PeriphClkInitStruct.PLL2.PLL2M = 4; PeriphClkInitStruct.PLL2.PLL2N = 9; PeriphClkInitStruct.PLL2.PLL2P = 2; PeriphClkInitStruct.PLL2.PLL2Q = 2; PeriphClkInitStruct.PLL2.PLL2R = 2; PeriphClkInitStruct.PLL2.PLL2RGE = RCC_PLL2VCIRANGE_3; PeriphClkInitStruct.PLL2.PLL2VCOSEL = RCC_PLL2VCOMEDIUM; PeriphClkInitStruct.PLL2.PLL2FR
Hello, At code start-up, the function HAL_RCC_OscConfig return error HAL_TIMEOUT. I configured code with STM32CubeIDE. I am attaching clock configuration and code. Error is not repeatable, so it does not happen any time. Does anyone have an idea on how to solve it? Thank you.void SystemClock_Config(void){ RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Configure the main internal regulator output voltage */ if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK) { Error_Handler(); } /** Configure LSE Drive Capability */ HAL_PWR_EnableBkUpAccess(); __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW); /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; R
I have SDMMC1 configured for my H7 as follows: The card is inserted. I call generated init, and set debug to the HAL_MMC_InitCard of stm32h7xx_hal_mmc.c file, line:/* Identify card operating voltage */ errorstate = MMC_PowerON(hmmc); if (errorstate != HAL_MMC_ERROR_NONE) { hmmc->State = HAL_MMC_STATE_READY; hmmc->ErrorCode |= errorstate; return HAL_ERROR; }The errorstate is -1. What now?The specific hardware is STM32H747I-DISCO board. I also tested it with hardware flow control disabled. Same result. I switched the configuration to SDMMC_BUS_WIDE_1B and it works. At least it passes the initialization. I don't know how to interpret this behavior.With the previous configuration you can see the QUADSPI module has a warning. The details say that some features are unavailable, but well, since they are not used (at least by me) - that should be fine, or that may be the cause of the problem?
Hello!I'm receving data in UART rx, using DMA and ring buffer with idle detection, but when I disconnect and reconnect the cable in Rx the communication stops and my buffer fills up with '\0'. So, I need to resume the UART communication, how can I do this?I tried to execute the UART init fuctions, but it didn't work. Now I wonder if the cause of this is the no pull-up resistors in Rx. What do you think? I would try this, but CubeMx doesn't let me configure this.
.No jumper wires are involved direct probe connection from signal generator is used(siganls are generating fine cross verified with oscilloscope).Tried checking up with oscilloscope on A0 pin,while giving trigger wave to B5,no changes are seen on A0 pin.Then also isr gettting executed but the vise versa didnt happen.Tried with stm32l152 discovery board the same thing there also the wrong isr are also getting executed.(0th and 5th pin of different ports but).When checked the EXTI->PR REGISTER while in debugging mode ,The bits of 0,1,5 are set when trigger wave given to pin 5.Even though the pin1 nor its interrupts settings are not intialized its also getting set.Spend almost two days till now debugging this issue, any help will be thank full.Till now tried F1 and L1 SERIES both are having issue
Hello,i can't no longer open my ioc file. In my case its name is MIPControl. My projectname is mipcontrol. I know to change the name of the problem should fix it. But in my .project file the name is already set to MIPControl. When i rightclick on my project and rename it manually to MIPControl i can open the ioc file agin. BUT when i rename it the git repo will be deleted from egit und there is no git repo i can use (i use git in my konsole) Does anyone know where the information is stored that the io file has to be ***.ioc?
I am trying to setup an ADC to read 4 different inputs. TempSensor, VRefint, Channel 0 and Channel 1. When I tell it number of conversions = 4 It lets me Fill in Rank 2, 3, and 4, but not Rank 1. I thought this worked before. I uninstalled the ST IDE, and MX programs and reinstalled. Same issue. What am I doing wrong? Did something get corrupted? STM32CubeMX - STM32 Device Configuration ToolVersion: 6.5.0-RC4Build: 20220225-1913 (UTC)
We rely on QubeMX to generate our boilerplate and initialization code as much as possible. Currently we configure a Software interrupt programatically viaHAL_EXTI_SetConfigLine(...); HAL_NVIC_SetPriority(...); HAL_EXTI_RegisterCallback(...); HAL_NVIC_EnableIRQ(...);And later we invoke the code via HAL_EXTI_GenerateSWI(...);This is finde and it works. However I'm curious if this can be assisted by CubeMX? I see there are EXTI lines available in the NVIC section, but I can't enable them.
Problem with generating initialization code for ETH. After updating my project written in CubeIDE 1.8.0 and CubeH7 1.9.1 do Cube IDE 1.9.0 and CubeH7 1.10.0 Ethernet stopped working. After short investigation I find out that CubeMX does not generated HAL_ETH_MspInit, this is part where GPIO is configured. When I added missing functions from previous version everything start to work. I also tried to generate new project and it still miss HAL_ETH_MspInit.Is it known issue?Edit:It happens also when I use CubeIDE 1.9.0 and CubeH7 1.9.1, so probably its CubeIDE problem.
STM32CubeMX 6.5.0FW_STM32F4_v1.27.0I am using eth chip KSZ8081RNB. I created a BSP component driver for this chip. Is there any way to add this driver to STM32CubeMX so that it appears in the chip selection menu? By the way, in the ethernetif.c file, after generating the code, the USER CODE section is missing in the ethernet_link_check_state() function (so it cannot be used for the user driver)
I have a STM32L431CCT6 uC configured with CubeMX (project attached): RTC connected to LSE 32.768 kHz, auto wake up enabled. In my code, I perform the following calls:HAL_GPIO_WritePin(LED2_RESET_ESP32_GPIO_Port, LED2_RESET_ESP32_Pin, GPIO_PinState::GPIO_PIN_RESET); HAL_PWREx_EnableInternalWakeUpLine(); result = HAL_RTCEx_SetWakeUpTimer(&hrtc, 0x0000FFFF, RTC_WAKEUPCLOCK_RTCCLK_DIV2); if(result == HAL_OK) { HAL_PWR_EnterSTANDBYMode(); }The uC enters correctly the standby mode, it should wake up after 4 seconds, ma it never does. I tried to check if wake up interrupt is launched, removing the HAL_PWR_EnterSTANDBYMode() call, but handler code is never executed (no breakpoint hit, no led blinked).
I`m hoping to have a slave timer enabled but idling and wait to be triggered by a master. The idea is to have the slave to trigger ADC reading for multiple cycles and synchronized with the master:My timer config are shown belowWhen I call functions such as HAL_TIM_OC_Start or anything along the line, the slave timer just starts triggering without waiting for the master to trigger.Would there be a way I could have it enabled but stuck at certain value?or do I have to clear the master trigger value?Also slave is running at around 1MHz so software interrupt would cause time delay which won`t work in my case.Any tips on how I shall set up the timer either in CubeMX or directly access its register maps?Thanks!
When trying to configure ADC with DMA in CubeMx, the code generation for the calls to the initialization functions sometimes end up in the wrong order, in my case, the call for MX_DMA_Init was placed after the call to MX_ADC1_Init which made the adc reading fail. To fix it, I reseted the peripheral configurations for ADC and DMA in CubeMx and configured them again, this led to the correct order being generated.It seems that the order of the steps you take to configure the peripherals can sometimes lead to a wrong code generation. This was tested on STM32CubeIDE 1.9.0 which is the last version at the moment of this post.
..
Hi,I want to sample 9 channels with 1 ADC, using DMA in circular buffer mode with continuous conversion. My callbacks of conversion (like HAL_ADC_ConvCpltCallback or HAL_ADC_ConvHalfCpltCallback) are not triggering, the sampling seems to never start.I'm also using freeRTOS.Am I missing something ?Here's the code:#define ADC3_BUF_LEN 9 uint16_t adc3_buf[ADC3_BUF_LEN]; /* ADC3 init function */ void MX_ADC3_Init(void) { /* USER CODE BEGIN ADC3_Init 0 */ /* USER CODE END ADC3_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC3_Init 1 */ /* USER CODE END ADC3_Init 1 */ /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion) */ hadc3.Instance = ADC3; hadc3.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4; hadc3.Init.Resolution = ADC_RESOLUTION_12B; hadc3.Init.ScanConvMode = ADC_SCAN_ENABLE; hadc3.Init.ContinuousConvMode = DISABLE; hadc3.Init.DiscontinuousConvMode = DISAB
I try to set, using last version STM32CubeIDE, the ADC to get 8 analog inputs, using DMA, with permanent conversion.I doesn't see anymore the rank 1 ? (see picture)When I start HAL_ADC_Start_DMA, i have only the AN0 value, and only 8 bits (I set12bits in parameters), and not refreshed (only one conversion). [HAL_ADC_Start_DMA(&hadc, (uint32_t*)adc_buf, ADC_BUF_LEN);] adc_buf is uint16_t array type.Best regards,
The original param description: * @param num FIFO number * This parameter can be a value from 1 to 15 15 means Flush all Tx FIFOsAccording to stm32h7 reference manual, it should be: * @param num FIFO number * This parameter can be a value from 1 to 15 16 means Flush all Tx FIFOs:beaming_face_with_smiling_eyes:
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.