
December 22, 2003
Document No. 38-12011 Rev. *E
215
CY8C24xxx Preliminary Data Sheet
Digital Blocks
17.3.1
Timer Timing
Enable/Disable Operation.
When the block is disabled,
the clock is immediately gated low. All outputs are gated low,
including the interrupt output. All internal state is reset to its
configuration specific reset state, except for DR0, DR1, and
DR2, which are unaffected.
Terminal Count/Compare Operation.
In the clock cycle
following the count of 00h, the Terminal Count (TC) output is
asserted. It is one-half cycle or a full cycle depending on the
TC Pulse Width Mode, as set in the block Control register. If
this block is standalone, or if it is the least significant block in
a chain, the Carry Out (CO) signal is also asserted. If the
period is set to 00h, and the TC Pulse Width Mode is one-
half cycle, the output is the inversion of the input clock. The
Compare (CMP) output will be asserted in the cycle follow-
ing the compare true, and will be negated one cycle after
compare false.
Multi-Block Terminal Count/Compare Operation.
When
Timers are chained, the CO signal of a given block becomes
the CI of the next most significant block in the chain. In a
chained Timer, the CO output indicates that block and all
lower blocks are at 00h count. The CO is setup to the next
positive edge of the clock to enable the next higher block to
count once for every terminal count of all lower blocks.
The TCO of a given block becomes the TCI of the next least
significant block in the chain. The TCO output indicates that
that block and all higher blocks are at 00h count. The TCI/
TCO chaining signals provide a way for the lower blocks to
know when the upper blocks are at terminal count. Reload
occurs when all blocks are at terminal count, which can be
determined by CI, TCI and the block zero detect. Example
timing for a three block Timer is shown in
Figure 17-6
.
The compare circuit compares registers DR0 <= DR2.
(When Mode[1] = 1, the comparison is DR0 < DR2).
Each block has an internal compare condition (DR0 com-
pared to DR2), a chaining signal to the next block called
CMPO, and the chaining signal from the previous block
called CMPI In any given block of a Timer, the CMPO is
used to generate the auxiliary output (primary output in the
Counter) with a 1 cycle clock delay.
CMPO is generated from a combination of the internal com-
pare condition and the CMPI input by the following rules:
1.
For any given block, if DR0 < DR2, the CMPO condition
is unconditionally asserted.
2.
For any given block, if DR0 == DR2, CMPO is asserted
only if the CMPI input to that block is asserted.
3.
If the block is a start block, the effective CMPI depends
on the compare type. If it is DR0 <= DR2, the effective
CMPI input is '1'. If it is DR0 < DR2, the effective input is
'0'.
Capture Operation.
In the timer implementation, a rising
edge of the Data input or a CPU read of DR0 triggers a syn-
chronous capture event. The result of this is to generate a
latch enable to DR2 that loads the current count from DR0
into DR2. The latch enable signal is synchronized in such a
way that it is not closing near an edge on which the count is
changing.
A limitation is that capture will not work with the block clock
of 48 MHz. (A fundamental limitation to Timer capture opera-
tion is the fact the GPIO inputs are currently synchronized to
the 24 MHz system clock).
Figure 17-6. Multi-Block Timing
CLK
2
1
0
FF
FE
Count LSB
Example of Multi-block Timer Counting
MSB Period = k, ISB Period = m, LSB Period = n
Carry Out LSB
Count ISB
1
Carry Out ISB
0
2
1
0
n
n-1
0
m
0
Count MSB
Zero Detect LSB
Zero Detect ISB
k
Zero Detect MSB
Carry Out MSB
Multi-Block TC
Reload occurs
when all blocks
reach terminal
count.