Question
Interrupt driven ADC conversion (LL) (STM32F103)
I want to gather 4 ADC values from peripheral potentiometers using an STM32F103C8T6 (blue pill). I've setup ADC1 using MX Cube. Enabled ADC1_2 NVIC global interrupt.
Now I'm a bit clueless how to proceed.
My idea is to start the ADC to do conversions. But how are the 4 channels read out? Does the ADC switch from one channel to the next automatically?
I found code snippets like this:
void ADC1_IRQHandler(void) {
uint8_t i;
if(LL_ADC_IsActiveFlag_EOC(ADC1)){
adc_value[i] = LL_ADC_REG_ReadConversionData12(ADC1);
i ++;
LL_ADC_ClearFlag_EOC(ADC1);
} else
if(LL_ADC_IsActiveFlag_EOS(ADC1)){
i = 0;
LL_ADC_ClearFlag_EOS(ADC1);
}
}Where can I read more about the meaning of EOC, EOS? (The above code seems to be for STM32F4x)
