Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi,When generating code for the STM32H723ZG OCTO SPI2 peripheral it does not generate the __HAL_LINKDMA(ospiHandle, hmdma, hmdma_octospi2_fifo_th); macro for linking the MDMA. This happens for me when using MDMA channel 2 with the octo spi 2 peripheral configured as quad spi. For now I can fix this issue by adding the __HAL_LINKDMA(ospiHandle, hmdma, hmdma_octospi2_fifo_th) macro manually to the code but it disappears on code generation. The neccessary macro however is generated on the octo spi 1 peripheral. I have added the CubeMX file with my current configuration. Also a little code snipped where the macro should be placed. hmdma_octospi2_fifo_th.Init.SourceBurst = MDMA_SOURCE_BURST_SINGLE; hmdma_octospi2_fifo_th.Init.DestBurst = MDMA_DEST_BURST_SINGLE; hmdma_octospi2_fifo_th.Init.SourceBlockAddressOffset = 0; hmdma_octospi2_fifo_th.Init.DestBlockAddressOffset = 0; if (HAL_MDMA_Init(&hmdma_octospi2_fifo_th) != HAL_OK) { Error_Handler(); } if (HAL_MDMA_ConfigPostReq
How can I lock the firmware package version used by my CubeIDE project. I do not want the firmware to be updated when I make changes to the MCU pin usage.
In former CubeMX versions an Clock to ADC of 400MHz was possibleNow I am working on CubeMX V 6.3.0 with STM32Cube FW_H7 V1.9.0.The maximum Clock frequency I can adjust is now 79MHz (selected clock source is the PLL2) What is the meaning of the "79 to ADC (MHz)" exactly.If, it is the input for the prescaler of the ADC, why it is limited to 79MHzWenn > 79 MHz is selected, CubeMX shows an error.If it is the maximum Clock frequency of the ADC, why is it not limited to 50Mhz as discribed in the datasheet for the V designV-design is also selected
Hello,I have a question regarding the external interrupt on a GPIO input pint which is triggered each falling edge (EXTI)According to the CubeMX autogenerated code, it looks straight forward. I am using a discovery board with pin PE3 which is configured as a simple input with interrupt capability (each falling edge). I took a jumper for the 3,3V power supply in order to simulate edges on the input pin by placing and removing it. I don't see any activities on the EXT3 line interrupt handler.Do I miss here something or do I use an old version of CubeMX? I read some issues regarding the LL_Init with the EXTI.I was quite careful to enable all checksbocks in the NVIC/GPIO on the CubeMX. But it doesn't seem to work. Even when I play a with the pulldown configuration. No effect at all. GPIO_InitTypeDef GPIO_InitStruct = {0}; /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOE_CLK_ENABLE(); /*Configure GPIO pin : PE3 */ GPIO_InitStruct.Pin = GPIO_PIN_3; GPIO_InitStruct.
Hi,I have a single PDM mic connected to DFSDM2, channel 0 on the NUCLEO. I have configured the peripheral for 16kHz and I have verified that the clock generated is 1MhZ and the mic sends PDM data when clocked.I have checked the signals going to the uC and they are OK but the interrupt isnt being generated on pin PD2. I'm not sure what the issue is. Conversion is started with:HAL_DFSDM_FilterRegularStart_DMAIs the configuration correct? What should I look at?
Hello,I have an IOC file, which was generated with help of STM32CubeMXMxCube.Version=5.6.1MxDb.Version=DB.5.0.60When I open this project to update the Keil project (which has Keil Compiler version 6 selected), with STM32CubeMX version 6.0.1 (with STM32Cube MCU Package for STM32H7 series version 1.8.0), and generate code, the STM32CubeMX deselects the MicroLIB check box.I am observing the code is not behaving as expected with MicroLIB disabled / unchecked.As the issue is not observed when using the ULINKpro debugger (which I am using to find the reason for the issue) I am unable to find the reason for different behavior of the same code just based on whether the MicroLIB is in use or not in use.Please help with resolving my concern.Thanks,Rajeev
I created new project using CubeMX and selected USB Host and FATFS. but ffconf.h is missing in the project it is giving error.I treid to copy from STM32F769 example project but function is missing. retFATFS = FATFS_LinkDriver(&FATFS_Driver, FATFSPath); in fatfs.cthis also missing - app_fatfs.h
In ST Cube IDE 1.6.0 project, Cube MX view - > vrefbuf is missing from syscfg page
I am trying to send 16bits through spi3 of stm32f205rct6. The problem is that the data in my array differs from the data in SPI3->DR. uint8_t config_data[2]={0xD2,0x8B}; // 1 101 001 0 100 0 1 01 1uint8_t rx_data[2]={0}; while (1) { HAL_GPIO_WritePin(GPIOA,GPIO_PIN_15,GPIO_PIN_RESET); // ss HAL_Delay(10); HAL_SPI_TransmitReceive(&hspi3,config_data,rx_data,2,10); HAL_GPIO_WritePin(GPIOA,GPIO_PIN_15,GPIO_PIN_SET);}I expected D28B in DR. What is wrong?
Hello, I am looking for some help with operating a Dynamixel XM540-W270-R servo actuator from a Nucleo-H743ZI2 Development board. I have used CubeMX to initialize all of my peripherals and am using CubeIDE for development. I have 2 basic objectives: 1) be able to write various position 2) be able to read the data off of the servo. I have gone through many of the Robotis references and believe I have constructed the required packets to be sent to the servo correctly over UART but when transmitted and received I get nothing. I am unsure where my error is whether it be physical or software and am very novice to this so please bear with me. Ihave wired a UART Rx and Tx line to the rs485 socket on the dynamixel starter kit. Below is the link to the Dynamixel SDK references that I have been using, I am using C protocol 2 specifically:https://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/Here are some figures and explanations that may help expand and be a little
HiI'm using a NUCLEO-H7A3ZI-Q.I have created a project with CubeMX and I'm experiencing a strange behaviour on the ADC.The initialisation code is calling MX_ADC1_Init() but this function returns with an error but the ADC DMA_Handle is 0, causing later on a call to HAL_ADC_Start_DMA() to generate an error.ANy ideas of what could be wrong?thanks
hello this is hyejung from korea.I am learning about STEVAL-DPSLLCP1.when I see the datasheets or any other sheets about STEVAL-DPSLLCP1, they recommend the toolchains 'IAR workbench'.but it is a little expensive to use for me.so, can I use 'cubeMx' instead of 'IAR'?
The MX generated C code issues the USART initiation call before the DMA initiation call. My code simply echoes back any text received by the USART. Unfortunately the echoed data (correct length) is all zeros. The UART read buffer is initialised with zeros.The issue is resolved by simply placing the DMA initiation call before the USART initiation call!What’s going on? Looks like the DMA code upsets something set by the USART code, but what?
Good day to everybody,In certain STM32 MCUs input capture can be defined for both falling and rising edge.In such cases, how to know if the input capture interrupt routine was called due to a falling or a rising edge? Is there a way to know?
..
Hello,I'm trying to use a timer to measure the frequency of an input signal using the callback function:HAL_TIM_IC_CaptureCallBack(TIM_HandleTypeDef*htim)The function never seems to be called when a voltage is applied to the input pin. Here is the timer initialization code, TIM1 interrupts have been enabled. Any suggestions as to why the callback function is not working will be appreciated. static void MX_TIM1_Init(void){ /* USER CODE BEGIN TIM1_Init 0 */ /* USER CODE END TIM1_Init 0 */ TIM_MasterConfigTypeDef sMasterConfig = {0}; TIM_IC_InitTypeDef sConfigIC = {0}; /* USER CODE BEGIN TIM1_Init 1 */ /* USER CODE END TIM1_Init 1 */ htim1.Instance = TIM1; htim1.Init.Prescaler = 8000-1; htim1.Init.CounterMode = TIM_COUNTERMODE_UP; htim1.Init.Period = 65535; htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim1.Init.RepetitionCounter = 0; htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_IC_In
I try to complete standard I2C 100kHz setup for STM32L041 with 16MHz clock (I2C1CLK). Here are CubeMX setting:Timing registry value is 0x00A03D53 which, according to RM0377, 23.7.5 Timing register (I2C_TIMINGR), translates to:PRESC=0SCLDEL=10SDADEL=0SCLH=61SCLL=83The problem: CubeMX calculated SDADEL value (zero) violates the first of the two conditions specified in RM0377, 23.4.5 I2C initialization - I2C timingsPractically speaking, SDADEL must always be greater than zero. The potential problem is not limited to STM32L0x. It occurs with other newer MCUs as well.My calculations show that similar reference settings provided in RM0377, Table 104 (SDADEL=2) do not fulfill the above mentioned SDADEL conditions as well.CubeMX 6.3.0STM32CubeL0 Firmware Package V1.12.1 / 16-July-2021#STM32CubeMX #[STM32 MCUs] #I2C
Output in the usbd_conf.c file when generating code for a CDC device. Code is using USE_HAL_PCD_REGISTER_CALLBACK for HAL_PCD_MspInit and HAL_PCD_MspDeInit instead of USE_HAL_PCD_REGISTER_CALLBACKS (note the final 'S'), which was there in previous versions of the tool.
I would like to implement a current sensing using a grounded shunt resistor. Therefore I would like to use the build-in OPAMP from the STM32G491 Series. But I'm not satisfied with the CubeMX configuration.In AN5306 I found a configuration under 4.4.1. But within CubeMX I'm not able to configure the OPAMP using only one pin.I would like to use the VINPx pin, connect the output intern to the ADC and use the feedback loop internally with a gain of 64.Further, is it possible to use VINPx as input with the output connected internally and externally with a "static" configuration?Again, not using the VINMx pin.
I am using stm32L412CBU microcontroller and I am using both ADC units. The code generation generates this line of code:PeriphClkInit.AdcClockSelection = ADCCLockSelection; which is incorrect according to the structure RCC_PeriphCLKInitTypeDef for this controller, you will find that this member is disabled for this particular controller.
If I configure a pin as a timer input capture channel input, can I also read the state of that pin as a GPIO input?I'd like configure the timer channel as an input capture channel, and I'd like to capture both rising and falling edges. But when the edge is detected, how can I determine whether it was the rising or falling edge? Can I also enable the GPIO input stage for that pin and read its state after the edge is detected? I don't see any way to do this in STM32CubeMX. Is there some other way to determine whether the timer detected a rising or falling edge?
Hello everyone. I am working on a project that measures the duty cycle of the signal. I've initialized timer 1 as an input capture mode to measure the pulse width of a signal. Both input capture 1 and input capture 2 are used to signal the rising and the falling edge of the input signal respectively. On the first try, the caputers were done fine, but it only captures once! for the next signal cycle, the capture registers wouldn'g change at all. So I can't calculate the signal width continously.The details of my project is as follow:I've used STM32F103RET6, Timer 1, input caputers 1 and 2.The program is written in STM32cubeIDE and CubeMx is used for configurations.
The maximum frequency I can set is 200 MHz.STM32H743VIT6CubeIDE 1.6.1
Hi,there. I am trying to run LWIP on the Nucleo-H723ZG development board and cannot get any response to ping. If I attach the debugger, STM32 can receive ARP requests and cannt send out ARP responses. When I use computer ping STM32 attarching the debugger, can see computer's MAC address and IP in table_arp[]. the official demo code is ok. I donot konw why. the problem is the version of cubeMX and STM32H7 firmware? could you help me to see my cubeMX config ?
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.