Using SAADC for 2 channels, burst mode, current consumption remains constant after nrf_drv_saadc_uninit call

We have an application that needs to read device battery voltage and a sensor value every 10 seconds.  The ADC is using burst mode and 8X oversampling to take each sample.  Full configuration:

SAADC config:

  • 12-bit resolution
  • 8X oversampling
  • Not using low-power mode

Channel config:

  • Single-ended mode
  • P and N resistors disabled
  • Gain 1/3 for sensor, default gain for vbatt
  • Internal reference
  • 10us acquisition time
  • Burst mode enabled

Every 10 seconds the application takes a single reading, then de-inits the SAADC.  It is re-initialized when the next reading is needed.

What we are observing is that the current consumption increases to ~450uA when the ADC takes the first reading, and then stays at that level after the SAADC is un-initialized.

A previous iteration of the application just took a single reading on both channels without using burst mode.  With this firmware, the current increases while taking the reading, then drops back to the normal level of around 70uA.  

I read a post where the individual responding to the question said he was not sure whether nrf_drv_saadc_uninit would work from within the saadc's callback function (interrupt context).  After we realized the behavior when using burst mode, I moved the uninit call out of the callback, and into the idle loop where it sees that the readings have been acquired.  This did not have any effect.

We're using this code to un-init the SAADC at the end of the callback after getting the readings:

nrf_drv_saadc_channel_uninit(0);
nrf_drv_saadc_channel_uninit(1);
nrf_drv_saadc_uninit(); // Unintialize SAADC to disable EasyDMA and save power
NRF_SAADC->INTENCLR = (SAADC_INTENCLR_END_Clear << SAADC_INTENCLR_END_Pos); // Disable the SAADC interrupt
NVIC_ClearPendingIRQ(SAADC_IRQn); // Clear the SAADC interrupt if set

The question is why this appears to work when not using burst mode, but does not work when using burst mode.

Looking for some clues as to how to get the SAADC to turn off after getting a sample using burst mode.

Parents Reply Children
No Data
Related