Toothed
wheel
55
56
57
0
Filter
1
Filter 1
Filter 2
X%
X%
X%
X%
X%
Y%
Angle Functions
841
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
20.3.2.2.5.1 Filter During Singularity Tooth
During the singularity tooth, the filter acts differently than during a normal tooth. The filter releases the
input for a normal tooth. When the tick counter is reloaded, a second filter value is applied to the toothed
wheel input. For an example of filtering during a singularity tooth, see
.
Figure 20-48. Filtering During Singularity Tooth
The second filter value is set using the same equation as the first filter with the step width multiplied by 3.
To calculate this number:
(3 × Step Width) × (1 – Y%) = Second Filter Register Value
(30)
If the step width value is equal to 512 and you want 70% of singularity tooth period to be filtered, calculate
the filter register value as follows:
3 × 512 × (1 – 0.70) = 460
20.3.2.2.6 HWAG Interrupts
When conditions are set, the HWAG interrupts are generated.
When the interrupt condition is true, the corresponding flag is set in the HWAG interrupt flag register
(HWAFLG). If the corresponding enable bit in the HWAG interrupt enable set register (HWAENASET) is
also set, an interrupt request is sent to the CPU through one of the interrupt lines, depending on the
priority of the interrupt (HWAG interrupt level set register (HWALVLSET)).
Because the HWAG can set interruptions, the CPU must determine which source created the interrupt
request and then execute the interrupt service routine. The CPU reads the offset register (HWAOFFx) that
gives the number of the source. If the CPU reads the offset register, it will automatically clear the source
flag that created the request.
NOTE:
If the corresponding enable bit is not set, a read in the offset register will not clear a flag. To
set the bit, write a 1 in the corresponding bit within the HWAG interrupt flag register
(HWAFLG).
The HWAG generates eight different interrupts:
•
0 = Overflow period
•
1 = Singularity not found
•
2 = Tooth interrupt
•
3 = ACNT overflow
•
4 = PCNT(n) > 2 × PCNT (n-1) during normal tooth
•
5 = Bad active edge tooth
•
6 = Gap flag
•
7 = Angle increment overflow