AN2897 Freescale Semiconductor / Motorola, AN2897 Datasheet - Page 7

no-image

AN2897

Manufacturer Part Number
AN2897
Description
Using the eTPU Angle Clock
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
If the Angle Clock completes the count of the missing teeth plus all of the inserted ticks, and a new tooth
is not detected, the Angle Clock goes into Halt mode as described above.
2.4
For continuous synchronization of the Angle Clock with the position of the wheel, the Angle Clock has a
feature to zero the TCR2 count on detection of a software designated edge. To use the automatic
synchronization feature of the Angle Clock, the zero count must coincide with a physical tooth edge.
After the last tooth before the zero count synchronization, the software sets the LAST bit in the TPR to
indicate that the current tooth is the last one in the count cycle. Then, when the next tooth is detected, the
TCR2 count will automatically reset to 0 if the Angle Clock is in the Normal or Halt mode. If the Angle
Clock is in the High Rate mode when a tooth is detected with the LAST bit set, the Angle Clock will
continue the count of the ticks until it is complete before resetting the TCR2. When TCR2 is reset by a
tooth edge with LAST set, the action also clears the LAST bit.
When the application uses the zero count synchronization feature to reset the TCR2 counter on a
designated tooth each revolution, the TCR2 counter will continuously maintain a value proportional to the
angle of the wheel over a 360 degree range. At steady state, if the software is properly implemented, the
ticks between the teeth will be accurate within about one TCR1 count. Under deceleration, the tick
positions may be in error, but the tooth angles will be accurate, while under acceleration, the tooth
positions may be delayed while the tick count catches up at a high count rate.
If the software sets the LAST bit on alternate revolutions of the wheel, the TCR2 counter will count over
an angle range of 720 degrees before resetting to zero. This is an important feature for 4-cycle automotive
applications, where the control cycle is 720 degrees.
2.5
The eTPU Angle Clock hardware provides no automatic means to detect errors in the tooth count while
tracking the wheel angle. If missing teeth are programmed between two normally spaced teeth, the
hardware will absolutely insert the required counts, likely going into High Rate mode for a significant
portion of the count. If no missing teeth are inserted in a gap, the counter will count no higher than TICKS
counts and then go into Halt mode for the rest of the gap. If LAST is asserted on the wrong tooth, the TCR2
counter will reset, regardless of the TCR2 count, when the next tooth is detected. If the Angle Clock is
untracked by missed detection of a tooth or spurious additional tooth, it is incumbent on the software,
either in the host or the eTPU, to detect the error and initiate corrective action.
The Angle Clock hardware does provide means to make a correction in the TCR2 count when an error is
verified by the software. If the application determines that the Angle Clock has missed a tooth count and
is running with a one tooth deficit in the count, the eTPU software can insert an additional tooth by
asserting the IPH bit in the TPR. When this signal is asserted, the hardware reacts exactly as if a physical
tooth was detected. If the tick counter is counting in Normal mode, it switches to High Rate mode,
completes the current tick count, then counts the inserted tooth and continues in Normal mode. If the Angle
Clock is in Halt mode, it counts the inserted tooth and starts a tick count in Normal mode. Note that if the
IPH is asserted in High Rate mode, it is ignored.
Freescale Semiconductor
Zero Count Synchronization
Error Recovery
Using the eTPU Angle Clock, Rev. 0
eTPU Angle Clock Hardware
7

Related parts for AN2897