Loop Resolution clock
N2HET Program
Program Overflow
(HETEXC2
Address
0 1 2 3 7 8 A B
0
1 2 3 7 8 9 A
0 1 2
C
B
No Overflow.
Program returns to address 0
before start of next loop
Overflow.
Program did not return
to address 0 before start
of next loop.
.PRGMOVRFLFLAG)
N2HET Functional Description
961
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
Figure 23-4. Use of the Overflow Interrupt Flag (HETEXC2)
23.2.1.5 Architectural Restrictions on N2HET Programs
Certain architectural restrictions apply to N2HET programs:
1. The size of an N2HET program must be greater than one instruction.
2. An extra wait state is incurred by any instruction that modifies a field in the next instruction to be
executed.
3. Only one instruction (using high resolution) is allowed per high resolution pin.
4. Consecutive break points are not supported. Instructions with break points must have at least a
distance of two instructions (for example, at addresses 1, 3, 5, 7, and so on, assuming the program
executes linearly)
NOTE:
While it would be unusual to code an N2HET program that is only one instruction long, it is
trivial to modify such a program to meet the requirement of restriction 1. Simply add a
second instruction to the program, which may be a simple branch to zero.
To enforce restriction 3, the high resolution pin structures respond only to the first instruction
that is executed matching their pin number with hr_lr=HIGH, regardless of whether or not the
en_pin_action field is ON. Subsequent instructions are ignored by the high resolution pin
structure for the remainder of the loop resolution period.
23.2.1.6 Multi-Resolution Scheme
The N2HET has the capability to virtually extend the counter width by executing instructions only once
every N loop resolution periods. This decreases the timer resolution, but extends the counter range which
may be useful when generating or measuring slow signals.
illustrates how a multi-resolution
scheme may be implemented in an N2HET program. An unconditional Branch instruction and an index
sequence, using a MOV64 instruction in each low resolution loop, is required to control this particular
program flow.
NOTE:
HR instructions must be placed in the main (full resolution) loop to ensure proper operation.