Specifications

Real-Time Clock (RTC)
11-2 Copyright © 2004, 2006 ARM Limited. All rights reserved. ARM DDI 0287B
11.1 About the Real Time Clock
The PrimeCell Real Time Clock (RTC) PL031 is an Advanced Microcontroller Bus
Architecture (AMBA) compliant System-on-a-Chip (SoC) peripheral that is developed,
tested, and licensed by ARM. The RTC connects to the core APB.
The RTC comprises:
an AMBA APB interface
a 32-bit counter
a 32-bit match register
a 32-bit comparator.
The CPU reads and writes data, and control and status information through the AMBA
APB interface.
The 32-bit counter is incremented on successive rising edges of the input clock
CLK1HZ. Counting in one second intervals is achieved by using an internal 1Hz clock
signal for CLK1HZ. The counter is free-running. On reset, the counter:
counts up from one
reaches the maximum value,
0xFFFFFFFF
wraps around to zero and continues incrementing.
RTC is loaded or updated by writing to the load register, RTCLR.
Reading the data register, RTCDR, gives the current value of the RTC.
The match register is programmed by writing to RTCMR. The counter and match values
are compared in a comparator. When both values are equal, the interrupt RTCINTR is
asserted HIGH. The CPU can use the interrupt to implement a basic time alarm
function. The interrupt is cleared by writing any data value to the interrupt clear register
RTCICR. The value in the match register can be read at any time.