English
Language : 

XC164-16 Datasheet, PDF (72/417 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC164-16 Derivatives
Peripheral Units (Vol. 2 of 2)
Real Time Clock
Asynchronous Operation
When the system clock frequency becomes lower than 4 × fCNT proper synchronization
is not possible and count events may be missed. When the XC164 enters e.g. sleep
mode the system clock stops completely and the RTC would stop counting.
In these cases the RTC can be switched to Asynchronous Mode (by setting bit RTCCM
in register SYSCON0). In this mode the count registers are directly controlled by the
count clock independent of the system clock (hence the name). Asynchronous operation
ensures correct time-keeping even during sleep mode or powerdown mode.
However, as no synchronization between the count registers and the bus interface can
be maintained in asynchronous mode, the RTC registers cannot be written. Read
accesses may interfere with count events and, therefore, must be verified (e.g. by
reading the same value with three consecutive read accesses).
Note: The access restrictions in asynchronous mode are only meaningful if the system
clock is not switched off, of course.
Switching Clocking Modes
The clocking mode of the RTC (synchronous or asynchronous) is selected via bit
RTCCM in register SYSCON0. After reset, the RTC operates in Synchronous Mode
(RTCCM = 0) with the 8:1 prescaler enabled.
The selected clocking mode also affects the access to RTC registers. Bit ACCPOS in
register RTC_CON indicates if full register access is possible (ACCPOS = 1, default
after reset) or not (ACCPOS = 0). This also indicates the current clocking mode.
Attention: Software should poll bit ACCPOS to determine the proper transition to
the intended clocking mode.
After switching to Asynchronous Mode (RTCCM = 1), bit ACCPOS = 0 indicates proper
operation in Asynchronous Mode. In this case the system clock can be stopped or
reduced.
After switching to Synchronous Mode, (RTCCM = 0), bit ACCPOS = 1 indicates proper
operation in Synchronous Mode. In this case the RTC registers can again be accessed
properly (read and write).
Note: The RTC might lose a counting event (edge of fCNT) when switching from
synchronous mode to asynchronous mode while the 8:1 prescaler is disabled. For
these applications it is, therefore, recommended to set up the RTC with the 8:1
prescaler enabled.
User’s Manual
RTC_X41, V2.1
15-3
V2.1, 2004-03