Chapter 26 eTimer
MPC5602P Microcontroller Reference Manual, Rev. 4
736
Freescale Semiconductor
Figure 26-25. Triggered Count mode (length = 1)
26.7.2.8
ONE-SHOT mode
When the CNTMODE field is set to 110 and the counter is set to reinitialize at a compare event
(LENGTH = 1), and the OFLAG OUTMODE is set to 0101 (cleared on init, set on compare), the counter
works in ONE-SHOT mode. If an external events causes the counter to count, when terminal count is
reached, the output is asserted. This delayed output can be used to provide timing delays.
Figure 26-26. One-Shot mode (length = 1)
26.7.2.9
CASCADE-COUNT mode
When the CNTMODE field is set to 111, the counter’s input is connected to the output of another selected
counter. The counter will count up and down as compare events occur in the selected source counter. This
cascaded or “daisy-chained” mode enables multiple counters to be cascaded to yield longer counter
lengths. When operating in cascade mode, a special high speed signal path is used between modules rather
than the OFLAG output signal. If the selected source counter is counting up and it experiences a compare
event, the counter will be incremented. If the selected source counter is counting down and it experiences
a compare event, the counter will be decremented.
Either one or two counters may be cascaded to create a 32-bit wide synchronous counter.
Whenever any counter is read within a counter module, all of the counters’ values within the module are
captured in their respective HOLD registers. This action supports the reading of a cascaded counter chain.
First read any counter of a cascaded counter chain, then read the HOLD registers of the other counters in
the chain. The cascaded counter mode is synchronous.
12
13
14
15
16
COMP1 = 18
17
18
Primary
Secondary
CNTR
OFLAG
0
1
2
3
4
LOAD = 0, COMP1 = 4
0
1
2
3
Primary
Secondary
CNTR
OFLAG