cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence of 4 measurements using ADC1

bolurian
Associate II

I was unable to configure ADC1 to measure a "4 channel sequence" and then generate an interrupt.

I am using the injected result registers to read the values in the ISR.

Adc_Value[0]= ADC1->JDR1;

Adc_Value[1]= ADC1->JDR2;

Adc_Value[2]= ADC1->JDR3;

Adc_Value[3]= ADC1->JDR4;

All values show zero!

 Can anyone provide an example code for reading injected results + interrupt?

Alternatively the DMA may be used, but when I try to use regular/non injected results via DMA, I am not able to generate an interrupt anymore!

 The sequence is triggered by TIM1 at every 15.8 uS.

11 REPLIES 11
bolurian
Associate II

Is this configuration setting both regular and injected results?

But the regular conversion has only one result register!

Which result register do I read my 4 results from?

read again ... i edit -> start injected . 🙂

regular is set : disabled.

If you feel a post has answered your question, please click "Accept as Solution".