User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 246
UG585 (v1.11) September 27, 2016
Chapter 8: Timers
Overflow mode: The counter increments or decrements continuously between 0 and 0xFFFF, with
the direction of counting determined by the DEC bit of the Counter Control register. An overflow
interrupt is generated when the counter passes through zero. The corresponding match interrupt is
generated when the counter value equals one of the Match registers.
Event Timer Operation
The event timer operates by having an internal (invisible to users) 16-bit counter clocked at CPU_1x
which:
Resets to 0 during the non-counting phase of the external pulse
Increments during the counting phase of the external pulse
The Event Control Timer register controls the behavior of the internal counter:
E_En bit: When 0, immediately resets the internal counter to 0, and stops incrementing
E_Lo bit: Specifies the counting phase of the external pulse
E_Ov bit: Specifies how to handle overflow at the internal counter (during the counting phase
of the external pulse)
°
When 0: Overflow causes E_En to be 0 (see E_En bit description)
°
When 1: Overflow causes the internal counter to wrap around and continues incrementing
°
An interrupt is always generated (subject to further enabling through another register)
when an overflow occurs.
The Event register is updated with the non-zero value of the internal counter at the end of the
counting-phase of the external pulse; therefore, it shows the widths of the external pulse, measured
in number of cycles of CPU_1x.
If the internal counter is reset to 0, due to overflow, during the counting phase of the external pulse,
the Event register will not be updated and maintains the old value from the last non-overflowing
counting operation.
8.5.4 Register Overview
A register overview of the TTC is provided in Table 8-4.
Table 8-4: Triple Timer Counter Register Overview
Function Name Overview
Clock control
Clock Control
register
Controls prescaler, selects clock input, edge
Counter Control
register
Enables counter, sets mode of operation, sets up/down
counting, enables matching, enables waveform output
Status
Counter Value
register
Returns current counter value