nRF54L15 ADC channels not reading correctly

Hi,

I’m working with nRF54L15 (nRF54L15 DK) using NCS v3.0.2, and I’m facing an issue with ADC channel readings.

I configured the following ADC channels:

  • AIN3 → P1.07

  • AIN6 → P1.13

  • AIN7 → P1.14

Devicetree overlay

/ {
    zephyr,user {
        io-channels = <&adc NRF_SAADC_AIN3>,  /* P1.07 */
                      <&adc NRF_SAADC_AIN6>,  /* P1.13 */
                      <&adc NRF_SAADC_AIN7>;  /* P1.14 */
    };
};

ADC configuration

#define ADC_NODE DT_NODELABEL(adc)

static const struct device *adc_dev = DEVICE_DT_GET(ADC_NODE);

void adc_init(void)
{
    if (!device_is_ready(adc_dev)) {
        printk("ADC device not ready\n");
        return;
    }

    struct adc_channel_cfg ch_cfg = {
        .gain = ADC_GAIN_1,
        .reference = ADC_REF_EXTERNAL0,
        .acquisition_time = ADC_ACQ_TIME_DEFAULT,
        .differential = 0,
    };

    uint8_t ain_map[3] = {3, 6, 7};  // AIN3, AIN6, AIN7

    for (int i = 0; i < 3; i++) {
        ch_cfg.channel_id = i;
        ch_cfg.input_positive = ain_map[i];

        int ret = adc_channel_setup(adc_dev, &ch_cfg);
        if (ret) {
            printk("Channel %d setup failed: %d\n", i, ret);
            return;
        }
    }
}

ADC read

void Read_adc_values(void)
{
    int16_t raw_buf[3];

    struct adc_sequence sequence = {
        .channels = BIT(0) | BIT(1) | BIT(2),
        .buffer = raw_buf,
        .buffer_size = sizeof(raw_buf),
        .resolution = 12,
    };

    int ret = adc_read(adc_dev, &sequence);
    if (ret) {
        printk("ADC read failed: %d\n", ret);
        return;
    }

    printk("CH0 (AIN3 / P1.07): %d\n", raw_buf[0]);
    printk("CH1 (AIN6 / P1.13): %d\n", raw_buf[1]);
    printk("CH2 (AIN7 / P1.14): %d\n", raw_buf[2]);
}

Observed behavior

When connecting the sensor:

  • On P1.13 (expected AIN6) → only AIN7 channel shows valid readings

  • AIN3 and AIN6 always return ~4092 (full-scale)

Example output:

CH0 (AIN3 / P1.07): 4092
CH1 (AIN6 / P1.13): 4092
CH2 (AIN7 / P1.14): 2532

Additionally:

  • Connecting the sensor to P1.07 or P1.14 does not change readings

  • Only P1.13 seems to affect ADC output, but it appears on AIN7

Questions

  1. What is the correct AIN - GPIO mapping for nRF54L15 DK?
  2. Are P1.07 and P1.14 valid ADC input pins?
  3. Is any additional configuration required for ADC inputs on nRF54?


Any guidance on correct ADC channel  pin mapping for nRF54L15 would be very helpful.

Thanks!

Parents Reply Children
No Data
Related