cancel
Showing results for 
Search instead for 
Did you mean: 

ADC dma does not trigger interrupt.

TMich.1
Associate III

So my stm32h7 works fine using regular interrupts. But when doing it via DMA, 

void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *adc)

is never called.

I enabled ADC global interrupt and BDMA channel0 global interrupt.

circular buffer,

continuous conversion mode enabled, conversion data management mode is at DMA circular mode as well.

My other DMA for i2s, SAI and UART work perfectly fine?

I call dma using : 

HAL_ADC_Start_DMA(&hadc3, (uint32_t*) Battery_read, sizeof(Battery_read));

 

2 REPLIES 2
Karl Yamashita
Lead III

You didn't mention that you enabled DMA Continuous Requests?

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.
MOBEJ
ST Employee

Hello @TMich.1 

You can use the ADC examples provided in the STM32CubeH7 repository on GitHub , Specifically, you can refer to the DMA example : https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/NUCLEO-H7A3ZI-Q/Examples/ADC/ADC_DMA_Transfer

This example show how to configure and use the ADC to convert an external analog input and get
the result using a DMA transfer through the HAL API. it can help you to correctly configure the ADC with DMA for your application .

BR

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.