![Trinamic TMCM-351 Firmware Manual Download Page 58](http://html1.mh-extra.com/html/trinamic/tmcm-351/tmcm-351_firmware-manual_1163054058.webp)
TMCM-351 TMCL Firmware V4.45 Manual (Rev. 1.06 / 2014-MAY-16)
58
www.trinamic.com
4.6.33
VECT (set interrupt vector)
The VECT command defines an interrupt vector. It needs an interrupt number and a label as parameter (like
in JA, JC and CSUB commands).
This label must be the entry point of the interrupt handling routine.
Related commands:
EI, DI, RETI
Mnemonic:
VECT <interrupt number>, <label>
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
37
<interrupt number>
don’t care
<label>
T
HE FOLLOWING TABLE SHOWS ALL INTERRUPT VECTORS THAT CAN BE USED
:
Interrupt number
Interrupt type
0
Timer 0
1
Timer 1
2
Timer 2
3
Target position reached 0
4
Target position reached 1
5
Target position reached 2
15
stallGuard axis 0
16
stallGuard axis 1
17
stallGuard axis 2
21
Deviation 0
22
Deviation 1
23
Deviation 2
27
Left stop switch 0
28
Right stop switch 0
29
Left stop switch 1
30
Right stop switch 1
31
Left stop switch 2
32
Right stop switch 2
39
Input change 0
40
Input change 1
41
Input change 2
42
Input change 3
43
Input change 4
44
Input change 5
45
Input change 6
46
Input change 7
255
Global interrupts
Example:
Define interrupt vector at target position 500
VECT 3, 500
Binary format of VECT:
Byte Index
0
1
2
3
4
5
6
7
Function
Target-
address
Instruction
Number
Type
Motor/
Bank
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Value (hex)
$01
$25
$03
$00
$00
$00
$01
$F4