English
Language : 

XC161 Datasheet, PDF (76/419 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Real Time Clock
15.3
RTC Operating Modes
The RTC can be configured for several operating modes according to the purpose it is
meant to serve. These operating modes are configured by selecting appropriate reload
values and interrupt signals.
RUN
PRE
fRTC
8
1
MUX
0
T14REL
CNT
IN T 0
10 Bits
Interrupt Sub Node
CNT
IN T 1
CNT
IN T 2
R E L -R eg is te r
CNT
INT3
6 Bits
6 Bits
10 Bits
R T C IN T
fCNT
T14
T14-Register
10 Bits
6 Bits
6 Bits
C N T -R e g is te r
10 Bits
m cb04805_xc.vsd
Figure 15-3 RTC Block Diagram
RTC Register Access
The actual value of the RTC is indicated by the three registers T14, RTCL, and RTCH.
As these registers are concatenated to build the RTC counter chain, internal overflows
occur while the RTC is running. When reading or writing the RTC value, such internal
overflows must be taken into account to avoid reading/writing corrupted values.
Care must be taken, when reading the timer(s), as this requires up to three read
accesses to the different registers with an inherent time delay between the accesses. An
overflow from T14 to RTCL and/or from RTCL to RTCH might occur between the
accesses, which needs to be taken into account appropriately.
For example, reading/writing 0000H to RTCH and then accessing RTCL could produce
a corrupted value as RTCL may overflow before it can be accessed. In this case, RTCH
would be 0001H. The same precautions must be taken for T14 and T14REL.
User’s Manual
RTC_X8, V2.1
15-7
V2.2, 2004-01