AN2897 Freescale Semiconductor / Motorola, AN2897 Datasheet - Page 24

no-image

AN2897

Manufacturer Part Number
AN2897
Description
Using the eTPU Angle Clock
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
eTPU Software Design
4.2.5
When the gap test is satisfied it may be necessary to confirm the fact by testing the period of the following
gap.
4.2.6
One possible means to verify a probable gap is to determine that the period following appears to be shorter
by a test similar to the one used to find the gap. The algorithm and parameters used for gap detection and
verification must satisfy the requirements for the target system. If the gap is not verified, the system must
return to the Testing for a Possible Gap state.
24
{
Last_State = Apparent_Gap;
}
else
{
Last_State = Testing_Possible_Gap;
/* if the test fails, we continue testing... */
}
break;
case Apparent_Gap:
ToothPeriodLast = ToothPeriod;
ToothPeriod= TempToothPeriod;
ToothTime = EdgeCaptureTime;
ToothCount = ToothCount + 1;
if (ToothPeriod >= ToothPeriodLast*GapRatio)//verify
{
updated
/* More */
}
else
Apparent Gap
Possible Gap Verifying
CrankStatus = Half_Sync;
ToothCount = 1;
Last_State = GapVerified;
SetChannelInterrupt();//Inform the host that the crank status is
Using the eTPU Angle Clock, Rev. 0
EXAMPLE
Freescale Semiconductor

Related parts for AN2897