nRF Connect SDK 3.2.1 (Zephyr 4.2.99) - battery sample for Thingy53 give zero value

Hello,

I've been having problems in getting the correct battery voltage for a Thingy53 for a number of projects, when using the latest nRF Connect SDK 3.2.1 (Zephyr 4.2.99). There were no issues in past with nRF Connect SDK 3.1.0.

For a quick test, I've built the "battery" sample in  "/nordic/ncs/v3.2.1/zephyr/samples/boards/nordic/battery" for Thingy53.

On running the application, Thingy53 console output reported that the battery voltage was 0 mV. This is obviously incorrect. When the USB-C connection to the Thingy53 is removed, application reports ~3 V.

A quick check with a multimeter reported the correct voltage of ~4.V.

When the exact same source code is built with nRF Connect SDK 3.1.0 (Zephyr 4.1.99), the application reported the correct value of ~4 V, irrespective of whether the USB-C cable is connected to the Thingy53 or not. 

It looks like that the ADC code changes in Zephyr 4.2.x may be the cause of the error.

Any idea what may be the cause of the issue? 


Can someone in Support verify the battery sample on a Thingy53 using nRF Connect SDK 3.2.1?

Thank you.

Parents
  • Hello,

    I tested the sample with NCS v3.2.1 and can reproduce the issue. I’ll take a closer look at the application code to see how it differs from v3.1.x, and I’ll get back to you tomorrow with an update.

    *** Booting nRF Connect SDK v3.2.1-d8887f6f32df ***
    *** Using Zephyr OS v4.2.99-ec78104f1569 ***
    [0:00:00.146]: 0 mV; 0 pptt
    [0:00:05.186]: 18 mV; 0 pptt
    [0:00:10.211]: 0 mV; 0 pptt
    [0:00:15.237]: 0 mV; 0 pptt
    [0:00:20.263]: 0 mV; 0 pptt
    [0:00:25.290]: 9 mV; 0 pptt
    [0:00:30.317]: 28 mV; 0 pptt
    [0:00:35.344]: 0 mV; 0 pptt
    [0:00:40.372]: 0 mV; 0 pptt
    [0:00:45.399]: 9 mV; 0 pptt
    [0:00:50.424]: 9 mV; 0 pptt
    [0:00:55.450]: 0 mV; 0 pptt
    [0:01:00.477]: 9 mV; 0 pptt
    [0:01:05.504]: 18 mV; 0 pptt
    [0:01:10.532]: 9 mV; 0 pptt
    [0:01:15.559]: 0 mV; 0 pptt
    [0:01:20.588]: 18 mV; 0 pptt
    [0:01:25.616]: 28 mV; 0 pptt
    [0:01:30.643]: 9 mV; 0 pptt
    [0:01:35.672]: 0 mV; 0 pptt
    [0:01:40.701]: 28 mV; 0 pptt
    [0:01:45.730]: 0 mV; 0 pptt
    [0:01:50.757]: 0 mV; 0 pptt
    [0:01:55.784]: 18 mV; 0 pptt
    [0:02:00.810]: 0 mV; 0 pptt
    [0:02:05.837]: 9 mV; 0 pptt
    [0:02:10.866]: 9 mV; 0 pptt
    [0:02:15.894]: 0 mV; 0 pptt
    [0:02:20.922]: 18 mV; 0 pptt
    [0:02:25.951]: 9 mV; 0 pptt
    [0:02:30.979]: 18 mV; 0 pptt

    Kind Regards,

    Abhijith

Reply
  • Hello,

    I tested the sample with NCS v3.2.1 and can reproduce the issue. I’ll take a closer look at the application code to see how it differs from v3.1.x, and I’ll get back to you tomorrow with an update.

    *** Booting nRF Connect SDK v3.2.1-d8887f6f32df ***
    *** Using Zephyr OS v4.2.99-ec78104f1569 ***
    [0:00:00.146]: 0 mV; 0 pptt
    [0:00:05.186]: 18 mV; 0 pptt
    [0:00:10.211]: 0 mV; 0 pptt
    [0:00:15.237]: 0 mV; 0 pptt
    [0:00:20.263]: 0 mV; 0 pptt
    [0:00:25.290]: 9 mV; 0 pptt
    [0:00:30.317]: 28 mV; 0 pptt
    [0:00:35.344]: 0 mV; 0 pptt
    [0:00:40.372]: 0 mV; 0 pptt
    [0:00:45.399]: 9 mV; 0 pptt
    [0:00:50.424]: 9 mV; 0 pptt
    [0:00:55.450]: 0 mV; 0 pptt
    [0:01:00.477]: 9 mV; 0 pptt
    [0:01:05.504]: 18 mV; 0 pptt
    [0:01:10.532]: 9 mV; 0 pptt
    [0:01:15.559]: 0 mV; 0 pptt
    [0:01:20.588]: 18 mV; 0 pptt
    [0:01:25.616]: 28 mV; 0 pptt
    [0:01:30.643]: 9 mV; 0 pptt
    [0:01:35.672]: 0 mV; 0 pptt
    [0:01:40.701]: 28 mV; 0 pptt
    [0:01:45.730]: 0 mV; 0 pptt
    [0:01:50.757]: 0 mV; 0 pptt
    [0:01:55.784]: 18 mV; 0 pptt
    [0:02:00.810]: 0 mV; 0 pptt
    [0:02:05.837]: 9 mV; 0 pptt
    [0:02:10.866]: 9 mV; 0 pptt
    [0:02:15.894]: 0 mV; 0 pptt
    [0:02:20.922]: 18 mV; 0 pptt
    [0:02:25.951]: 9 mV; 0 pptt
    [0:02:30.979]: 18 mV; 0 pptt

    Kind Regards,

    Abhijith

Children
Related