Skip to main content
JHari.1
Associate II
May 22, 2023
Question

Configuring ADC with DMA in circular mode with end of conversion interrupts.

  • May 22, 2023
  • 2 replies
  • 1099 views

I have setup ADC conversion to be triggered by Timer 3 and DMA is configured [in NORMAL Mode] to transfer data from ADC to a buffer. I am able to get this to work and I call HAL_ADC_START_DMA() from the HAL_ADC_Conv_cmplt_callback() to restart the DMA transfer.

When DMA is configured in CIRCULAR MODE, the Conv_cmplt callback is only called once and the buffer doesn't get updated either.

The idea is to kick of peridic DMA transfers and use half_cmplt and cmplt interrupts to use the buffer in a pingpong manner. Is there any other configurations to take care of to achieve this?

This topic has been closed for replies.

2 replies

ST Employee
May 23, 2023

Hi @JHari.1​ 

Can you precised the STM32 you are using ?

Regards

DianeP

JHari.1
JHari.1Author
Associate II
May 23, 2023

It is an STM32G474. The config screenshots are attached here. I am using the nucleo board NUCLE-G474RE


_legacyfs_online_stmicro_images_0693W00000bkeZ6QAI.png 


_legacyfs_online_stmicro_images_0693W00000bkeZQQAY.png 


_legacyfs_online_stmicro_images_0693W00000bkeaOQAQ.png
_legacyfs_online_stmicro_images_0693W00000bkeXtQAI.png