cancel
Showing results for 
Search instead for 
Did you mean: 

DMA double buffer Interrupt

Zhaokai Meng
Associate
Posted on May 08, 2018 at 18:56

Hi all, I have a STM32 NUCLEO-H743ZI evaluation board. I am trying to read ADC using DMA. Meanwhile, I also need to use the CPU to process the data read from the ADC. So I use a double buffer mode. 

I used CubeMX to generate the framework of the code. Then I modified a bit to enable the double buffer mode. I tried to use the functions HAL_ADC_ConvHalfCpltCallback and HAL_ADC_ConvCpltCallback. However, seems like they are being called at the same frequency.

My question is: Can I get an interrupt when the Buffer1 is filled while Buffer 2 is being filled? If yes, is there any actions I should take?

My question is similar to this thread: 

https://community.st.com/0D50X00009XkaF6SAJ

  but I did not see a solution in that thread. I have the same needs:

'Here's essentially what I'd like to happen:

1.) Buffer 0 fills

2.) interrupt occurs (I service Buffer 0)

3.) Buffer 1 fills

4.) interrupt occurs (I service Buffer 1)

5.) repeat 1 through 4'

null
1 REPLY 1

Sorry, bumping old zombie unanswered threads off my feed

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..