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

SAADC power on/off

My environment: DK 10040, nRF52832, SD 6.1.1, SDK 15.2, SES 3.52

When does the SAADC use power?  And when does it stop using power?  

I searched the 52832 specification and DevZone but could not find a clear explanation.  My best guess is that power consumption begins when the START task is triggered and it will continue to draw power until the buffer is filled and the END event occurs. Is this correct?  I found a couple posts that suggest you need to issue the STOP command and disable the SAADC but I do not see this happening in the driver even when low power is enabled.

My guess is based on the low power mode in the driver (nrfx_saadc) which seems to follow this sequence:

  1. Configure saadc and channels
  2. Enable saadc
  3. Start a timer
  4. Timer expires and triggers START task
  5. SAADC IRQ receives STARTED event and triggers SAMPLE task
  6. SAADC IRQ receives END event
  7. Data is ready for use
  8. Timer repeats this loop...

Assuming this is correct, I wonder if we can eliminate the CPU interrupt for the STARTED event and instead use the PPI to trigger the SAMPLE task when the STARTED event occurs. This approach would eliminate one CPU interrupt and it would make the timing of the SAMPLE task more deterministic. The new sequence would be:

  1. Configure saadc and channels
  2. Enable saadc
  3. Start a timer
  4. Timer expires
  5. PPI triggers START task
  6. SAADC sends the STARTED event
  7. PPI triggers the SAMPLE task
  8. SAADC sends the END event
  9. IRQ handles the END event
  10. Timer repeats this loop...

I coded this up and it seems to work fine. I plan to measure power as soon as I get the required tools.  Do you see any concerns with this approach? Are there other ways to save power?

Currently I use a timer with frequency 31250Hz.  Would I save a lot of power if I use RTC instead?   Thanks!

Parents
  • Hi,

     

    When does the SAADC use power?  And when does it stop using power?  

    The SAADC shall use power only when active. The problem here, is that there's other things active in your system requiring the HFCLK (the TIMER peripheral), thus you get approx. 0.5 mA sleep current.

    Currently I use a timer with frequency 31250Hz.  Would I save a lot of power if I use RTC instead?   Thanks!

     This will cause the sleep current to be high, as the TIMER peripheral will keep the HFCLK running. The problem here is that the RTC can provide an event every 16.384 kHz (half of its input source), so if you require a sampling rate of >32k/2, then you'll have to use a high speed TIMER peripheral.

    Kind regards,

    Håkon

Reply
  • Hi,

     

    When does the SAADC use power?  And when does it stop using power?  

    The SAADC shall use power only when active. The problem here, is that there's other things active in your system requiring the HFCLK (the TIMER peripheral), thus you get approx. 0.5 mA sleep current.

    Currently I use a timer with frequency 31250Hz.  Would I save a lot of power if I use RTC instead?   Thanks!

     This will cause the sleep current to be high, as the TIMER peripheral will keep the HFCLK running. The problem here is that the RTC can provide an event every 16.384 kHz (half of its input source), so if you require a sampling rate of >32k/2, then you'll have to use a high speed TIMER peripheral.

    Kind regards,

    Håkon

Children
No Data
Related