UG-1262
Rev. B | Page 146 of 312
RECOMMENDED SLEEP AND WAKE-UP TIMER OPERATION
When using the sleep and wake-up timer to optimize performance and power consumption, the following procedure is recommended:
1.
Set the AFE PWRMOD register, Bit 2 to disable the timer sleep function. Note that the sleep and wake-up timer does not place the
device in hibernate mode. Instead, write to the SEQTRGSLP register at the end of the sequence to place the device in sleep mode. Sleep
mode optimizes power consumption.
2.
Set the TMRCON register, Bit 0 to enable the timer wake-up function.
3.
Set the AFE PWRMOD register, Bits[3:1] and the SEQSLPLOCK register to 0xA47E5 to enable the sequencer to trigger sleep.
4.
Set the final sequence in the CON register, Bits[3:1]. If only one sequence is used, select that sequence.
5.
Write the sleep time and wake-up time to the SEQxSLEEPH, SEQxSLEEPL, SEQxWUPH, and SEQxWUPL registers.
6.
Use the SEQORDER register to configure the order in which sequences are triggered.
7.
Write 1 to the CON register, Bit 0, to enable the timer.
When Bit 0 of the CON register = 1, the timer loads the values from the SEQxWUPH and SEQxWUPL registers and begins counting
down. When the timer reaches zero, the device wakes up and executes sequences in the order specified in the SEQORDER register, Bits[1:0].
The timer loads the values from the SEQxSLEEPH and SEQxSLEEPL registers and begins counting down again when the sequencer is
running. When the timer elapses, the ADuCM355 returns to sleep mode if the TMRCON register, Bit 0 = 1. If the AFE PWRMOD register,
Bit 3 = 1, the ADuCM355 returns to sleep mode at the end of the last sequence.
The maximum hibernate time is 32 seconds when using the internal 32 kHz oscillator.
To calculate the code for the SEQxWUPx and SEQxSLEEPx registers, use the following equation:
Code
=
ClkFreq
×
Time
where:
Code
is the code value for the SEQxWUPx register.
ClkFreq
is the frequency of the internal oscillator in Hz.
Time
is the required timeout duration in seconds.
SLEEP AND WAKE-UP TIMER REGISTERS
Table 180. Sleep and Wake-Up Timer Registers Summary
Address Name
Description
Reset
Access
0x400C0800
CON
Timer control register
0x0000
R/W
0x400C0804
SEQORDER
Order control register
0x0000
R/W
0x400C0808 SEQ0WUPL
Sequence 0 wake-up time register (LSB)
0xFFFF
R/W
0x400C0818 SEQ1WUPL
Sequence 1 wake-up time register (LSB)
0xFFFF
R/W
0x400C0828 SEQ2WUPL
Sequence 2 wake-up time register (LSB)
0xFFFF
R/W
0x400C0838 SEQ3WUPL
Sequence 3 wake-up time register (LSB)
0xFFFF
R/W
0x400C080C SEQ0WUPH Sequence
0
wake-up time register (MSB)
0x000F
R/W
0x400C081C SEQ1WUPH Sequence
1
wake-up time register (MSB)
0x000F
R/W
0x400C082C SEQ2WUPH Sequence
2
wake-up time register (MSB)
0x000F
R/W
0x400C083C SEQ3WUPH Sequence
3
wake-up time register (MSB)
0x000F
R/W
0x400C0810 SEQ0SLEEPL Sequence 0 sleep time register (LSB)
0xFFFF
R/W
0x400C0820 SEQ1SLEEPL Sequence 1 sleep time register (LSB)
0xFFFF
R/W
0x400C0830 SEQ2SLEEPL Sequence 2 sleep time register (LSB))
0xFFFF
R/W
0x400C0840 SEQ3SLEEPL Sequence 3 sleep time register (LSB)
0xFFFF
R/W
0x400C0814
SEQ0SLEEPH
Sequence 0 sleep time register (MSB)
0x000F
R/W
0x400C0824
SEQ1SLEEPH
Sequence 1 sleep time register (MSB)
0x000F
R/W
0x400C0834
SEQ2SLEEPH
Sequence 2 sleep time register (MSB)
0x000F
R/W
0x400C0844
SEQ3SLEEPH
Sequence 3 sleep time register (MSB)
0x000F
R/W
0x400C0A1C
TMRCON
Timer wake-up configuration register
0x0000
R/W