Angle Functions
843
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
Table 20-14. HWAG Interrupt Descriptions
Interrupt Names
Interrupt Descriptions
Overflow period
Occurs when the PCNT (n) counter reaches the maximum value. Can occur if the toothed
wheel input remains stable. May indicate failure of an engine stall or a toothed wheel sensor.
Singularity not found
When the TCNT counter sets the gap flag, the HWAG waits for the criteria flag to raise
before the toothed wheel active edge. If the toothed wheel active edge occurs before the
criteria flag, the HWAG raises the singularity not found interrupt flag.
New edge tooth
This interrupt can sync or let you control the tick generation. This interrupt indicates the new
active edge tooth. This interrupt could be filtered or unfiltered (Bit FIL in control register).
Angle counter (ACNT) overflow
This interrupt occurs when the singularity is unable to be found. The angle counter (ACNT)
continues until overflow.
Singularity found during normal tooth
This interrupt indicates that the period of the current tooth is at least two times longer than
the previous one when the HWAG expects a normal tooth. This interrupt can detect the
singularity without bit manipulation by the CPU.
Bad active edge tooth
This interrupt indicates that an active edge has occurred before the end of the filtering
(toothed wheel input blocked) but the HWAG remains inactive internally. This interrupt can
detect glitches on the toothed wheel input.
Gap flag
When TCNT reaches the teeth register and the HWAG raises the gap flag , This interrupt is
set when the gap flag is raised by the HWAG,
Angle increment overflow
This interrupt indicates that the number of the angle increment is more than 15 since the last
resolution tick. This interrupt can prevent any discrepancies between the NHET and the
HWAG.
NOTE:
Before enabling any interruption, clear the HWAG interrupt flag register (HWAFLG) to ensure
that any interrupts have finished. If interrupts are pending, the HWAG could generate an
interrupt based on an unrealistic event.
20.3.2.3 Emulation
Because the HWAG is designed to synchronize with a real-time environment, the HWAG counters
continue during emulation.
When the CPU is frozen, the HWAG continues to run and update registers. Only the offset registers
remain uncleared when entering debug mode.
During debug mode, interrupts can occur and will wait until the CPU enters run mode again. If interrupts
occur, they could affect synchronization with the toothed wheel