
Understanding the eTPU Channel Hardware, Rev. 0
Architecture of the eTPU Channel
Freescale Semiconductor
6
NOTE
One instruction,
ClearTransLatch()
, clears both TDLs. Because transitions
are ordered
and TDLs cannot be individually cleared, there is no situation
where
TransitionALatch
is cleared and
TransitionBLatch
is set.
2.2.5
Match Recognition Latch Enables
Associated with each MRL is a match recognition latch enable (MRLE). This latch is set only by a
software write to the corresponding match register. It is cleared by any set of conditions that sets the MRL,
possibly ORed with another channel signal, depending on the channel mode.
The MRLE is always a condition for setting the MRL. Therefore, since the MRL always clears the MRLE,
all matches are self-blocking, and can occur only once before being attended to by the software.
Example 2.
erta = MyMatchValue;
//ert only is used to write Match Registers
EnableMatchA();
// Writes erta to MatchRegisterA and sets MRLEA
ClearMatchALatch();
// Clears a previously set MRL
NOTE
If
EnableMatchA()
and
ClearMatchALatch()
are written in consecutive
order, the compiler will pack both operations into a single instruction, and
the channel will not miss a match on the new condition.
2.2.6
Action Unit Setup
The eTPU software can write to the action unit timebase select registers (TBSA/TBSB) to determine the
TCR interfaced to each match and capture register, and to select whether the matches are done on a greater
or equal or an equals only basis.
Table 1. Action Unit Time Base Select
TBSA/TBSA
Macro
Action
Mtcr1_Ctcr1_ge
TimeBaseAMatchTcr1CaptureTcr1GreaterEqual()
TimeBaseBMatchTcr1CaptureTcr1GreaterEqual()
Capture TCR1 and
greater_or_equal compare
to TCR1 for this action unit
Mtcr2_Ctcr1_ge
TimeBaseAMatchTcr2CaptureTcr1GreaterEqual()
TimeBaseBMatchTcr2CaptureTcr1GreaterEqual()
Capture TCR1 and
greater_or_equal compare
to TCR2 for this action unit
Mtcr1_Ctcr2_ge
TimeBaseAMatchTcr1CaptureTcr2GreaterEqual()
TimeBaseBMatchTcr1CaptureTcr2GreaterEqual()
Capture TCR2 and
greater_or_equal compare
to TCR1 for this action unit