Rev. 5.00, 09/03, page xxiv of xliv
12.3 TMU Operation................................................................................................................. 400
12.3.1 General Operation ................................................................................................ 400
12.3.2 Input Capture Function......................................................................................... 403
12.4 Interrupts ........................................................................................................................... 404
12.4.1 Status Flag Setting Timing................................................................................... 404
12.4.2 Status Flag Clearing Timing................................................................................. 405
12.4.3 Interrupt Sources and Priorities............................................................................ 405
12.5 Usage Notes....................................................................................................................... 406
12.5.1 Writing to Registers.............................................................................................. 406
12.5.2 Reading Registers................................................................................................. 406
Section 13 Realtime Clock (RTC)
.................................................................................. 407
13.1 Overview........................................................................................................................... 407
13.1.1 Features ................................................................................................................ 407
13.1.2 Block Diagram ..................................................................................................... 408
13.1.3 Pin Configuration ................................................................................................. 409
13.1.4 RTC Register Configuration................................................................................. 410
13.2 RTC Registers ................................................................................................................... 411
13.2.1 64-Hz Counter (R64CNT).................................................................................... 411
13.2.2 Second Counter (RSECCNT)............................................................................... 411
13.2.3 Minute Counter (RMINCNT) .............................................................................. 412
13.2.4 Hour Counter (RHRCNT).................................................................................... 412
13.2.5 Day of Week Counter (RWKCNT)...................................................................... 413
13.2.6 Date Counter (RDAYCNT).................................................................................. 414
13.2.7 Month Counter (RMONCNT).............................................................................. 414
13.2.8 Year Counter (RYRCNT) .................................................................................... 415
13.2.9 Second Alarm Register (RSECAR)...................................................................... 415
13.2.10 Minute Alarm Register (RMINAR) ..................................................................... 416
13.2.11 Hour Alarm Register (RHRAR)........................................................................... 416
13.2.12 Day of Week Alarm Register (RWKAR)............................................................. 417
13.2.13 Date Alarm Register (RDAYAR) ........................................................................ 418
13.2.14 Month Alarm Register (RMONAR)..................................................................... 418
13.2.15 RTC Control Register 1 (RCR1).......................................................................... 419
13.2.16 RTC Control Register 2 (RCR2) .......................................................................... 420
13.3 RTC Operation .................................................................................................................. 422
13.3.1 Initial Settings of Registers after Power-On......................................................... 422
13.3.2 Setting the Time ................................................................................................... 422
13.3.3 Reading the Time ................................................................................................. 423
13.3.4 Alarm Function .................................................................................................... 424
13.3.5 Crystal Oscillator Circuit...................................................................................... 425
13.4 Usage Notes....................................................................................................................... 426
13.4.1 Register Writing during RTC Count .................................................................... 426
13.4.2 Use of Realtime Clock (RTC) Periodic Interrupts ............................................... 426