
Digital Clocks
CY8C24xxx Preliminary Data Sheet
268
Document No. 38-12011 Rev. *E
December 22, 2003
24.2.6
OSC_CR3 Register
Bits 7 to 0: VC3 Divider[7:0].
As an example of the flexi-
bility of the clocking structure in PSoC devices, consider a
device that is running off of an externally supplied clock at a
frequency of 93.7 kHz. This clock value may be divided by
the VC1 divider to achieve a VC1 clock net frequency of
5.89 kHz. The VC2 divider could reduce the frequency by
another factor of 16, resulting in a VC2 clock net frequency
of 366.02 Hz. Finally, the VC3 divider may choose VC2 as
its input clock and divide by 256, resulting in a VC3 clock net
frequency of 1.43 Hz.
As mentioned previously the VC3 clock net can generate a
system interrupt. Once the input clock and the divider value
for the VC3 clock are chosen, only one additional step is
needed to enable the interrupt; the VC3 mask bit needs to
be set in register INT_MSK0[7]. Once the VC3 mask bit is
set, the VC3 clock generates pending interrupts every num-
ber of clock periods equal to the VC3 divider register value
plus one. Therefore, if the VC3 divider register’s value is 05h
(divide by 6), an interrupt would occur every six periods of
the VC3’s input clock. Another example would be if the
divider value was 00h (divide by 1), an interrupt would be
generated on every period of the VC3 clock. The VC3 mask
bit only controls the ability of a posted interrupt to become
pending. Because there is no enable for the VC3 interrupt,
VC3 interrupts will always be posting. See the Interrupt Con-
troller chapter for more information on posting and pending.
For additional information, reference the
OSC_CR3 register
on page 175
.
24.2.7
OSC_CR4 Register
Bits 7 to 2: Reserved.
Bits 1 and 0: VC3 Input Select [1:0].
The VC3 clock net is
the only clock net with the ability to generate an interrupt.
The VC3 is most similar to the VC2 in that its input clock
comes from a configurable source. As shown in
Figure 24-1
on page 263
, a 4-to-1 multiplexer determines the clock that
will be used as in the input to the VC3 divider. The multi-
plexer allows either the 48 MHz, 24 MHz, VC1, or VC2
clocks to be used as the input clock to the divider. Because
the selection of a clock for the VC3 divider is performed by a
simple 4-to-1 mux, runt pulses and glitches may be injected
to the VC3 divider when the OSC_CR4[1:0] bits are
changed. Care should be taken to ensure that blocks using
the VC3 clock are either disabled when OSC_CR4[1:0] is
changed or not sensitive to glitches. Unlike the VC1 and
VC2 clock dividers, the VC3 clock divider is 8-bits wide.
Therefore, there are 256 valid divider values as indicated by
Table 24-6
.
It is important to remember that even though the VC3 divider
has four choices for input clock, none of the choices have
fixed frequencies for all device configurations. Both the 24
MHz and 48 MHz clocks may have very different frequen-
cies, if an external clock is in use. Also, the divider values for
the VC1 and VC2 inputs to the multiplexer must be consid-
ered.
For additional information, reference the
OSC_CR4 register
on page 174
Table 24-6. OSC_CR3[7:0] Bits: VC3 Divider Value
Divider Source Clock
SYSCLK
SYSCLK
SYSCLK / 2
SYSCLK / 3
SYSCLK / 4
...
SYSCLK / 253
SYSCLK / 254
SYSCLK / 255
SYSCLK / 256
Bits
00h
01h
02h
03h
...
FCh
FDh
FEh
FFh
SYSCLKX2
SYSCLKX2
SYSCLKX2 / 2
SYSCLKX2 / 3
SYSCLKX2 / 4
...
SYSCLKX2 / 253
SYSCLKX2 / 254
SYSCLKX2 / 255
SYSCLKX2 / 256
VC1
VC2
VC1
VC1 / 2
VC1 / 3
VC1 / 4
...
VC1 / 253
VC1 / 254
VC1 / 255
VC1 / 256
VC2
VC2 / 2
VC2 / 3
VC2 / 4
...
VC2 / 253
VC2 / 254
VC2 / 255
VC2 / 256
Table 24-7. OSC_CR4[1:0] Bits: VC3
Bits
Multiplexer Output
00b
01b
10b
11b
SYSCLK
VC1
VC2
SYSCLKX2