2024-11-20 06:24 AM
Hi,
I am not able to get a correct reading from ADC1 INP0 (PA0). All the other analog channels works fine.
The datasheet mentions this:
ADC option register (ADC_OR), option bit 0 (OP0)
For ADC1:
0: INP0/INN1 GPIO switch control disabled
1: INP0/INN1 GPIO switch control enabled
Note:This option bit must be set to 1 when ADCx_INP0 or ADCx_INN1 channel is selected.
The expected value is 2048, but I get 4095 when OP = 1, and 3433 with OP0.
The input has a 2 k resistor in series, and I measure 1.5 V (correct) on the far side, and 1.3 V on the side directly connected to the input.
Please see attached file, which is from the datasheet for RGT6. I don't know how to interpret the table. Is option register implemented or not regarding ADC1?
What is the purpose of the option bit, and what am I missing here?
2024-11-20 06:29 AM
What board(s) are you using?
2024-11-20 07:18 AM
It is a custom board.
2024-11-20 08:21 AM
The show the schematic - which was point #3 in the posting tips: