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

SAADC low power scan mode

FormerMember
FormerMember

Greetings,

I have a setup where I have a periodic single channel low power SAADC implementation. In this the configuration is

  • A single SAADC channel is initialized (10 us acquisition time, differential, gain 4, 12 bit, internal reference)
  • RESULT.MAXCNT=1,
  • Oversampleing 4x with burst mode
  • Interrupt is enabled for NRF_SAADC_INT_CH0LIMITH and NRF_SAADC_INT_CH0LIMITL
  • SAADC channel limits are set

The PPIs set up are

  • SAADC_EVENT_STARTED -> SAADC_TASK_SAMPLE
  • RTC_EVENT_COMPARE_0 -> SAADC_TASK_START -> RTC_TASK_CLEAR (RTC clear is fork)
  • SAADC_EVENT_END -> SAADC_TASK_STOP

The RTC CC[0] is set to fire an event every 20 ms. With this setup, when the SAADC samples every 20 ms. When the sample results don't cross the limits the interrupt is not fired and the processor doesn't wake up. In this case with the processor always sleeping I get around 11 uA current consumption according to the power profiler kit, which is amazing!

The problem occurs when a second channel is initialized and its limits are set, with the rest of the settings exactly the same. The functionality of two channels sampling works, but the power consumption goes to 600-700 uA. I read somewhere that the EasyDMA causes this. But since RESULT.MAXCNT=1, even with two channels, the EasyDMA shouldn't be used right? Is there any low power way to have two channels sampling periodically with the processor waking up only if any of the two channels cross its limits?

Cheers!

Update: To provide some context, I'm working on detecting motion from two PIR sensors, one with a narrow angle lens and the other with a wide angle lens. Here's a pic of the board. The code that is described in the question can be found here github.com/.../main.c

image description

Related