User manual

...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 567
www.energymicro.com
22.3.4 PRS Sources
The compare channel of the Backup RTC can be used as PRS source. A pulse lasting one clock cycle
will be generated on a compare match. A PRS pulse will also be generated on overflow.
22.3.5 Debugrun
By default, the backup RTC is halted when code execution is halted by the debugger. By setting the
DEBUGRUN bit in the CTRL register, the backup RTC will continue to run even when the system is
halted.
22.3.6 Low power mode
The Backup RTC has a low power mode which lowers the power consumption at the expense of
decreased resolution on compare matches. The low power mode is enabled by configuring the LPMODE
bitfield in BURTC_CTRL. When LPMODE is set to ENABLE, low power mode is always enabled, if
LPMODE is set to BUEN, the Backup RTC operates in normal mode until the system enters backup
mode, refer to Section 10.3.4 (p. 112) for details on backup mode. When the Backup RTC operates
in low power mode, a configurable number of the LSBs of COMP0 are ignored for compare match
evaluation. The number of bits ignored is configured in the LPCOMP bitfield in the BURTC_CTRL
register. Equation 22.2 (p. 567) is used to calculate compare match resolution in low power mode.
In low power mode, the Backup RTC will decrease its frequency by a factor of 2
-LPCOMP
, and start
incrementing with 2
LPCOMP
instead of 1. When reading the counter value from software, full resolution is
maintained, the decrease in frequency will only affect the resolution on compare matches. Low power
mode can be entered and exited while the Backup RTC is running. When the Backup RTC is operating
in low power mode, LPMODEACT in BURTC_STATUS is set.
Low power mode compare match resolution
CM
resolution
= 2
PRESC + LPCOMP + 1
/ F
CLK
, PRESC + LPCOMP + 1 < 9 (22.2)
Table 22.1. Resolution and overflow
Normal mode Low power mode
PRESC
Compare match
resolution
Overflow
Compare match
resolution
Overflow
0 30.5 µs 1.52 days Equation 22.2 (p.
567)
1.52 days
1 61 µs 3.03 days Equation 22.2 (p.
567)
3.03 days
2 122 µs 6.07 days Equation 22.2 (p.
567)
6.07 days
3 244 µs 12.14 days Equation 22.2 (p.
567)
12.14 days
4 488 µs 24.27 days Equation 22.2 (p.
567)
24.27 days
5 977 µs 48.54 days Equation 22.2 (p.
567)
48.54 days
6 1.95 ms 97.09 days Equation 22.2 (p.
567)
97.09 days
7 3.91 ms 194.18 days Equation 22.2 (p.
567)
194.18 days
Note