We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a718b10 commit 4ee26fdCopy full SHA for 4ee26fd
src/machine/machine_atsamd21.go
@@ -192,6 +192,11 @@ func (a ADC) Get() uint16 {
192
sam.ADC.SWTRIG.SetBits(sam.ADC_SWTRIG_START)
193
waitADCSync()
194
195
+ // wait for first conversion to finish to fix same issue as
196
+ // https://github.com/arduino/ArduinoCore-samd/issues/446
197
+ for !sam.ADC.INTFLAG.HasBits(sam.ADC_INTFLAG_RESRDY) {
198
+ }
199
+
200
// Clear the Data Ready flag
201
sam.ADC.INTFLAG.SetBits(sam.ADC_INTFLAG_RESRDY)
202
0 commit comments