
Using the eTPU Angle Clock, Rev. 0
eTPU Software Design
Freescale Semiconductor
20
PossibleGapVerifying
StallTimer =
StallPeriod
at startpoint Time(activeEdge)
If
Tooth_Period*Gap_Rati
o < PeriodLast
PeriodLast =
Period
If Active Edge
Period
= Time(ActiveEdge) -
ToothTime
If timeout (StallTimer)
ToothTime
= Time(ActiveEdge)
ToothCount += 1
TickRate =
Period
/TicksPerTooth
BlankTimer =
Period
*
BlankingRatio
GapVerified
CrankStatus
=
HalfSync
If ActiveEdge
ToothCount
=
AngleSync
/TicksPerTooth
If timeout (StallTimer)
Period
= PeriodLast
TickRate =
Period
/TicksPerTooth
BlankTimer =
Period
*
BlankingRatio
EngineAngle
=
AngleSync
Counting
StallTimer =
StallPeriod
at startpoint Time(activeEdge)
If ToothCount
==
ToothBeforeGap
PeriodLast =
Period
If ActiveEdge
Period
= Time(ActiveEdge) -
ToothTime
If AdjustAngle() //return
ToothTime
= Time(ActiveEdge)
If timeout (StallTimer)
ToothCount += 1
If Receive(Signal)
12
if (ToothCount == LastRealTooth) then LAST =
true
TickRate =
Period
/TicksPerTooth
BlankTimer =
Period
*
BlankingRatio
Gapping
MISSCNT =
NumberMissing
If ActiveEdge
if ((FirstGap && !CamDetected)||(SecondGap &&
CamDetected) then CrankStatus =
Full_Sync
else CrankStatus =
Error
If AdjustAngle() //return
StallTimer = (
StallPeriod + NumberMissing*
Period)
at
startpoint Time(activeEdge)
If timeout (StallTimer)
BlankTimer =
Period
* (
NumberMissing
+
BlankingRatio)
Table 1. Angle Clock System State (continued)
S
Reference
Name
Action
Exit Condition
G