STM32H7 ADC inaccuracy
Hi,
I have noticed the machine module (machine.ADC class) returns a raw ADC value that is consistently off by about 1000 counts too high. I have noticed this inaccuracy on the Nucleo_H743ZI2 and as well as my own custom board. I can definitely rule out PIN input impedance as the culprit because I am using voltage followers. This seems like an offset issue, but going through the adc.c, it looks like no offset was set:
https://github.com/micropython/micropython/blob/0fd0eb00aa5b9d311046d48d73a8cfabb30d7dd6/ports/stm32/adc.c#L346
Please advise.
ESP32S3 ADC Pins not working
Hi,
When trying to read an adc value from the adc pins on the esp32s3 I get the following output:
from machine import ADC
adc = ADC(machine.Pin(7, machine.Pin.IN))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid bits
same error for
adc = ADC(Pin(7))
and
pin = machine.Pin(7)
adc = ADC(pin)
Looking at the C code I notice that there is a CONFIG_IDF_TARGET_ESP32S3
https://github.com/micropython/micropython/blob/master/ports/esp32/machine_adc.c
Is there a reason this shouldnt work?
Thanks,
Thomas