AIN0 and AIN1 always returning the maximum value on nRF54L15 DK

I am struggling with the ADC API on the nRF54L15 dev kit. I am using NCS 3.1.0

I started with the "samples/drivers/adc/adc_dt" sample as a starting point. Using AIN4 (Channel 0) worked, giving me readings from 900mV to 1800mV (using the Nordic PPKII).

Using exactly the same code, I started chaning the overlay.

The first problem I encountered was using AIN0 caused the logging to stop as soon as I applied power (!).

With AIN0 apparently useless, I switched to AIN1 (P1.05). My overlay is here

/ {
	zephyr,user {
		io-channels = <&adc 0>;
	};
};

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

	channel@0 {
		reg = <0>;
		zephyr,gain = "ADC_GAIN_1_2";
		zephyr,reference = "ADC_REF_INTERNAL";
		zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
		zephyr,input-positive = <NRF_SAADC_AIN1>;
		zephyr,resolution = <12>;
		zephyr,oversampling = <8>;
	};
};

Here is the output I get. 

I am only applying 1200mV to PIN

If I switch from AIN0 to AIN4, the reading is correct.

Are AIN0 and AIN1 special in any way?

Whilst searching the forum, I came across this:  nRF54L15 UART20 on non-standard pins results in garbage data 

Is this my problem with the DK? If so, would this be an issue if I was using a module?

Parents
  • Hello,

    ''The first problem I encountered was using AIN0 caused the logging to stop as soon as I applied power (!).''

    The operational voltage of nRF4l15 is 1.8 to 3.6V. I can see on the PPK2, you set 1.24V.

    If the supply voltage is set to 1242 mV (1.242 V), this is below the minimum required operating voltage for the device. Operating the nRF54L15 below 1.7 V is not supported and can lead to unpredictable behavior, including issues with peripherals like the ADC.

    Also, On the nRF54L15 DK, AIN4 is used instead of the AIN0 as AIN0 (P1.04) pin is used by default for UART. If you want to use ADC without conflicts, you can pick another channel like AIN4 (as you did), which maps to a different pin not already reserved for UART.

    Thanks.

    BR
    Kazi

Reply
  • Hello,

    ''The first problem I encountered was using AIN0 caused the logging to stop as soon as I applied power (!).''

    The operational voltage of nRF4l15 is 1.8 to 3.6V. I can see on the PPK2, you set 1.24V.

    If the supply voltage is set to 1242 mV (1.242 V), this is below the minimum required operating voltage for the device. Operating the nRF54L15 below 1.7 V is not supported and can lead to unpredictable behavior, including issues with peripherals like the ADC.

    Also, On the nRF54L15 DK, AIN4 is used instead of the AIN0 as AIN0 (P1.04) pin is used by default for UART. If you want to use ADC without conflicts, you can pick another channel like AIN4 (as you did), which maps to a different pin not already reserved for UART.

    Thanks.

    BR
    Kazi

Children
Related