cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure ADC+DMA to have 3 conversions and get DMA interrupt when all 3 conversions are complete and converted values are available in predefined buffer of size 3?

jagdish2
Associate II

I am using STM32F756 Eval board and trying ADC+DMA example.

Example, is about one ADC conversion and the data is stored in variable using DMA.

I am looking out for changes to be done in the configuration such that,

After I start ADC conversion, I must get DMA interrupt after 3 ADC conversions are done. and the converted values are available in buffer of size 3. this buffer i shall pass to DMA while configuring DMA.

thanks and best regards,

Jagdish

1 ACCEPTED SOLUTION

Accepted Solutions
jagdish2
Associate II

Thank you so much for your inputs.

I have used the DAQ TC interrupt.

Jagdish

View solution in original post

3 REPLIES 3
S.Ma
Principal

Are ADC conversions running continuously or triggered by signal?

To reduce the MCU time stress, sometime it is easier to have a big buffer to store enough data and get interrupt at half transfer event to process them, or use another DMA for memory to memory transfer, although in the end you'll have to process push the data with the leftover time left after moving data around. What's the sampling rate?

Best to have an array of 6 and use HT/TC interrupts to flag the inactive half.

But yes, you could trigger the ADC, have an array of 3, and use the DMA TC interrupt as the ADC x3 EOC

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

Thank you so much for your inputs.

I have used the DAQ TC interrupt.

Jagdish