You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At first glance, seems like a bug to me. I thought that maybe adc12b_get_latest_value would return a zero padded value, but it seems to just return the LCDR register as-is:
And that register contains the 12-bit ADC value in the lower 12 bits:
(Note that the upper 4 bits can contain the channel number, but only if enabled, so I suspect this is not the case here and these are always zero and can be ignored).
Do you happen to have a Due you could test if this is indeed broken? Should be easy, if all analogRead values for these pins are off by a factor four, then it is really a bug.
Why is it converted to 10 bit if the next line assumes it is 12 bit wide.
ArduinoCore-sam/cores/arduino/wiring_analog.c
Line 115 in eed66e7
The text was updated successfully, but these errors were encountered: