2025-11-26 5:07 PM
Hi all,
I am trying to understand the relationship between CCRDY and CHSELR. Unfortunately, there is a bit of bad grammar in the Reference Manual on this subject, which is not helping...
The manual seems to say (and some examples support this) the sequence is -
ADC1->ISR |= ADC_ISR_CCRDY
ADC1->CHSELR = adc_channel;
while((ADC1->ISR & ADC_ISR_CCRDY) != ADC_ISR_CCRDY) {};
ADC1->CR |= ADC_CR_ADSTART; // Start the converstionThis sequence doesn't make sense. What would happen if there was an interrupt between clearing the CCRDY and writing the CHSELR?
Can anyone explain the internal workings of the ADC on this topic?
Kind regards
Pedro
2025-11-26 5:52 PM
Include your full chip part number. Crystal ball isn't working.