cancel
Showing results for 
Search instead for 
Did you mean: 

Reading multiple ADC values periodically in interrupt mode

GSING.19
Associate II

Hello All,

I need to read 4 ADC values with period of 1 Khz in interrupt mode.

After reading various post I found out that DMA will be used but I want to read multiple value periodically so should i use ADC injected conversion mode and set

No. of conversion to 4

External trigger source Timer 2 trigger out event

External trigger edge: Rising Edge

Injected Conversion mode to be discontinuous

Use Rank for various channels

I have a doubt that which to be used in main.c to start ADC i.e

HAL_ADC_START_DMA or HAL_ADC_START_IT

Also, is the approach use by me correct?

Regards,

Gunit

0 REPLIES 0