Skip to main content
Associate III
May 16, 2024
Solved

Stm32H562 ADC DMA

  • May 16, 2024
  • 1 reply
  • 1164 views

When generate code for STM32H562 with active ADC + GPDMA1, I can't see code for configuration of GPDMA1. I see only this :

static void MX_GPDMA1_Init(void)

{

 

/* USER CODE BEGIN GPDMA1_Init 0 */

 

/* USER CODE END GPDMA1_Init 0 */

 

/* Peripheral clock enable */

__HAL_RCC_GPDMA1_CLK_ENABLE();

 

/* GPDMA1 interrupt Init */

HAL_NVIC_SetPriority(GPDMA1_Channel0_IRQn, 0, 0);

HAL_NVIC_EnableIRQ(GPDMA1_Channel0_IRQn);

 

/* USER CODE BEGIN GPDMA1_Init 1 */

 

/* USER CODE END GPDMA1_Init 1 */

/* USER CODE BEGIN GPDMA1_Init 2 */

 

/* USER CODE END GPDMA1_Init 2 */

 

}

This is error or I don't know where to find it ?

This topic has been closed for replies.
Best answer by GwenoleB

Hello @Brussl ,

The DMA configuration is done in stm32h5xx_hal_msp.c. This file is part of the Src folder of your project.

It should be part of the function "HAL_ADC_MspInit".

 

Please , let me know if it answers to your question.

Best regards,

Gwénolé

1 reply

GwenoleBBest answer
ST Employee
May 16, 2024

Hello @Brussl ,

The DMA configuration is done in stm32h5xx_hal_msp.c. This file is part of the Src folder of your project.

It should be part of the function "HAL_ADC_MspInit".

 

Please , let me know if it answers to your question.

Best regards,

Gwénolé