Datasheet

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 2CB
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)
www.ti.com
N2HET Functional Description
As Figure 23-4 illustrates, when a program overflow occurs, the currently executing N2HET program
sequence is interrupted and restarted at N2HETaddress 0 for the beginning of the next loop resolution
clock period. Also, HETEXC2.PRGMOVRFLFLAG is set.
If the instruction that caused the overflow (instruction at address 0xC in Figure 23-4) has any pin actions
selected, these pin actions will not be performed. However other actions of the instruction including
register and RAM updates will still be performed.
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. Figure 23-5 illustrates how a multi-resoluton
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.
937
SPNU562May 2014 High-End Timer (N2HET) Module
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated