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

Elevated idle current after using TIMER2

I've noticed the idle current of my application changes permanently by ~5uA  after using the radio, timer2, and/or the app timer (not sure which).  I'm using a custom radio protocol/software that turns on the radio, goes through a few tx/rx exchanges, then turns off.  Before the radio runs the first time, sleep current is around 2.5uA, while after it increases to 7.5 uA.  Here's a current vs. time scan showing the change (big spike in the middle is radio activity, smaller spikes are from a 1Hz app timer, and the really small spikes are--I assume--from the DC-DC converter--note the frequency change after the radio activity):

I use TIMER2 as a RX timeout/TX delay timer, and two SW app timers (one for longer delays and one as a watchdog).  I ensure that the radio is de-initialized when done (I've also tried setting the POWER bit to 0 with no change) and its interrupts disabled, I trigger the TIMER2 stop task and disable its interrupts, and I stop both app timers.  I also switch off the HFXO with TASKS_HFCLKSTOP, and ensure it's off by checking the HFCLKSTAT register.

I've tried isolating each of the peripherals to determine which one is causing the problem, but it's a little difficult to separate them.  I think I've been able to isolate it to the TIMER2 peripheral, but I'm not very confident of that.   EDIT: I've done a little more testing, and I'm now 99% sure it is TIMER2.  When I avoided using it at all the sleep current went back to it's pre-radio level after the radio event.

My questions:

  1. does the 5uA increase narrow anything down?  i.e. does one of these peripherals have a state that draws 5uA?
  2. Is there anything more I need to do to disable the TIMER2 peripheral?  
  3. Are there any registers (or libraries) I can use to help determine where this current draw is coming from?

Thanks!
Mark

Related