User Manual
EP7309/11/12 User’s Manual - DS508UM4 3-1
Copyright Cirrus Logic, Inc. 2003
33
3
Chapter 3
3Timers
Introduction
EP73xx has three general p urpose timers that can s erve as watchdogs for system
resources or and events. Tw o timers are based on the internal PLL or 13 MHz clock
and the third is f ed by the RTC. Routines requiring periodic service to chec k status
and new values can make use of these timers.
Features
All timers have the following characteristics
• Program mable for two modes: free running and p re-scale
• Interrupt flags and corresponding mask for control and status
• Timer 16-bit read/write data register to s et and read values. Can be
accessed at any time.
Timer Register List
Programming Example
;*****************************************************************************
; Enable TC1 Timer prescale = 2 kHz Program a 2 ms interrupt rate
;*****************************************************************************
;
TC1Prescale EQU 0x10 ; Set prescale in SYSCON1
TC1Timer EQU 0x14 ; Set 10 ms timer in TC1 timer
TC1Mask EQU 0x100 ; UnMask TC1 interrupt
ldr r12, =0x80000000 ; base address for Timers
ldr r1, =TC1Prescale
Table 3-1: Timer Registers
Address Name Type Size Description Page
0x8000.0300 TC1D R/W 16 TC1 Data Register page 3-3
0x8000.0340 TC2D R/W 16 TC2 Data Register page 3-3
0x8000.0380 RTCDR R/W 32 RTC Data Register page 3-3
0x8000.03C0 RTCMR R/W 32 RTC Match Register page 3-4