Instruction Set
1086
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
23.6.3.8 CNT (Count)
Syntax
CNT {
[brk={OFF | ON}]
[next={label | 9-bit unsigned integer}]
[reqnum={3-bit unsigned integer}]
[request={NOREQ | GENREQ | QUIET}]
[angle_count={OFF | ON}]
[reg={A | B | T | NONE}]
[comp ={EQ | GE}]
[irq={OFF | ON}]
[control={OFF | ON}]
max={25-bit unsigned integer}
[data={25-bit unsigned integer]
}
Figure 23-134. CNT Program Field (P31:P0)
31
26 25
23
22
21
13 12
9
8
7
6
5
4
1
0
0
Request
Number
BRK
Next program address
0110
Angle
count
Register
Comp.
select
Res.
Int. ena
6
3
1
9
4
1
2
1
4
1
Figure 23-135. CNT Control Field (C31:C0)
31
29 28
27
26
25
24
0
Res.
Request
type
Control
Res.
Max Count
3
2
1
1
25
Figure 23-136. CNT Data Field (D31:D0)
31
7
6
0
Data
Reserved
25
7
Cycles
One or two
One cycle (time mode), two cycles (angle mode)
Register modified
Selected register (A, B or T)
Description
This instruction defines a virtual timer. The counter value stored in the data
field [D31:7] is incremented unconditionally on each execution of the
instruction when in time mode (angle count bit [P8] = 0). When the count
reaches the maximum count specified in the control field, the counter is reset.
It takes one cycle in this mode.
In angle mode (angle count bit [P8] = 1), CNT needs data from the software
angle generator (SWAG). When in angle count mode the angle increment
value will be 0 or 1. It takes two cycles in this mode.