ADC polling of multiple channels
Hello,
After setting up a 4 channel read with DMA, I ran into the problem, that the value of the internal temperature sensor seemed to not change at all. The values of the read out potentiometer however were plausible.
So I wanted to check all used channels by manually polling them.
But in this case it seems that the EOS flag is set before the loop finishes reading the data, though I have the WAIT bit set in CFGR1.
if( (this->adcReg->ISR & ADC_ISR_ADRDY) != 0 )
this->adcReg->CR |= ADC_CR_ADSTART;
for( uint8_t index = 0; index < this->numOfChannels; index++){
while( (this->adcReg->ISR & ADC_ISR_EOC) != 1 );
this->adcData[index] = this->adcReg->DR;
} So here my debugger runs to infinity stuck in the while loop with index = 2 and adcData[0] and [1] having data.
Do you have ideas why this isn't working? I also read in the forum, that multichannel data handling is not recommended for polling, but it must work according to how I understood the timing diagrams in the reference manual.
Thanks for your help in advance.
Hannes
