NXP Semiconductors
PCF2127
Accurate RTC with integrated quartz crystal for industrial applications
When reading the timer, the actual countdown value is returned and not the initial value n.
Since it is not possible to freeze the countdown timer counter during read back, it is
recommended to read the register twice and check for consistent results.
8.11.5 Pre-defined timers: second and minute interrupt
PCF2127 has two pre-defined timers which are used to generate an interrupt either once
per second or once per minute (see Section 8.13.1). The pulse generator for the minute or
second interrupt operates from an internal 64 Hz clock. It is independent of the watchdog
or countdown timers. Each of these timers can be enabled by the bits SI (second interrupt)
and MI (minute interrupt) in register Control_1.
8.11.6 Clearing flags
The flags MSF, CDTF, AF and TSFx can be cleared by command. To prevent one flag
being overwritten while clearing another, a logic AND is performed during the write
access. A flag is cleared by writing logic 0 while a flag is not cleared by writing logic 1.
Writing logic 1 results in the flag value remaining unchanged.
Four examples are given for clearing the flags. Clearing the flags is made by a write
command:
• Bits labeled with - must be written with their previous values
• WDTF is read only and has to be written with logic 0
Repeatedly rewriting these bits has no influence on the functional behavior.
Table 61. Flag location in register Control_2
Register
Bit
7
6
5
4
3
2
1
0
Control_2
MSF WDTF TSF2 AF
CDTF -
-
-
Table 62. Example values in register Control_2
Register
Bit
7
6
5
4
3
2
1
0
Control_2
1
0
1
1
1
0
0
0
The following tables show what instruction must be sent to clear the appropriate flag.
Table 63. Example to clear only CDTF (bit 3)
Register
Bit
7
6
5
4
3
2
1
0
Control_2
1
0
1
1
0
-[1]
-[1]
-[1]
[1] The bits labeled as - have to be rewritten with the previous values.
Table 64. Example to clear only AF (bit 4)
Register
Bit
7
6
5
4
3
2
1
0
Control_2
1
0
1
0
1
0[1]
0[1]
0[1]
[1] The bits labeled as - have to be rewritten with the previous values.
PCF2127
Product data sheet
All information provided in this document is subject to legal disclaimers.
Rev. 8 — 19 December 2014
© NXP Semiconductors N.V. 2014. All rights reserved.
46 of 100