Is it correct?
Код: Выделить всё
void ADC_IRQHandler (void) {
if ((ADC1->IER & ADC_IER_ADRDYIE) && (ADC1->ISR & ADC_ISR_ADRDY)) {
ADC1->ISR |= ADC_ISR_ADRDY; // флаг сбрасываю правильно?
//бла...бла...бла
}
}
Код: Выделить всё
void ADC_IRQHandler (void) {
if ((ADC1->IER & ADC_IER_ADRDYIE) && (ADC1->ISR & ADC_ISR_ADRDY)) {
ADC1->ISR |= ADC_ISR_ADRDY; // флаг сбрасываю правильно?
//бла...бла...бла
}
}
Код: Выделить всё
ADC1->ISR = ADC_ISR_ADRDY;[uquote="Reflector",url="/forum/viewtopic.php?p=3954882#p3954882"]ноль ни на что не влияет:[/uquote]Bit 0 ADRDY: ADC ready
This bit is set by hardware after the ADC has been enabled (bit ADEN=1) and when the ADC reaches
a state where it is ready to accept conversion requests.
It is cleared by software writing 1 to it.
0: ADC not yet ready to start conversion (or the flag event was already acknowledged and cleared
by software)
1: ADC is ready to start conversion
Код: Выделить всё
if ((ADC1->IER & ADC_IER_ADRDYIE) && (ADC1->ISR & ADC_ISR_ADRDY))