AN2897 Freescale Semiconductor / Motorola, AN2897 Datasheet - Page 13

no-image

AN2897

Manufacturer Part Number
AN2897
Description
Using the eTPU Angle Clock
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
As can be seen from the example, the Angle Clock can track a typical automotive toothed wheel quite well
under normal operating conditions. Also, the faster the speed, the less the effect of a given acceleration
rate.
3.2.2
When the Angle Clock completes the tick count and the next tooth does not arrive, it goes into Halt mode.
Then when the next tooth does arrive it is counted and the tick count starts again with the previous low
TRR value. When a new TRR value is calculated, the tick rate is decreased. The angle tracking under
deceleration is similar to acceleration tracking.
See also discussion of excessive acceleration and deceleration in
3.3
Starting the Angle Clock requires three essential steps. First, the initial values must be written to the
function parameters and control registers. Second, the tooth signal is acquired, the periods are tracked, and
the tooth pattern is tested for a reference point, usually the first gap. Third, when the angle is determined,
the actual angle is written to the TCR2, synchronizing it to the wheel and the rest of the angle based control
system can be started.
3.3.1
The Angle Clock hardware must be setup in the eTPU by writing certain control registers by the host. This
includes writing the AM bit in the ETPUTBCR and configuring the TCRCLK input for the selected eTPU.
If the Angle Clock is to be used as a server for another eTPU or for the eMIOS, the Shared Timing and
Control (STAC) bus must be set up. The essential software steps will be detailed below.
The Channel 0 parameters must be written to initial values by the host at startup. Most important are the
Angle Clock hardware register values (which are subsequently written by the eTPU software to the
registers) and the initial position of the Angle Clock.
While the software is searching for the reference point, the Angle Clock may be held to a particular value,
or it may be counting from some arbitrary point. The system designer should take care that other drivers
in his system do not trigger on arbitrary value of TCR2 before the Angle Clock in synchronized.
Freescale Semiconductor
In the example above, what is the error when the wheel decelerated from 731.6 RPM to 720 RPM
in one tooth time?
Second count theoretical minus second count actual:
99 * 23.15 µsec - 99 * 22.78 µsec = 36.6 µsec => 36.6 / 22.78 = 1.6 ticks
The 99
Startup System Design
Deceleration
Initial Parameter Values
th
tick arrives 36.6 µsec or 1.6 ticks early. This is the largest angle error (0.16 degrees).
Using the eTPU Angle Clock, Rev. 0
EXAMPLE
Section 3.4,
“Anomalies.”
System Design
13

Related parts for AN2897