AN2897 Freescale Semiconductor / Motorola, AN2897 Datasheet - Page 14

no-image

AN2897

Manufacturer Part Number
AN2897
Description
Using the eTPU Angle Clock
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
System Design
There are several ways to avoid spurious matches and pin action during startup:
The main advantage of letting the Angle Clock run during startup and synchronization is to reduce the
number of special cases handled in the software.
3.3.2
The first detected tooth edge indicates that the wheel is moving. The only information that can be gathered
is the TCR1 time of the edge.
The second tooth provides a new edge time and the first tooth period. Note that in most systems the period
value alone cannot distinguish between a normal tooth separation or the multiple tooth width of the gap.
However, with the first period recorded, the system can now start to search for the first gap.
Once the third tooth edge is detected, a second tooth period is known and the search for the gap can begin.
There are various ways to identify the gap using the time between consecutive pairs of teeth. The larger
the gap, that is the more teeth are missing, the easier it is to discriminate between normal teeth and the
tooth gap. However, variations in period size can also indicate acceleration or deceleration of the wheel.
If the size of tooth period is approximately twice the previous period, this might indicate a gap, or a severe
deceleration of the wheel.
A common way to ensure that a gap has been detected is to confirm the measurement on the following
tooth edge. Whatever test is used to identify a long period can be applied in reverse to the following period
to test for an ABA pattern of periods. The presumption here is that the wheel would not make a sudden
sharp deceleration, followed one tooth later by a sudden sharp acceleration. Whether this or any other test
is valid for a given system must be determined by the systems engineer. The ABA test is considered valid
for automotive applications because of the significant inertia of the crankshaft.
14
The eTPU may be kept out of Angle Mode until the channel hardware has searched and found the
reference point. TCR2 can be disabled by writing 0b111 to the TCR2CTL field of the
ETPUTBCR.
The Angle Clock can be allowed to run during startup, but other drivers dependent on the Angle
Clock must be kept disabled until synchronization. While this strategy is used in the Reference
Design, it is not the preferred strategy.
TCR2 can be maintained at a large negative and/or out of range value during acquisition and
synchronization.
Four consecutive tooth edge times are found to be:
Capture[1] = 0x1B238A
Capture[2] = 0x1CBA70
Capture[3] = 0x1FAB33
Capture[4] = 0x211145
Acquisition and Synchronization
Do not set TCR2CTL to 0b111 unless the Angle Mode is disabled by setting
AM to 0.
Using the eTPU Angle Clock, Rev. 0
EXAMPLE
NOTE
Freescale Semiconductor

Related parts for AN2897