Toothed wheel
Angle Tick
K Ticks
P(n-1)
P(n)
P(n-1)
K
Angle Functions
831
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
20.3.2.2 HWAG Operation
20.3.2.2.1 Angle Tick Generation Algorithm
20.3.2.2.1.1 Angle Tick Generation Principle
The angle tick generator is the core kernel of this module. It uses the time-interpolation algorithm to
generate angle ticks based on the last toothed wheel period. The angle counter is incremented at each
new angle tick.
Because the toothed wheel is too inaccurate to fit with actual power-train applications, the algorithm is
based on dividing the previous tooth period by K angle steps. The tooth period is the period between two
active edges, which the HWAG global control register 2 (HWAGCR2) defines as the falling or the rising
edge of the input signal. For an example of the angle tick generation principle, see
The speed of the toothed wheel varies. This variance in speed creates some discontinuities in the angle
counter behavior.
When the toothed wheel accelerates, the current period becomes shorter than the previous one and the
tooth edge arrives before the last tick has been generated. To compensate for any missed ticks, the
HWAG adds them to the angle counter when the active edge of the tooth arrives. The angle value is
updated and resynchronized at each new active tooth edge.
When the toothed wheel decelerates, the period becomes longer than the previous period and K ticks are
already counted before the active edge tooth arrives. After the last tick has been generated, the HWAG
generates a tick only after the active tooth edge arrives.
Figure 20-37. Angle Tick Generation Principle