AN2577
System design
Various cam shaft detection strategies may be used to effectively eliminate the cam
uncertainty at the time the crank shaft is synchronized. If such a strategy is available,
Half_Sync is not required.
When synchronization is verified, the angle at the last tooth edge is known. The software
should immediately write that angle to TCR2, write the TRR value derived from the last
period, and start the angle clock. The first series of ticks will be delayed by the latency of the
function to this point, but if necessary the angle clock will go into High Rate mode at the next
tooth edge to catch up.
3.4
3.4.1
Anomalies
There are two ways to minimize the effects of anomalies that can cause loss of
synchronization in the eTPU angle clock: prevent as many as possible, and provide a means
to detect and correct those that cannot be prevented. The prevention is typically done by the
eTPU hardware system, properly setup by the software. However, once an anomaly is
detected and processed by the system either as a superfluous or a missing tooth edge
signal, the angle clock design can only help detect the problem, and pass the information on
to the host for corrective action.
Error prevention
The eTPU angle clock provides means to reject tooth edges detected outside of certain
limits. This rejection is done by an input pin hardware filter and by gating the tooth signal
with a match registers in the channel.
The TCRCLK input pin filter for the angle clock can use the input pin filters of the other eTPU
channels, or it can be programmed separately. These filters are designed to reject very
short apparent pin transitions such as might be caused by high frequency induced noise. In
any case, this low pass filtering of the tooth signal will introduce a time delay in the signal
from the tooth. Since the filter time is generally in the order of a few system clock times, the
angle represented by this delay is very small even at high wheel speeds. See the Reference
Manual for details of the TCRCLK filter.
When Channel 0 is in one of the m2_ modes, the MatchA register can be used as a blocking
timer for input signals. In this mode, the eTPU software can provide a blanking time after the
detection of a tooth edge, during which time a (presumably spurious) additional edge will be
blocked. This feature is particularly useful when an imperfect tooth detection circuit presents
a chopped or hashed edge to the eTPU, which often happens at low speed. If the frequency
of the edge noise is lower than the pin filter rejection, a noise pulse could be detected and
counted as a tooth edge signal unless this blanking is used. The blanking match can be
programmed as an absolute time or calculated by the eTPU as a percentage of the previous
period. The choice depends on the expected characteristics of the edge noise.
If a noisy edge is possible, then a noisy return edge might also be detected as an active
transition. If blanking is used to prevent noise from being processed as a tooth edge, then
the blanking must be applied to both edges of the tooth signal.
If a tooth signal is completely lost to the eTPU channel by some means, the hardware alone
cannot distinguish the long period from any other deceleration. However, a second match
can be setup in Channel 0 to request service if a transition has not occurred within a
specified time.
19/34