This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ADC channel resistors

I have configured 3 differential ADC channels to sample with timer/PPI/DMA buffer. When I turned everything off, I couldn't get below 20uA current (with only LFCLK running).

I realised recently that resistor dividers, used in SAADC channel config, are not deactivated with SAADC_channel_uninit().

With workaround code below I got current down to 12uA. Obviously, configuring GPIO's didn't didn't help in this case, with ADC channels dividers left on.

//trying to remove any pull_up/pull_down 
channel_0_config.resistor_p = NRF_SAADC_RESISTOR_DISABLED;
channel_0_config.resistor_n = NRF_SAADC_RESISTOR_DISABLED;
channel_1_config.resistor_p = NRF_SAADC_RESISTOR_DISABLED;
channel_1_config.resistor_n = NRF_SAADC_RESISTOR_DISABLED;
channel_2_config.resistor_p = NRF_SAADC_RESISTOR_DISABLED;
channel_2_config.resistor_n = NRF_SAADC_RESISTOR_DISABLED;
nrf_saadc_channel_init(0, &channel_0_config);
nrf_saadc_channel_init(1, &channel_1_config);
nrf_saadc_channel_init(2, &channel_2_config);

Is there any simpler/more elegant code to turn off these resistors, shouldn't that be the part of ..uninit() function?

Regards Tomasz

Parents Reply Children
No Data
Related