nRF5340 high sleep current with short-duration sleep

I'm looking into the power consumption of our code, and have reached the point where it looks like our application isn't going into sleep mode properly, and is using several hundred microamps more power than it should be.

We want to sample from the SAADC every millisecond, but in testing our board, I've been running some sample code instead. The most basic example is just a while loop that sleeps for 1 ms.

In this case, doing nothing but sleeping in a loop, our board is drawing 671 uA. If I increase the sleep duration to 5 ms then it's drawing 200 uA. If it sleeps for 1000 ms it's drawing something like 23 uA.

I guess some current overhead is expected when waking more frequently, but profiling the current using an otii it looks like the 1ms sleep code doesn't ever drop below about 650 uA. Whereas for longer sleep durations I can see the current drop much lower.

So, my question is - how long does it take the nRF5340 to go into sleep mode? If it's > 1 ms then that would explain what I'm seeing - the chip never gets to sleep as it wakes up before it can turn off the HF clock. If so, is there any way to make it enter sleep faster?

Alternatively, I guess it could be the otii - it's sampling at 4 kHz, so maybe that's just not enough to catch the drop in power in sleep mode.

  • Rory Morrison said:
    However, I've realised that the board I'm testing on (a prototype of our device)

    Oh, I was under the impression that you were conducting these measurements on a DK - then that could indeed explain it.

    Rory Morrison said:
    I'm going to try it on a dev kit hooked up to an oscilloscope to see if I can actually see the spike, and confirm what the idle current is in between.

    Great, I look forward to hearing your results from this! :) 

    Best regards,
    Karl

Related