Tod Operation; Tod In Low-Power Modes; Time-Of-Day Control/Status Register (Todcsr); Tod Control/Status Register - Motorola M-CORE MMC2001 Series Reference Manual

Table of Contents

Advertisement

9.4.1 TOD Operation

The TOD seconds register (TODSR) is readable and writable at any time. The TOD
fraction register (TODFR) is always cleared to zero when the TODSR is written.
Writes to the TODFR cause the fraction register to be set to all ones, regardless of
the data written. For read operations, always read the TODSR before the TODFR.
This latches the TODFR, which prevents any loss of carry information from the frac-
tion to the seconds registers.
The TOD value is matched every 1/256 second to the alarm register if the alarm func-
tion is enabled. When a match occurs, the alarm interrupt flag (AIF) is set, and when
the alarm interrupt enable bit (AIE) is set, an interrupt is issued to the CPU. A write to
the TOD fraction alarm register (TODFAR) clears the AIF. Writes to the TOD seconds
alarm register (TODSAR) do not affect the clearing of the AIF.
The alarm match function is temporarily disabled after a write to the TODSAR until
the TODFAR is written. This prevents an alarm match from occurring before the entire
40-bit alarm value is written.
The TOD fraction and seconds counters are undefined after a POR operation and are
unaffected by any other reset source. The TOD alarm is disabled by any reset source.

9.4.2 TOD in Low-Power Modes

The TOD is unaffected by the low-power modes. An alarm interrupt may be used to
exit from a low power state.

9.4.3 Time-of-Day Control/Status Register (TODCSR)

TODCSR — Time-of-Day Control/Status Register
31
30
29
28
R
0
0
0
0
W
RESET:
15
14
13
12
R
0
0
0
0
W
RESET:
Access this register with 32-bit loads and stores only.
AE — Alarm Enable
This bit controls the function of the TOD alarm
0 = Alarm function is off to save power
1 = Alarm function is on
AIE — Alarm Interrupt Enable
MMC2001
REFERENCE MANUAL
Freescale Semiconductor, Inc.
27
26
25
24
0
0
0
0
11
10
9
8
0
0
0
0
Figure 9-4 TOD Control/Status Register
TIMER/RESET MODULE
For More Information On This Product,
Go to: www.freescale.com
23
22
21
20
0
0
0
0
7
6
5
4
0
0
0
0
10001004
19
18
17
16
0
0
0
0
3
2
1
0
0
AE
AIE
AIF
0
0
0
MOTOROLA
9-5

Advertisement

Table of Contents
loading

Table of Contents