AN2897 Freescale Semiconductor / Motorola, AN2897 Datasheet - Page 11

no-image

AN2897

Manufacturer Part Number
AN2897
Description
Using the eTPU Angle Clock
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Selecting an absolute reference for the 720 degree cycle must be done using an external reference such as
a cam shaft sensor.
The Angle Clock will automatically reset to zero if a physical tooth edge is detected with the LAST bit set
in the TPR. This means that the system software must keep track of the tooth count and write the LAST
bit at the appropriate time.
3.1.5
In an automotive engine control system, the toothed wheel on the crankshaft typically has one or more
missing teeth to provide an angular reference point. The Angle Clock hardware can provide compensation
for these missing teeth, adding a tooth count and repeating the tick count for each missing tooth to bridge
the gap in the teeth. The system software must keep track of the tooth count and, after the last edge before
the gap, write the number of expected missing teeth to the MISSCNT field in the TPR.
3.1.6
The eTPU can automatically record the time of a tooth transition on the Channel 0 input. If the software
has stored the previous edge time, then the period of the tooth signal can be calculated by subtracting the
times. To derive the value for the TRR, the software must divide the time for a tooth period by the number
of ticks per tooth. This calculation must be adjusted if the most recent period was measured over the gap.
Note that the tooth period is a measure of the rotational speed of the engine. Typically this value is kept in
a global memory location. In that case, it should be updated with the adjusted period when measured over
the gap.
3.2
Speed changes in the wheel can be easily handled by the eTPU Angle Clock hardware if it is properly
managed by the eTPU software. Since the tick counter is an extrapolation of the speed of the wheel, the
accuracy of the ticks is determined by the accuracy of the TRR value plus a possible error due to software
latency. The systems engineer needs to understand the maximum acceleration expected in the wheel and
design adequate compensation in the software.
3.2.1
Acceleration is manifested in the Angle Clock by a tooth edge arriving earlier than expected whenever the
period of the last tooth separation is less than the pervious period. When the previous tooth edge was
detected, the TRR was written with a value that assumed evenly spaced ticks between that tooth and the
next. Acceleration of the wheel means that the latest tooth is detected before the tick count is completed.
When this occurs, the Angle Clock switches automatically into High Rate mode. The balance of the ticks
are counted at a rate equal to the MCU system clock (not TCR1) divided by eight. Once the tick count is
complete, one additional count is added for the newly arrived tooth. The Angle Clock then reverts to the
Normal mode.
Freescale Semiconductor
Acceleration and Deceleration
Missing Teeth
Tick Rate
Acceleration
Using the eTPU Angle Clock, Rev. 0
System Design
11

Related parts for AN2897