
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Real Time Clock
User’s Manual
15-12
V2.2, 2004-01
RTC_X8, V2.1
15.4
RTC Interrupt Generation
The overflow signals of each timer of the RTC timer chain can generate an interrupt
request. The RTC’s interrupt subnode control register ISNC combines these requests to
activate the common RTC interrupt request line RTC_IRQ.
Each timer overflow sets its associated request flag in register ISNC. Individual enable
bits for each request flag determine whether this request also activates the common
interrupt line. The enabled requests are ORed together on this line (see
The interrupt handler can determine the source of an interrupt request via the specific
request flags and must clear them after appropriate processing (not cleared by
hardware). The common node request bit is automatically cleared when the interrupt
handler is vectored to.
Note: If only one source is enabled, no additional software check is required, of course.
Both the individual request and the common interrupt node must be enabled.
Figure 15-5
Interrupt Block Diagram
MCB05415
>1
_
Interrupt Request
RTC_IRQ
&
&
&
&
&
Register RTC_ISNC
CNT3
IR
CNT3
IE
Set
SW Clear
CNT2
IR
CNT2
IE
Set
SW Clear
CNT1
IR
CNT1
IE
Set
SW Clear
CNT0
IR
CNT0
IE
Set
SW Clear
T14
IR
T14
IE
Set
SW Clear
CNT3 Overflow
CNT2 Overflow
CNT1 Overflow
CNT0 Overflow
T14 Overflow