![Trinamic TMCM-351 Firmware Manual Download Page 17](http://html1.mh-extra.com/html/trinamic/tmcm-351/tmcm-351_firmware-manual_1163054017.webp)
TMCM-351 TMCL Firmware V4.45 Manual (Rev. 1.06 / 2014-MAY-16)
17
www.trinamic.com
4.4.2.7.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 will be saved
automatically (i.e. accumulator register, X register, TMCL flags).
There is no interrupt nesting, i.e. all other interrupts are disabled while an interrupt handling routine is
being executed.
On return from an interrupt handling routine, the context of the normal program will automatically be
restored and the execution of the normal program will be continued.
4.4.2.7.3
Interrupt Vectors:
The following table shows all interrupt vectors for the three motors 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 0
16
stallGuard 1
17
stallGuard 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
4.4.2.7.4
Further Configuration of Interrupts
Some interrupts need further configuration (e.g. the timer interval of a timer interrupt). This can be done
using SGP commands with parameter bank 3 (SGP <type>, 3, <value>). Please refer to the SGP command for
further information about that.