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:
parent
9f8e0ac1ba
commit
42983e2790
@ -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;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user