Does the analog input in XIAO SAMD21 draw current, when voltage is near the positive rail?

I’m driving an analog input in XIAO SAMD21 with an OPA2354 OP-Amp. The OP-Amp uses the same 3.3V supply voltage, which comes from the XIAO SAMD21. This should be a pretty good rail-to-rail OP-Amp, very fast and 100mA output current.
The analog input is set as “INPUT” without pullup or pulldown.

The problem is that the OP-Amp can’t drive the pin higher than about 3.1V. I did also try a AD8629 OP-Amp, with even worse result.

Both OP-Amps work fine when driving an analog pin in Teensy LC (has also 3.3V supply voltage).
There is one important difference between XIAO SAMD21 and Teensy LC:
When I set the analog input in Teensy LC as “INPUT”, then I have the same problem as described above.
But with Teensy it’s recommended to set the input as “INPUT_DISABLE”. Then it works as expected.
Why is “INPUT_DISABLE” not available with XIAO SAMD21? I get a compiler warning that this constant is not declared.


I fixed this by limiting the input voltage to 3.0V.