C2510Fx / CC2511Fx
// Alignment of entering PM2 to a positive edge on the 32 kHz clock source
char temp = WORTIME0;
while(temp == WORTIME0);
// Wait until a positive 32 kHz edge
// Enter PM
PCON |= 0x01;
// Reset timer and align the entering of PM2 to a positive edge on the 32 kHz
// clock source
WORCTRL |= 0x04;
// Reset Sleep Timer
char temp = WORTIME0;
while(temp == WORTIME0);
temp = WORTIME0;
// Wait until a positive 32 kHz edge
while(temp == WORTIME0);
PCON |= 0x01;
// Wait until a positive 32 kHz edge
// Enter PM
13.8.3 Low Power RC Oscillator and Timing
13.8.4 Sleep Timer Interrupt
This section applies to using the low power RC
oscillator as clock source for the Sleep Timer.
The Sleep Timer generates the Sleep Timer
interrupt, ST, when Event 0 occurs. This
interrupt source can be masked using the
WORIRQ.EVENT0_MASK interrupt mask bit.
The interrupt flag bit WORIRQ.EVENT0_FLAG
will be set when Event 0 occurs.
The frequency of the low-power RC oscillator,
which can be used as clock source for the
Sleep Timer, varies with temperature and
supply voltage. In order to keep the frequency
as accurate as possible, the RC oscillator
should be calibrated whenever possible, which
is when the high speed crystal oscillator is
running and the chip is in active mode or PM0.
When the chip goes to PM1 or PM2, the RC
oscillator will use the last valid calibration
result. The frequency of the low power RC
oscillator is therefore locked to fref / 750.
13.8.5 Sleep Timer DMA Trigger
There is one DMA trigger associated with the
Sleep Timer. This is the DMA trigger ST,
which is generated when Event 0 occurs.
13.8.6 Sleep Timer Registers
This section describes the SFRs associated
with the Sleep Timer.
SWRS055D
Page 126 of 243