stm32f3: adc: Overrun flag is cleared by writing 1

Unlike the ADC peripheral on most other stm32 parts, the bits in the
ADC_ISR register are r_w1, not rc_w0.

Fixes github bug: #493
This commit is contained in:
Karl Palsson 2015-07-29 13:18:26 +00:00
parent 9f8e0ac1ba
commit 42983e2790

View File

@ -1026,8 +1026,8 @@ bool adc_get_overrun_flag(uint32_t adc)
void adc_clear_overrun_flag(uint32_t adc)
{
/* need to write zero to clear this */
ADC_ISR(adc) &= ~ADC_ISR_OVR;
/* r_w1 bit */
ADC_ISR(adc) |= ADC_ISR_OVR;
}
/*---------------------------------------------------------------------------*/