nRF52833 SAADC Example

NCS 2.0.0

Our application is using an nRF52833.  Everything is running except measuring a voltage.  I am looking for a simple SAADC sample to read a single-ended voltage on channel 3.   I've done it a dozen times with nRF5 SDK, but NCS keeps evolving and there are no Nordic ADC samples that I can find specifically for NCS 2.0.0.  The dts files only contain the status property.  Thanks!

&adc {
  status = "okay";
};

  • Hi,

    You can use the ACS sample in Zephyr () with the nRF52833 DK, but you need to add an overlay file for it.

    For instance, to use AIN7 (P0.31) you can create a file (zephyr/samples/drivers/adc/boards/nrf52833dk_nrf52833.overlay) that contains this:

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

    You can add other configurations as needed. Note that there are overlay files for the nRF52840DK for the ADC sample in nRF Connect SDK 2.1.0, which gives you an indication of other parameters you can change (though not all are valid in 2.0.0).

Related