
Understanding the eTPU Channel Hardware, Rev. 0
Architecture of the eTPU Channel
Freescale Semiconductor
8
The last three states are useful if the input and output pins are separately connected at the MCU interface.
In each of these cases, the output pin transition is directly driven by detection of the programmed input pin
transition. This happens in eTPU channel hardware and does not require software intervention.
Note that since the two action units of a given channel can be programmed differently, it is possible for
opposite pin actions to be commanded simultaneously. The resulting action is dependent on the channel
mode, described in
Section 3, “Channel Modes
.”
In some input functions depending on the channel mode (see
Section 3, “Channel Modes
”), the match
registers are used to gate or condition the input signal. If the input pin and output pin are tied together, the
OPAC for those matches may be set to match_no_change (the default) so that the matches will have no
affect on pin state.
The software may also command the output pin directly. When one of the instructions in
Table 3
is
executed, the output pin of the channel selected by the CHAN register is immediately affected.
Table 2. OPACA and OPACB Pin Control
OPACA/OPACB
Macro
Action
match_no_change
OnMatchAPinNoChange()
OnMatchBPinNoChange()
No pin change on match
match_high
OnMatchAPinHigh()
OnMatchBPinHigh()
Pin switches high on match
match_low
OnMatchAPinLow()
OnMatchBPinLow()
Pin switches low on match
match_toggle
OnMatchAPinToggle()
OnMatchBPinToggle()
Pin changes state on match
transition_low
OnInputActionAPinLow()
OnInputActionBPinLow()
Output pin goes low on input
transition
transition_high
OnInputActionAPinHigh()
OnInputActionBPinHigh()
Output pin goes high on
input transition
transition_toggle
OnInputActionAPinToggle()
OnInputActionBPinToggle()
Output pin toggles on input
transition
Table 3. Immediate Pin State Control
instruction
Macro
Action
PIN = force_pin_high
SetPinHigh()
Pin switches high immediately
PIN = force_pin_low
SetPinLow()
Pin switches low immediately
PIN=set_pin_per_opacA
SetPinPerPacA()
Pin switches according to OPACA
PIN=set_pin_per_opacB
SetPinPerPacB()
Pin switches according to OPACB