TMCM-1211 TMCL
™
Firmware Manual • Firmware Version V1.10 | Document Revision V1.00 • 2018-OCT-02
20 / 133
Interrupt Processing Commands
Mnemonic
Command number
Meaning
EI
25
Enable interrupt
DI
26
Disable interrupt
VECT
37
Set interrupt vector
RETI
38
Return from interrupt
Table 11: Interrupt Processing Commands
3.5.6.1
Interrupt Types
There are many different interrupts in TMCL, like timer interrupts, stop switch interrupts, position reached
interrupts, and input pin change interrupts. Each of these interrupts has its own interrupt vector. Each
interrupt vector is identified by its interrupt number. Please use the TMCL include file Interrupts.inc in
order to have symbolic constants for the interrupt numbers. Table
show all interrupts that are available
on the TMCM-1211.
Interrupt Vectors
Interrupt number
Interrupt type
0
Timer 0
1
Timer 1
2
Timer 2
3
Target position reached 0
15
stallGuard axis 0
21
Deviation axis 0
27
Left stop switch 0
28
Right stop switch 0
39
Input change 0
40
Input change 1
41
Input change 2
42
Input change 3
43
Input change 4
44
Input change 5
255
Global interrupts
Table 12: Interrupt Vectors
3.5.6.2
Interrupt Processing
When an interrupt occurs and this interrupt is enabled and a valid interrupt vector has been defined
for that interrupt, the normal TMCL program flow will be interrupted and the interrupt handling routine
will be called. Before an interrupt handling routine gets called, the context of the normal program (i.e.
accumulator register, X register, flags) will be saved automatically.
©2018 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at