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

Watchdog timer & SYSTEM ON mode

Hi,

I am trying to determine whether or not to use a watchdog timer in our firmware. The device is and IoT device, making sensor readings and entering sleep mode for a while.

I have determined that it makes most sense to keep the device in SYSTEM ON sleep state. Power consumption is a major concern in this application - which brings me to the following questions:

  1. How much impact does the watchdog timer have on power consumption when the device is in SYSTEM ON state.
  2. From a power consumption perspective - which is more practical/effective - manually disabling peripherals, or letting the SYSTEM ON mode handle things automatically.

Thanks

Tim

Parents
  • Let's call "SYSTEM ON" Sleep State.

    Peripherals work independently of the CPU state so are unaffected by sleep. You certainly should be disabling any peripherals you no longer need before sleeping although I can't envisage an application where you'd need to do this. Normally the peripherals fire interrupts which wake the CPU, you do something, then sleep again, so the peripherals you need are always running. If you no longer need them turn them off, obviously. :)

    The watchdog is for recovering from a crash which doesn't reset the CPU. If your code is rock solid, if your hardware is correct (decoupling capacitors, crystal stable), if there aren't huge temperature extremes, and if there are no or minimal external factors (example reading a voltage which pushes your calculations out of bounds and you forgot to check in code) then you probably don't need it.

    Power consumptions tips -

    1. use low frequency clock with low prescaler over high frequency clock with high prescaler for timers if you can.
    2. set unused pins as output and low.
    3. use peripheral shorts and the PPI feature to wire events to tasks without CPU intervention.

     

Reply
  • Let's call "SYSTEM ON" Sleep State.

    Peripherals work independently of the CPU state so are unaffected by sleep. You certainly should be disabling any peripherals you no longer need before sleeping although I can't envisage an application where you'd need to do this. Normally the peripherals fire interrupts which wake the CPU, you do something, then sleep again, so the peripherals you need are always running. If you no longer need them turn them off, obviously. :)

    The watchdog is for recovering from a crash which doesn't reset the CPU. If your code is rock solid, if your hardware is correct (decoupling capacitors, crystal stable), if there aren't huge temperature extremes, and if there are no or minimal external factors (example reading a voltage which pushes your calculations out of bounds and you forgot to check in code) then you probably don't need it.

    Power consumptions tips -

    1. use low frequency clock with low prescaler over high frequency clock with high prescaler for timers if you can.
    2. set unused pins as output and low.
    3. use peripheral shorts and the PPI feature to wire events to tasks without CPU intervention.

     

Children
No Data
Related