13-6
DSP56853/854/855/857/858 User’s Manual
MOTOROLA
Preliminary
Counting Modes Definitions
13
The external inputs to each counter/timer can be shared among each of the four
counter/timers within the module. The external inputs can be used as:
Count commands
Timer commands
Trigger current counter value to be captured
Generate interrupt requests
The polarity of the external inputs can be selected. For this implementation of the Timer
(TMR), there are four input pins. The primary output of each timer/counter is the output
signal, OFLAG. The OFLAG output signal can be set, cleared, or toggled when the
counter reaches the programmed value. The OFLAG output signal may be output to an
external pin shared with an external input signal (TIOx).
The OFLAG output signal enables each counter to generate square waves (PWM) or pulse
stream outputs. The polarity of the OFLAG output signal is selectable.
Any counter/timer can be assigned as a Master (MSTR). A master’s compare signal can be
broadcasted to the other counter/timers within the module. The other counters can be
configured to reinitialize their counters and/or force their OFLAG output signals to
predetermined values when a Master’s Counter/Timer compare event occurs.
13.8 Counting Modes Definitions
The selected external count signals are sampled at the TMR’s base clock rate (60MHz)
and then run through a transition detector. The maximum count rate is one-half of the base
peripheral clock rate.
Internal clock sources can be used to clock the counters at the peripheral clock rate.
If a counter is programmed to count to a specific value and then stop, the Count mode in
the TMR_CTRL register is cleared when the count terminates.
13.8.1 Stop Mode
If the Count mode field is set to 000, the counter is inert. No counting will occur.
13.8.2 Count Mode
If the Count mode field is set to 001, the counter will count the rising edges of the selected
clock source. This mode is useful for generating periodic interrupts for timing purposes, or
counting external events such as widgets on a conveyor belt passing a sensor. If the