cancel
Showing results for 
Search instead for 
Did you mean: 

Circular DMA on ADC runs once and stops

iguffick2
Associate II

I'm using an STM32H563. Setup to get ADC captures into a buffer using DMA in circular mode.

I have TIM1 triggering an ADC1 conversion of two channels. And a buffer with 16 readings using DMA. The GPDMA is set in Standard Request Mode and Circular enabled. To debug I have a counter in HAL_ADC_ConvCpltCallback to see how many times it is called.

The buffer of 16 values is populated with values, and I get a call to the callback function once. But it then stops, I don't get any more call backs.

I was expecting the circular mode to give a trigger once the buffer was full, but then loop around and continue filling the buffer a second and third time, each time giving a callback.

I can see that the init to set circular mode are being added to the stm32h5xx_hal_msp.c but don't seem to be doing what I expect.

I've attached a sample project and IOC file.

1 ACCEPTED SOLUTION

Accepted Solutions
Simon.T
ST Employee

Hello @iguffick2 ,

In the ADC parameter setting, can you try by enabling the DMA Countinious Requests ?

 

Best regards,

 

Simon 

View solution in original post

2 REPLIES 2
Simon.T
ST Employee

Hello @iguffick2 ,

In the ADC parameter setting, can you try by enabling the DMA Countinious Requests ?

 

Best regards,

 

Simon 

That's all that it needed. ADC values now populating with DMA and giving callback interrupts.

Thank you.