Instruction Set
902
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
A period increase is flagged in the deceleration flag (DCF). A period decrease
is flagged in the acceleration flag (ACF). If no variation is detected, ACNT
increments the counter value each time SCNT reaches its target.
If acceleration is detected, ACNT increments the counter value on each timer
resolution. If deceleration is detected ACNT does not increment and is thus
saturated.
ACNT also specifies the gap end angle value defining the end value of a gap
range in ACNT where period measurements in APCNT are temporarily
stopped to mask singularities in the external signal. ACNT uses register A
containing gap start and register B to store the counter value.
Edge
Specifies the edge for the input capture pin (HET[2]).
Action
P8
Edge Select
Rising
1
Detects a rising edge of HET[2]
Falling
0
Detects a falling edge of HET[2]
irq
ON generates an interrupt when the edge state is satisfied and the
gap flag is set. OFF prevents an interrupt from being generated.
Default: OFF.
gapend
Defines the 25-bit end value of a gap range. The start value is
defined in the SCNT instruction.
GAPEND
= (Step Value * (# of teeth on the toothed wheel + # of
missing teeth)) - 1
data
Specifies the 25-bit initial count value for the data field.
Default: 0.
NOTE:
Target Edge Field
The target edge field represents the three LSBs of data field register in case of step width =
8, four LSBs for step width = 16, five LSBs for step width = 32 and six LSBs for step width =
64.
Execution
Increment Condition
: ((Z = 1 AND DCF = 0) OR ACF = 1)
Pin Edge Condition
: Specified edge detected on HET[2]
Target Edge Condition
: (Target Edge field in data field = 0) AND (Angle
Increment condition is true) AND (GPF = 0)
If (Angle Increment Condition) is false
{
NAF = 0;
Register B = Data field register;
}
else
{
NAF = 1;
If (Counter value != GapEnd)
{
Register B = Data field re 1;
Data Field Register = Counter value + 1;
}