AN202
V1.0 | Page 64/73
www.cmostek.com
15 MCU Sleep Saving Mode
The chip enters the sleep status after the execution of the SLEEP instruction.
In order to achieve minimum sleep power consumption, the software should set all IO to high or low, and there
is no the external circuit consumption from the IO pin. I/O is the input pin, and the external circuit should pull it
high or low to avoid flipping the level and increasing the power consumption. /MCLR should be set to high
level.
In order to achieve the lowest sleep power consumption, it is recommended that when the configuration is the
crystal mode or external clock mode, the clock loss detection is turned off, that is, the FCMEN bit of UCFG1 is
cleared. Meanwhile, the configuration bit CM<2:0> of the comparator is written as 0b111, and the comparator
module is closed.
15.1
Wake-up Mode
The following events can wake up the chip:
There is an external reset on the /MCLR pin.
WDT is timeout
There is the interrupt on the PA2/INT pin. There is the PORTA change interrupt or other peripheral
interrupt.
Clearing watchdog (CLRWDT), entering the sleep mode (SLEEP) or waking up the sleep mode will clear the
watchdog counter.
15.2
Watchdog Wake-up
The watchdog works in the internal slow clock (32KHz). It is a 16-bit counter, and shares an 8-bit prescaler
with the timer0. Enable bit is the third bit WDTEN of the configuration register UCFG0. When it is 1, enable the
watchdog; when it is 0, whether or not to enablethe watchdog is determined by the SWDTEN bit. SWDTEN is
located in the WDTCON register.
Clearing watchdog (CLRWDT) and SLEEP instruction will clear the watchdog counter.
When enabling the watchdog, the watchdog overflowing event can be used as a wake-up source when MCU
is in Sleep, while it can be used as a reset source when MCU works normally.
Содержание CMT2189C
Страница 32: ...AN202 V1 0 Page 32 73 www cmostek com...