Angle Tick
+
ACNT Inc.
11 bits
HET Res.
Angle
4 bits
counter
Angle Increment
increment [3:0]
register
Angle Functions
1013
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
23.3.2.4.3 NHET Interface
23.3.2.4.3.1 Input Signal Selection
The input pin of the toothed-wheel signal is software selectable. In previous generations of NHET/HWAG,
this was fixed to HET[2]. On this device, the input pin is programmable to provide more flexibility for the
system implementation. However, the implementation is done in a way to be backward compatible.
A separate register, HWAG pin select register (HWAPINSEL), is implemented to allow this selection
functionality. The HWAPINSEL register should be programmed before the HWAG is turned on. The
default selection will be HET[2] (PINSEL = 2h) after reset. The signals will be derived from the input buffer
of each pin. This will allow configuring the pin as an output and measure back the output signal with the
HWAG.
You can change the HWAPINSEL register at any time, but the proper functionality of the HWAG is not
assured if the selection is changed while the HWAG is already operational. It is recommended that the
input selection is done before the STRT bit in the HWAG global control register 2 (HWAGCR2)) is
programmed to 1.
23.3.2.4.3.2 HWAG to NHET Interface
The NHET interface is a 11-bit counter sampled by the NHET and reset by the NHET resolution. The
counter contains the value of ACNT incremented during the last resolution (see
). For
the NHET interface block diagram, see
.
Figure 23-55. NHET Interface Block Diagram
When the ACNT register is reset to zero, the angle increment register is not reset. The NHET software
checks if its own angle register is higher than 360° and either clears it or continues to 720°. If ACNT is
reset within the HWAG, the angle increment register gives the NHET the number of angle ticks from the
last resolution.
During a strong acceleration after a tooth active edge, the number of angle ticks can exceed 15. If the
number of ticks exceeds 15, the HWAG delivers to the NHET several angle increments at 15. This allow
the NHET to follow without missing any angle positions from the HWAG. When the counter is below 15,
the angle increment reflects the counter. When the angle increment overflows, sets to 15, and if the
enable bit (bit 7 in the control register) is set, the HWAG can send an interrupt to the CPU.
During a strong deceleration, the angle increment can stay null for one or more NHET resolution clocks.
To minimize the error between the fly-wheel and NHET angle counter, the step width and the NHET
resolution must be set to avoid any overflow of the 11-bit counter of the NHET interface. This can happen
if the number of angle ticks always exceeds 15 during one resolution.