diff --git a/src/machine/machine_stm32_adc_f1.go b/src/machine/machine_stm32_adc_f1.go index fb0cee66..e2c82f62 100644 --- a/src/machine/machine_stm32_adc_f1.go +++ b/src/machine/machine_stm32_adc_f1.go @@ -75,7 +75,7 @@ func (a ADC) Get() uint16 { stm32.ADC1.SR.ClearBits(stm32.ADC_SR_EOC) // clear rank - stm32.ADC1.SMPR1.ClearBits(ch) + stm32.ADC1.SQR3.ClearBits(ch) return result } diff --git a/src/machine/machine_stm32_adc_f4.go b/src/machine/machine_stm32_adc_f4.go index 4f0b8d11..3a163ffd 100644 --- a/src/machine/machine_stm32_adc_f4.go +++ b/src/machine/machine_stm32_adc_f4.go @@ -70,7 +70,7 @@ func (a ADC) Get() uint16 { stm32.ADC1.SR.ClearBits(stm32.ADC_SR_EOC) // clear rank - stm32.ADC1.SMPR1.ClearBits(ch) + stm32.ADC1.SQR3.ClearBits(ch) return result }