Toothed
wheel
ACNT
counter
#0
#0
#0
#1
TCNT
#2
Start bit
Angle
Tick
2 x Step Width
RUN time
Synchronization time
Angle Functions
1002
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
23.3.2.2.2 Angle Zero Initialization
Before any angle operation, initialize the HWAG and then initialize the angle zero as the singularity tooth.
To initialize the angle zero as the singularity tooth, the HWAG can send an interrupt at each new tooth to
help the software detect the first tooth if the interrupt is set. This allows you to decide which algorithm to
apply to detect the zero degree tooth (by enabling the corresponding interrupt, you can also use the wired
criteria).
When researching which algorithm to apply, the counters ACNT and TCNT are frozen and must be
initialized to their start values. The ACNT value is equal to T times the step value (T is the tooth where the
start will take effect and the initial value of the tooth counter). The counters PCNT(n) and PCNT(n-1)
contain the current period and the previous period respectively. These counters allow you to set a
detection criteria. When the application software sets the start bit, the software unfreezes the ACNT and
TCNT counters. The counters count from the preloaded values at the next tooth active edge. The ACNT is
preloaded with the value of 2 teeth and started synchronously with the next active edge of the toothed
wheel. For an example of the HWAG start sequence, see
.
Figure 23-43. Example of HWAG Start Sequence