Skip to main content
Explorer II
November 20, 2024
Question

What is up with STM32H563 ADC INP0?

  • November 20, 2024
  • 1 reply
  • 1559 views

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?

    This topic has been closed for replies.

    1 reply

    Super User
    November 20, 2024
    DimliteAuthor
    Explorer II
    November 20, 2024

    It is a custom board.

    Super User
    November 20, 2024