
Using the eTPU Angle Clock, Rev. 0
eTPU Software Design
Freescale Semiconductor
26
The Angle Clock tick counter begins timing out when the tooth edge occurs. The calculation of a new value
for the Tick Rate Register will take some time to complete. While this is being done the old value is used
for the tick rate. At steady state this makes no difference, but when the wheel is accelerating, the first tick
is necessarily late. If the acceleration continues, all of the tick counts will be late and the Angle Clock will
have to go into High Rate mode to catch up.
It is possible to compensate for the accelerating wheel by adjusting the tick rate so that the next tooth is
counted a bit faster than a simple extrapolation. This adjustment can be added to the software design at the
engineer’s discretion.
This state is repeated for each new tooth detection until one of the following occurs:
1. The tooth count indicates that the gap is following next.
2. The tooth count indicates that the next tooth is the zero angle reference point.
3. The host requests service, for example to correct an error.
4. The following tooth is not detected within a specified time (stall).
4.2.9
Gapping
When the tooth count indicates that a new gap is expected, the system must verify that measured gap times
pass the designated test. If the gap is correctly placed, no host action is required. If the gap period is outside
the range of acceptability, the information should be passed up to the host by setting the status to
Error
.
The application can then analyze the error and execute a correction procedure.
NOTE
Once synchronized, the Angle Clock system can proceed indefinitely
without further host action, unless a signal anomaly occurs.
4.2.10 New Revolution
When the count of the teeth indicates that the last tooth in the cycle has been detected, and if the system
required a periodic angle count, the software must set the LAST bit so that the counter will reset at the next
detected tooth edge. Note that the counter reset will not occur on a tooth count inserted by MISSCNT
during the gap, although asserting the IPH when LAST is set will reset the TCR2.
In a 720 degree system, this point occurs every second revolution of the wheel. The phasing of the count
may be done automatically (for example, by using a cam detected signal to enable the reset logic) or
manually by having the host force
Full_Sync
based on the cam information.
4.2.11 Adjust Angle
Provision may be made in the Angle Clock software for the host to alter the angle indicated by the TCR2
counter. This action could be taken as a result of an independent determination that the counter fell out of
sync, perhaps as a result of detecting a spurious tooth. The system can use IPH or HOLD to advance or
retard the angle count by one tooth. Remember to correct the tooth count as well so that the next reset
occurs at the correct tooth position. When the Adjust Angle service request is processed, the function