9160 ADC measurement inaccurate

I used C:\ncs\v2.6.1\zephyr\drivers\adc as an example for testing adc, the following code has been added to nrf9160dk_nrf9160_ns.overlay

/ {
	zephyr,user {
		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, <&adc 4>, <&adc 5>, <&adc 6>;
	};
};

&adc {
	status = "okay";
	#address-cells = <1>;
    #size-cells = <0>;

    channel@0 {
        reg = <0>;
        zephyr,gain = "ADC_GAIN_1_6";
        zephyr,reference = "ADC_REF_INTERNAL";
        zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
        zephyr,input-positive = <NRF_SAADC_AIN0>; // TS_ADC
        zephyr,resolution = <12>;
    };
    channel@1 {
        reg = <1>;
        zephyr,gain = "ADC_GAIN_1_6";
        zephyr,reference = "ADC_REF_INTERNAL";
        zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
        zephyr,input-positive = <NRF_SAADC_AIN1>; // TS_ADC
        zephyr,resolution = <12>;
    };
    channel@2 {
        reg = <2>;
        zephyr,gain = "ADC_GAIN_1_6";
        zephyr,reference = "ADC_REF_INTERNAL";
        zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
        zephyr,input-positive = <NRF_SAADC_AIN2>; // TS_ADC
        zephyr,resolution = <12>;
    };
    channel@3 {
        reg = <3>;
        zephyr,gain = "ADC_GAIN_1_6";
        zephyr,reference = "ADC_REF_INTERNAL";
        zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
        zephyr,input-positive = <NRF_SAADC_AIN3>; // TS_ADC
        zephyr,resolution = <12>;
    };
    channel@4 {
        reg = <4>;
        zephyr,gain = "ADC_GAIN_1_6";
        zephyr,reference = "ADC_REF_INTERNAL";
        zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
        zephyr,input-positive = <NRF_SAADC_AIN4>; // TS_ADC
        zephyr,resolution = <12>;
    };
    channel@5 {
        reg = <5>;
        zephyr,gain = "ADC_GAIN_1_6";
        zephyr,reference = "ADC_REF_INTERNAL";
        zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
        zephyr,input-positive = <NRF_SAADC_AIN5>; // TS_ADC
        zephyr,resolution = <12>;
    };
    channel@6 {
        reg = <6>;
        zephyr,gain = "ADC_GAIN_1_6";
        zephyr,reference = "ADC_REF_INTERNAL";
        zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
        zephyr,input-positive = <NRF_SAADC_AIN6>; // TS_ADC
        zephyr,resolution = <12>;
    };
};
I applied voltage to pins p0.13 to p0.19 for testing and found that the measurement results were relatively accurate when the voltage was below 2.1V (even though it was still about 100mV lower than the actual voltage). Once the voltage on the pin exceeds 2.1, the measurement value obtained by ADC will actually decrease. For example, if I give a voltage of 2.5V, the measurement result is around 1.3V

Which parameter needs to be modified? Or did I do something wrong?

Related