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.
STM32H7: PA0 and PA1 ADC returning incorrect values
Hello community,
I have a custom stm32H7 board running v1.17 of micropython.
I have noticed that PA0 and PA1 return incorrect ADC values:
from machine import ADC, Pin
adc = ADC(Pin.cpu.A0)
adc.read_u16()
The return value is 5763 (we are expecting ~61722 with a 3.3Vref) the first time "adc.read_u16()" is called. Calling "adc.read_u16()" will then consistently return ~800 after the first call. PA3 and PA4 are working as expected. Are these two pins reserved for a specific function?