GR712RC-UM, Jun 2017, Version 2.9 87 www.cobham.com/gaisler
GR712RC
11 General Purpose Timer Unit
11.1 Overview
The General Purpose Timer Unit provides a common 16-bit prescaler and four 32-bit decrementing
timers. Each timer can generate an unique interrupt on underflow.
11.2 Operation
The prescaler is decremented on each system clock cycle. When the prescaler underflows, it is
reloaded from the prescaler reload register and a timer tick is generated. The four timers are decre-
mented on each tick. To minimize complexity, timers share the same decrementer. This means that the
minimum allowed prescaler division factor is 5.
The operation of each timer is controlled through its control register. A timer is enabled by setting the
enable bit in the control register. The timer value is then decremented on each prescaler tick. When a
timer underflows, it will automatically be reloaded with the value of the corresponding timer reload
register if the restart bit in the control register is set, otherwise it will stop at -1 and clear the enable
bit. Each timer can generate a unique interrupt when it underflows, if the interrupt enable bit is set.
By setting the chain bit in the control register, timer n can be chained with preceding timer n-1, creat-
ing a 64-bit (or larger) timer. Timer n will then be decremented once each time timer n-1 underflows.
Each timer can be reloaded with the value in its reload register at any time by writing a āoneā to the
load bit in the control register.
Timer 4 also operates as a watchdog. After reset, the timer is enabled and pre-set to value 0xFFFF.
When timer 4 underflows, the external WDOGN signals is asserted. This can be used to trigger a reset
or other system level action. Watchdog output is equivalent to the interrupt pending bit of the last
timer. The interrupt pending bit is only set when the interrupt is enabled for that timer.
Note: The WDOGN signal cannot be used if the system is clocked using the 2x DLL, but only when
the system is clocked directly from INCLK.
timer 4 value
timer 3reload
Figure 54. General Purpose Timer Unit block diagram
prescaler reload
-1
prescaler value
timer 1 value
timer 2 value
timer 3 value
timer 1 reload
timer 2 reload
-1
tick
irq 8
irq 9
irq 10
timer 4 reload
irq 11