Analogue input channel constants wrong in nrf52833_bitfields.h for nRF Connect SDK v3.2.1

I just upgraded my project (that runs on custom hardware with the nRF8233 using an Ezurio BL653 module) from nRF Connect SDK v3.1.0 to SDK v3.2.1 and the battery monitoring on my device stopped working with the following errors:

*** Using nRF Connect SDK v3.2.1-d8887f6f32df ***
*** Using Zephyr OS v4.2.99-ec78104f1569 ***
E: Cannot configure channel 0: -22
I: Setup AIN7 got -22
I: Battery setup: -22 0

It seems that the constants in nrf52833_bitfields.h have changed are are now out by 1, so the only way I can make it work is to change my device tree file from

    vbatt {
        compatible = "voltage-divider";
        io-channels = <&adc 7>;
        output-ohms = <180000>;
        full-ohms = <(1500000 + 180000)>;
     };
to
    vbatt {
        compatible = "voltage-divider";
        io-channels = <&adc 6>;
        output-ohms = <180000>;
        full-ohms = <(1500000 + 180000)>;
     };
Then it works and gives the correct voltages.
Why has this changed?
Parents Reply Children
No Data
Related