User Manual

Jennic
JennicJennic
Jennic
© Jennic 2008 JN-DS-JN5139 v1.5 49
When entering into sleep mode, there is an option to retain the RAM contents throughout the sleep period. If wakeup
timers or comparator event are not to be used for a wakeup event, then power can be saved by switching off the
32kHz oscillator through software control.
Whilst in sleep mode one of three possible events can cause a wakeup to occur: transitions on DIO inputs, expiry of
wakeup timers or comparator events. If any of these events occur, an interrupt is generated that will cause a wakeup
from sleep. It is possible for multiple wakeup sources to trigger an event at the same instant and only one of them
will be accountable for the wakeup period. It is therefore necessary in software to remove all other pending wakeup
events prior to requesting entry back into sleep mode; otherwise, the device will re-awaken immediately.
When wakeup occurs, a similar sequence of events to the reset process described in section 6.1 happens. The
16MHz oscillator is started up, once stable the power to CPU system is enabled and the reset is removed. Software
determines that this is a reset from sleep and so commences with the wakeup process. If RAM contents were held
through sleep, wakeup is quicker as the application program does not have to be reloaded from Flash memory.
16.3.1 Wakeup Timer Event
The JN5139 contains two 32-bit wakeup timers that are counters clocked from the 32kHz oscillator, and can be
programmed to generate a wake-up event. Following a wakeup event, the timers continue to run. These timers are
described in section 12.3.
Timer events can be generated from both of the two timers; one is intended for use by the 802.15.4 protocol, the
other being available for use by the Application running on the CPU. These timers are available to run at any time,
even during sleep mode.
16.3.2 DIO Event
Any DIO pin when used as an input has the capability, by detecting a transition, to generate a wake-up event. Once
this feature has been enabled the type of transition can be specified (rising or falling edge). Even when groups of
DIO lines are configured as alternative functions such as the UARTs or Timers etc, any input line in the group can still
be used to provide a wakeup event. This means that an external device communicating over the UART can wakeup
a sleeping device by asserting its RTS signal pin (which is the CTS input of the JN5139).
16.3.3 Comparator Event
The comparator can generate a wakeup interrupt when a change in the relative levels of the positive and negative
inputs occurs, the negative input being selectable between the external pin COMPxN or the internal voltage
reference. The ability to wakeup when continuously monitoring analogue signals is useful in ultra-low power
applications. For example, the JN5139 can remain in sleep mode until the voltage drops below a threshold and then
be woken up to deal with the alarm condition.
16.4 Deep Sleep Mode
Deep sleep mode gives the lowest power consumption. All switchable power domains are off and certain functions in
the VDD supply power domain, including the 32kHz oscillator are stopped. This mode can be exited by a power
down, a hardware reset on the RESETN pin, or a DIO event. The DIO event in this mode causes a chip reset to
occur.