TMC424 Datasheet – (V1.04 / 2015-JUL-01)
1/21
TMC424 – Datasheet
76
GND
ENC_INV
VCCI
VCORE
EXT_RES
NINT
NSCS429
SDO429
SCK
NSCS
SDO
1
100
GND
SDI
Serial Triple Incremental
Encoder Interface
75
GND
VCC
ENC1_A
ENC1_B
TRINAMIC Motion Control GmbH & Co. KG
Hamburg
GERMANY
WWW.TRINAMIC.COM
ENC1_N
ENC2_A
ENC2_B
ENC2_N
VCORE
GND
GND
ENC3_A
VCCI
ENC3_B
GND
CLK
TMC424
TQFP-100 Package
ENC3_N
VCORE
STEP1
VCORE
VCCI
DIR1
VCC
STEP2
TRST
DIR2
TDO
STEP3
DIR3
VCC
VCC
50
TDI
TMS
TCK
TMC424 Main Features
51
GND
VCC
STOPL0
STOPL1
STOPL2
STOPR2
STOPR1
GND
VCCI
STOPR0
REF2
VCORE
REF1
REF0
SDI_D
SCK_D
SDO_D
26
25
NSCS_D
GND
The TMC424 is a triple incremental encoder input chip, which interfaces to any SPITM compatible
controller. The TMC424 can especially be used in conjunction with the TMC429 triple stepper motor
controller to provide position verification or stabilization using some additional software. It
integrates 24 bit counters for each encoder to provide a high position resolution without CPU
interaction. Further it allows dynamic resolution adaptation to allow direct comparison of encoder
counters with motors using a different micro step resolution. All encoder counters can be latched
synchronously, or whenever a null channel event occurs, providing a position on strobe holding
function. The TMC424 also provides a step / direction output with programmable signal shaping for
the TMC429 as an optional function. A multiplexer function is also integrated for the TMC429
reference switches. All functions can also be used in conjunction.
Applications
•
•
•
•
Stepper Motor Position Verification
Position Maintenance
Incremental Encoder Interface Readout
Step / Direction conversion for TMC429 systems
Features
•
•
•
•
•
•
•
•
•
•
Supports 2 and 3 channel incremental encoders with a wide range of resolutions
Allows step / direction signal extraction from TMC429 output data stream
Programmable pulse shaping for step / direction interface
24 bit integrated position resolution
Programmable prescaler for Incremental Encoder Interface
4-times evaluation of encoder signals
Fast 32 bit SPITM interface
Can share SPITM interface with TMC429 and supplies separate interrupt output
Integrates Reference Switch Multiplexers
Package: TQ100
Note: SPI is Trademark of Motorola, Inc.
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
2/21
Revision History
Version
Comment
Date
Name
1.0
Derived from TMC423 rebirth datasheet V1.4
June 24, 2010
SL
1.01
Added Pin12 (GND) to Table 1
October 14, 2010
SL
1.02
Added internal Pull-Up/-Down
resistors to Table 1
February 1, 2011
SL
Updated to TMC429 and TMC26x
June 30, 2011
SL
2015-JUN-01
BD
1.03
1.04
Warning hint for chamfered corner in IC package
is not pin 1 reference
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
3/21
Table of Contents
1
2
3
4
5
6
7
8
9
Pinout..............................................................................................................................................5
1.1 Pin Description .........................................................................................................................6
1.2 Recommended Operating Conditions ......................................................................................7
1.3 Electrical Characteristics ..........................................................................................................7
Block Diagram .................................................................................................................................8
Application Environment ................................................................................................................9
3.1 Application Description ............................................................................................................9
3.1.1 Application with TMC26x Stepper Motor Driver (SPI controlled) .......................................9
3.1.2 Application with Step/Direction controlled TMC26x ..........................................................9
3.2 Application Examples .............................................................................................................10
3.2.1 Application with TMC6x Stepper Motor Driver .................................................................10
3.2.2 Application with Step/Direction Power Stage ...................................................................10
Dynamic Resolution Adaptation ....................................................................................................11
Serial Peripheral Interface (SPI) with 32-bit Register ....................................................................12
5.1 Description and Specification.................................................................................................12
5.2 32-bit SPI Datagram Structure ...............................................................................................13
5.3 SPI 32-bit Datagram Specification ..........................................................................................13
5.3.1 Overview ...........................................................................................................................13
Incremental Encoder .....................................................................................................................14
Configuration Datagrams ..............................................................................................................15
7.1 Encoder Interface Prescaler and Null Event Configuration ....................................................15
7.2 Encoder Interface Hold Register Operation ...........................................................................16
7.3 Timer Logic Step Pulse Length and Delay ...............................................................................17
7.4 Control Register and Interrupt Control ..................................................................................17
7.5 N-Channel Read Back .............................................................................................................17
SPI-Protocol for Interface with 6-bit Register................................................................................18
8.1 Step and Direction Pulse conversion ......................................................................................18
Package dimensions ......................................................................................................................19
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
4/21
List of Figures
Figure 1: Pinout TMC424 ........................................................................................................................5
Figure 2: Block diagram of the TMC424 .................................................................................................8
Figure 3: Application Environment .........................................................................................................9
Figure 4: Example for Application with SPI controlled TMC26x Stepper Motor Driver ........................10
Figure 5: Example for Application with Step/Direction Power Stage ...................................................10
Figure 6: TMC424 Application ..............................................................................................................11
Figure 7: Timing diagram of the Serial Interface ..................................................................................12
Figure 8: Structure 32-Bit Interface ......................................................................................................13
Figure 9: Overview TMC424 Registers ..................................................................................................13
Figure 10: Encoder Output and Evaluation........................................................................................... 14
Figure 11: Crosstalk on Encoder Wire ..................................................................................................14
Figure 12: Step Direction conversion ...................................................................................................18
Figure 13: 100-Pin TQFP Top View .......................................................................................................19
Figure 14: 100-Pin TQFP Side View .......................................................................................................19
Figure 15: 100-Pin TQFP Side View Detail A .........................................................................................19
List of Tables
Table 1: TMC424 Pinout .........................................................................................................................6
Table 2: Operating Conditions ................................................................................................................7
Table 3: Operating Conditions ................................................................................................................7
Table 4: Prescaler factors for different motors and encoders ..............................................................11
Table 5: Interrupt Flags ........................................................................................................................13
Table 6: SPI Datagram Prescaler ...........................................................................................................16
Table 7: SPI Datagram Hold Register ....................................................................................................16
Table 8: SPI Datagram Step-/Dir logic...................................................................................................17
Table 9: SPI Datagram Control Register ................................................................................................17
Table 10: N-Channel Read Back Register ..............................................................................................17
Table 11: SPI Datagram Step / Direction Converter .............................................................................18
Table 12: Datagram example and RAM contents for three step-direction drivers ...............................18
Table 13: TQFP Dimensions ..................................................................................................................20
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
5/21
GND
1
ENC_INV
GND
VCCI
VCORE
EXT_RES
NINT
NSCS429
SDO429
NSCS
SCK
SDI
76
100
SDO
1 Pinout
75
GND
VCC
ENC1_A
ENC1_B
ENC1_N
ENC2_A
ENC2_B
ENC2_N
VCORE
GND
GND
ENC3_A
VCCI
ENC3_B
GND
CLK
TMC424
TQFP-100 Package
ENC3_N
VCORE
STEP1
VCORE
VCCI
DIR1
VCC
STEP2
TRST
DIR2
TDO
STEP3
DIR3
VCC
VCC
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
VCC
TDI
TMS
TCK
STOPL2
50
Figure 1: Pinout TMC424
STOPL1
STOPL0
STOPR2
STOPR1
STOPR0
VCCI
GND
VCORE
REF2
REF0
REF1
NSCS_D
SCK_D
26
SDI_D
SDO_D
GND
25
51
GND
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
1.1
Pin Description
Pin
Location
GND
1, 9, 12, 25, 38,
51, 67, 75, 88
3
4
5
6
7
8
10
11
13
86
48
49
55
54
47
18, 39, 66, 87
24, 50, 52, 56, 74
14, 17, 37, 68, 89
64
92
16
19
20
21
22
23
26
27
28
29
34
35
36
40
41
42
43
44
45
100
99
98
97
96
95
94
ENC1_A
ENC1_B
ENC1_N
ENC2_A
ENC2_B
ENC2_N
ENC3_A
ENC3_B
ENC3_N
ENC_INV
TDI
TMS
TRST
TDO
TCK
VCCI
VCC
VCORE
CLK
EXT_RES
Step 1
Dir 1
Step 2
Dir 2
Step 3
Dir 3
SDO_D
SDI_D
SCK_D
NSCS_D
REF0
REF1
REF2
STOPR0
STOPR1
STOPR2
STOPL0
STOPL1
STOPL2
SDO
SDI
SCK
NSCS
SDO429
NSCS429
NINT
Dir
In
In
In
In
In
In
In
In
In
In
In
In
Out
Out
Out
Out
Out
Out
Out
In
In
In
Out
Out
Out
In
In
In
In
In
In
Out
In
In
In
In
In
Out
Pull-Up /
Pull-Down
Down
Up
Up
Up
Up
Down
Down
Down
Down
Down
Down
Up
Up
Up
Up
Up
6/21
Description
Ground
Incremental Encoder Interface 1 Channel A
Incremental Encoder Interface 1 Channel B
Incremental Encoder Interface 1 Channel N
Incremental Encoder Interface 2 Channel A
Incremental Encoder Interface 2 Channel B
Incremental Encoder Interface 2 Channel N
Incremental Encoder Interface 3 Channel A
Incremental Encoder Interface 3 Channel B
Incremental Encoder Interface 3 Channel N
Invert all ENCx_y inputs
Connect to Ground
Connect to 3.3 Volt via Pull-Up Resistor
Connect to 3.3 Volt via Pull-Up Resistor
To be left open
Connect to Ground
Positive Power Supply 3.3 Volt
Positive Power Supply 3.3 Volt
Positive Power Supply 1.5 Volt
System Clock 16MHz
External Reset Low Active
Step/Direction Interface – Step Output Motor 1
Step/Direction Interface – Direction Output Motor 1
Step/Direction Interface – Step Output Motor 2
Step/Direction Interface – Direction Output Motor 2
Step/Direction Interface – Step Output Motor 3
Step/Direction Interface – Direction Output Motor 3
Step / Direction SPI MISO
Step / Direction SPI MOSI
Step / Direction SPI SCK
Step / Direction SPI NSCS
Reference switch output 1
Reference switch output 2
Reference switch output 3
Right Stop Switch Motor 1
Right Stop Switch Motor 2
Right Stop Switch Motor 3
Left Stop Switch Motor 1
Left Stop Switch Motor 2
Left Stop Switch Motor 3
SPI MISO
SPI MOSI
SPI SCK
SPI NSCS
SPI MISO Pin of TMC429 (SDO_C)
SPI NSCS Pin of TMC429 (nSCS_C)
Interrupt Output (low active)
Table 1: TMC424 Pinout
Note: Pins which are not marked in Figure 1: Pinout TMC424 on page 5 must be left open.
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
1.2
7/21
Recommended Operating Conditions
Parameter
Clock Frequency (1)
Temperature
1.5 V Power Supply
3.3 V Power Supply
Value
16
0 … +70
1.425 ... 1.725
3 ... 3.6
Unit
MHz
°C
V
V
Table 2: Operating Conditions
1 – frequencies up to 60MHz are supported. Please take care about the timing information in this datasheet, since they are based on
16MHz Clock Frequency.
1.3
Electrical Characteristics
Parameter
Supply Current 1.5V
Supply Current 3.3V
(Output current = 0)
Min
Input voltage level Low
Input voltage level High
Encoder input pulse length
Encoder count rate
Max
10.5
1.5
Unit
mA
mA
0.8
V
V
2
2 tCLK
Table 3: Operating Conditions
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
fCLK
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
8/21
2 Block Diagram
EXT
RES
ENC_
INV
ENC1
A
Power On
Reset
Prescaler factor 10 bit
1/16, 2/16, ... 64
or 1/5, 2/5, ... 64
ENC1
B
prescaler+1
ENC1
N
+
NSCS
ENC2
A
SCK
Encoder
signal
decoder
ENC2
B
Encoder Counter
24+4 bit
SPI Interface
with 32 bit Reg
SDI
ENC2
N
ENC3
A
Control register
Encoder Hold
24 bit
Flag register
ENC3
N
SDO
*Common Hold
command
*Interrupt enable
*Clear on N event
*Hold on N
*N polarity
ENC3
B
M
U
X
SDO
428
NSCS
428
3 x Encoder Interface
INT
Logic+
Latch
STEP
1
NINT
NSCS
_D
DIR
1
SPI Interface
with 6 Bit reg
STEP
2
SCK
_D
Timer logic
DIR
2
Step pulse
length
8 bit
STEP
3
DIR
3
3 x Step / Direction converter
CLK
VCC
VCCI
VCORE
GND
STOP
R3
STOP
R2
SDI
_D
Step pulse
delay after dir
change 10 bit
SDO
_D
REF
MUX
STOP
R1
STOP
L3
STOP
L2
STOP
L1
Figure 2: Block diagram of the TMC424
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
REF
3
REF
2
REF
1
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
9/21
3 Application Environment
TMC424 as Incremental Encoder Interface
TMC
26x
TMC
26x
TMC
26x
TMC424 as Step / Direction converter
and Incremental Encoder Interface
Motor
Incremental
Encoder
TMC
26x
Motor
Incremental
Encoder
TMC
26x
Motor
Incremental
Encoder
Incremental
Encoder
Motor
Incremental
Encoder
Motor
Incremental
Encoder
Motor
Step / Direction Interface
for up to three power stages
SPI-Interface
SPI-Interface
TMC
26x
TMC
429
TMC
424
TMC
429
TMC
424
SPI-Interface
SPI-Interface
µC
µC
Figure 3: Application Environment
3.1
Application Description
3.1.1 Application with TMC26x Stepper Motor Driver (SPI controlled)
A complete close-loop motion control system consists of the TMC429 three-axis motion controller, a
powerful stepper motor driver from the TMC26x family and the TMC424 Encoder Interface. The
system is controlled by an inexpensive microcontroller.
The main advantage of the system is that time critical communication to the TMC26x driver is
performed by the TMC429. The main purpose of the inexpensive microcontroller is to parameterize
the TMC429 and TMC424 and to send motion parameters like maximum speed or target position to
the TMC429. Position validation is done by reading the actual position of the TMC429 and the
TMC424.
The older TMC236, TMC246, TMC239 and TMC249 are also compatible with the TMC424.
3.1.2 Application with Step/Direction controlled TMC26x
Another possibility to build a close loop motion control system is to use the TMC424 as encoder
interface and also as a step direction converter. Thereto the TMC424 converts the SPITM datagrams
sent by the TMC429 into parameterizeable step and direction pulses. For parameterizing, both the
TMC429 and TMC424 have to be connected via SPITM interface to an inexpensive microcontroller.
Since the TMC429 already has the capability to output Step/Direction signals for at least two motors
(depending on the package), the conversion in the TMC424 is not needed in most cases.
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
3.2
10/21
Application Examples
3.2.1 Application with TMC6x Stepper Motor Driver
This example illustrates the encoder connection and the use of reference switches with the TMC424
and additionally the SPI interface connections between TMC424, TMC429 and a microcontroller. The
communication to the drivers (e.g. TMC260) is performed via SPI by the TMC429 motion control chip.
On some package variants of the TMC429, the REFR pins are available. Those should be preferred to
the STOPR/STOPL inputs of the TMC424's multiplexer.
+3.3V
CLK
RESET
16MHz
REF1
REF2
REF3
10k each
Connect to encoders
ENC1_A
ENC1_B
ENC1_N
SDI
SCK
SDO
NSCS
ENC2_A
ENC2_B
ENC2_N
ENC3_A
ENC3_B
ENC3_N
TMC424
from nSCS_S
of TMC429
470nF
Test
GND
SDI_C
SCK_C
SDO_C
nSCS_C
GND
SDI_S
SCK_S
SDO_S
nSCS_S
SPI
to
Drivers
+3.3V
10k
TRST
TMS
VCC
SDI_D
SCK_D
NSCS_D
GND
STOPR0 - STOPR2
STOPL0 - STOPL2
TCK
TDI
to nSCS_D
of TMC424
µC
VCORE
6x Reference Switch
Inputs (active high)
V5
V33
TMC429
SDO429
NSCS429
+3.3V
+1.5V
CLK
REF1
REF2
REF3
SS424
SS429
MISO
SCK
MOSI
+3.3V
16MHz
Notes:
1. If the NSCS429 pin is not in use it has to be tied to +3.3V
2. NSCS_D activates the reference switches (inputs
STOPRx/STOPLx and outputs REFx).
GND
Figure 4: Example for Application with TMC26x Stepper Motor Driver
3.2.2 Application with Step/Direction Power Stage
Additionally to the previous example the use of the TMC424 as step/direction converter is shown.
This can be used with the TMC429 as a drop-in replacement for the TMC428. The reference switches
can also be used as above.
SS424
MISO
SS429
SCK
MOSI
µC
+3.3V
16MHz
CLK
RESET
10k each
Connect to encoders
ENC1_A
ENC1_B
ENC1_N
ENC2_A
ENC2_B
ENC2_N
ENC3_A
ENC3_B
ENC3_N
+3.3V
+1.5V
VCC
VCORE
+3.3V
SDI_D
SCK_D
TMC429
NSCS
SDO
SCK
SDI
TMC424
SCK_C
SDI_C
SDO429
NSCS429
SDO_C
nSCS_C
SDI_D
SCK_D
SDO_D
NSCS_D
SDO_S
SCK_S
SDI_S
nSCS_S
STEP1
DIR1
STEP2
DIR2
STEP3
DIR3
Step/DIR
to
Drivers
CLK
16MHz
+3.3V
V5
V33
Test
GND
470nF
GND
10k
TRST
TMS
STOPR0 - STOPR2
STOPL0 - STOPL2
GND
Note:
If the NSCS429 pin is not in use, it has to be tied to +3.3V
GND
TCK
TDI
GND
Figure 5: Example for Application with Step/Direction
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
11/21
4 Dynamic Resolution Adaptation
The dynamic resolution adaptation is needed to link stepper motors and encoders with different
resolutions. The characteristics of the connected hardware must be provided to the TMC424 by
sending the corresponding SPI telegram. (See 5.3.1 Overview on page 13 in this issue). The TMC424
multiplies the encoder counter by a user selectable value in the range 1..1024, and then divides it by
16. When using incremental encoders with N channel it is also possible to select between different
behaviors when the N channel is triggered.
Encoder:
Resolution: e.g.: 1000 steps / rotation
Stepper
motor
TMC424
Stepper Motor:
Resolution: e.g.: 12800 steps / rotation
SPI Interface
TMC424:
Prescaler = 3.2 -> 1000* 4 * 3.2 = 12800
Figure 6: TMC424 Application
Table 4 shows a number of prescaler factors for possible combinations of micro step resolution and
encoder resolution. Note: The given number of pulses have to be multiplied by four since 4-times
Step
Channel A
Channel B
Channel N
Evaluation
encoder signal evaluation is used. (See
Figure 10: Encoder Output and Evaluation on page 14).
Microsteps
12800
6400
3200
1600
800
400
1024
3.125
1.5625
-------------
1000
3.2
1.6
-------------
Encoder Resolution [Pulses / Rotation]
512
500
256
250
200
6.25
6.4
12.5
12.8
16
3.125
3.2
6.25
6.4
8
1.5625
1.6
3.125
3.2
4
------1.5625
1.6
2
------------1
----------------
125
25.6
12.8
6.4
3.2
1.6
----
Table 4: Prescaler factors for different motors and encoders
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
50
64
32
16
8
4
2
25
---64
32
16
8
4
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
12/21
5 Serial Peripheral Interface (SPI) with 32-bit Register
5.1
Description and Specification
Four pins named nSCS, SCK, SDI and SDO form the serial peripheral interface from a microcontroller
to the TMC424. The communication between the microcontroller and the TMC424 takes place via
datagrams with a fixed length of 32 bit. The microcontroller always acts as master and the TMC424
as slave.
The SPITM of the TMC424 behaves like a simple 32-bit shift register. Incoming serial data at pin SDI is
shifted with the rising edge of the clock signal SCK into the 32-bit register. The content of this register
is copied after 32-bits with the rising edge of the selection signal nSCS into a buffer register of 32-bit
length. The SPITM of the TMC424 sends back data read from registers immediately via the SDO signal.
It processes serial data synchronously to the clock signal CLK.
Because of on-the-fly processing of the input data stream, the serial microcontroller interface of the
TMC424 requires the serial data clock signal SCK to have a minimum low / high time of three clock
cycles. The data signal SDI driven by the microcontroller has to be valid at the rising edge of the serial
data clock input SCK. The maximum duration of the serial data clock period is unlimited.
A complete serial datagram frame has a fixed length of 32 bit. While the data transmission from the
microcontroller to the TMC424 is idle, the low active serial chip select input nSCS and also the serial
data clock signal SCK are set to high. The serial data input SDI of the TMC429 has to be driven by the
microcontroller. Like other SPI compatible devices, the SDO signal of the TMC424 is high impedance
‘Z’ as long as nSCS is high.
The signal nSCS has to be high for at least three clock cycles before starting a datagram transmission.
To initiate a transmission, the signal nSCS has to be set to low. Three clock cycles later the serial data
clock may go low. The most significant bit (MSB) of a 32 bit wide datagram comes first and the least
significant bit (LSB) is transmitted as the last one. A data transmission is finished by setting nSCS high
for three or more CLK cycles after the last rising SCK slope. nSCS and SCK change in opposite order
from low to high at the end of a transmission as these signals change from high to low at the
beginning. The timing of the serial microcontroller interface is outlined here:
tCLK
tDATAGRAMuC
tSUCSC
tHDCSC
tSCKCL
tHDCSC
tSCKCH
tSUCSC
CLK
nSCS
SCK
tSD
tSD
sdi_bit#31
SDI
tSD
sdi_bit#0
sdi_bit#30 . . . sdi_bit#1
tPD
sdo_bit#31
SDO
sdo_bit#30 ... sdo_bit#1
sdo_bit#0
tIS
tSI
30 x sampled SDI_C
1 x SDI_C sampled
one full 32 bit datagram
1 x SDI_C sampled
Figure 7: Timing diagram of the Serial Interface
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
5.2
13/21
32-bit SPI Datagram Structure
Datagram from TMC424 send to µC
3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
9 8 7 6 5 4 3 2 1 0
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
Data
0 0 0 0
INT
Datagram from µC to TMC424
3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
9 8 7 6 5 4 3 2 1 0
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
R
W
Address
Data
Figure 8: Structure 32-Bit Interface
Interrupt Flags [Bit]
31
30
29
28
Name
INT_ext
INT_enc1
INT_enc2
INT_enc3
Description
external Interrupt, e.g. TMC429
N Signal of Encoder Interface 1 detected
N Signal of Encoder Interface 2 detected
N Signal of Encoder Interface 3 detected
Table 5: Interrupt Flags
5.3
SPI 32-bit Datagram Specification
5.3.1 Overview
Byte 3
26
25
Address
Control
Data
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
0
0
0
0
0
0
0
1
Encoder 1 Prescaler
0
0
0
0
0
0
1
1
Encoder 2 Prescaler
0
0
0
0
0
1
0
1
Encoder 3 Prescaler
0
0
0
0
0
1
1
1
Encoder 1, 2, 3 Prescaler - set all commonly
0
0
0
0
1
0
0
Encoder 1 Position Register
0
0
0
0
1
0
1
Encoder 2 Position Register
0
0
0
0
1
1
0
Encoder 3 Position Register
Step /Dir 0
0
0
0
1
1
1
1
0
0
1
0
0
0
1
0
0
1
0
0
1
0
INT EN
0
Step Pulse Length
Clear Flags
N-Input
0
Reg Hold
INT
7
6
5
4
3
2
1
0
0
0
0
N2
N1
Reserved
Direction
27
N Trigger
28
N Hold
29
Byte 0
N Clear
30
Byte 1
N Polarity
31
Byte 2
RW
Byte #
Bit #
Reserved
Reserved
Reserved
Step Pulse Delay
Reserved
Reserved
N3
N2
N1
0
0
0
N3
N2
N1
0
0
Figure 9: Overview TMC424 Registers
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
0
N3
N2
N1
0
0
0
N3
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
14/21
6 Incremental Encoder
Incremental Encoders are translating the rotary motion of a shaft into a two-channel digital
quadrature output. The light emitted from a LED is focused onto a reflective code wheel. As the shaft
moves, the code wheel rotates, reflecting light from an alternating bright and dark pattern.
The TMC424 samples the incoming signals ENCx_A and ENCx_B from the incremental encoder. A
internal algorithm block counts the amount of edges generated by the encoder. A prescaler value can
be used to adapt the incremental encoder resolution to the stepper motor resolution.
For high resolution the TMC424 evaluates the encoder signals 4-times during each encoder step. This
has to be kept in mind when choosing the prescaler value.
Step
Channel A
Channel B
Channel N
Evaluation
Figure 10: Encoder Output and Evaluation
Note: It is possible that the encoder signals ENCx_A, ENCx_B and ENCx_N are polluted with crosstalk
noise. Crosstalk could influence the internal logic, to overcome this problem internal filters are
applied to ensure correct functionality. Furthermore is saves the need for external analog filters.
e.g.: Figure 11: Crosstalk on Encoder Wire shows crosstalk from channel A to channel B.
Figure 11: Crosstalk on Encoder Wire
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
15/21
7 Configuration Datagrams
7.1
Encoder Interface Prescaler and Null Event Configuration
The Encoder Interface Initialization datagram configures the parameterizeable encoder prescaler to
adapt the TMC424 for different incremental encoders. Furthermore the TMC424 behavior
concerning the N channel can be selected.
Example: A 1000 steps per rotation encoder is to connect at a stepper motor with 12800 microsteps per rotation. When the next event at
the high active N channel is found, the position register must set to zero. Only Encoder Interface 1 is connected.
The following datagram performs this task:
•
Bits 31 down to 24 have to be set to 01HEX to select encoder interface 1
•
The prescaler value has to set to 12800 / (1000*4) = 3.2. Therefore bits 23 down to 12 must set to 831HEX.
•
The N channel is set up correctly when bits 11 down to 0 are set to A0HEX.
Bit
31…28
27…25
24
23…12
Encoder Interface Initialization
“0000” Register Address
Interface Selection
000 = Interface 1
001 = Interface 2
010 = Interface 3
011 = Interface 1, 2 and 3
‘1’
External Encoder Resolution and Corresponding Prescaler Factor
Bits 15 … 12:
Fractional part of Factor. Unit: 1/16 (when bit 23 = 0) resp. 1/5 (bit 23 = 1)
Bits 22 … 16:
Integer part of Factor
Bit 23:
Switches Fractional part between 1/5 resolution or 1/16 resolution
Default:
(010)h (prescaler 1) (default value after power on)
Example settings:
Encoder: 1024 lines (4096 steps per rotation)
(032)h for 12800 micro steps per rotation (prescaler 3.125)
(019)h for 6400 micro steps (prescaler 1.5625)
Encoder: 1000 lines
(831) h for 12800 micro steps (prescaler 3.2)
(813)h for 6400 micro steps (prescaler 1.6)
Encoder: 512 lines
(064)h for 12800 micro steps (prescaler 6.25)
(032)h for 6400 micro steps (prescaler 3.125)
(019)h for 3200 micro steps (prescaler 1.5625)
Encoder: 500 lines
(862)h for 12800 micro steps (prescaler 6.4)
(831)h for 6400 micro steps (prescaler 3.2)
(813)h for 3200 micro steps (prescaler 1.6)
Encoder: 256 lines
(0C8)h for 12800 micro steps (prescaler 12.5)
(064)h for 6400 micro steps (prescaler 6.25)
(032)h for 3200 micro steps (prescaler 3.125)
(019)h for 1600 micro steps (prescaler 1.5625)
Encoder: 250 lines
(8C4)h for 12800 micro steps (prescaler 12.8)
(862)h for 6400 micro steps (prescaler 6.4)
(831)h for 3200 micro steps (prescaler 3.2)
(813)h for 1600 micro steps (prescaler 1.6)
Encoder: 200 lines
(100)h for 12800 micro steps (prescaler 16)
(080)h for 6400 micro steps (prescaler 8)
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
16/21
(040)h for 3200 micro steps (prescaler 4)
(020)h for 1600 micro steps (prescaler 2)
(010)h for 800 micro steps (prescaler 1)
Encoder: 125 lines
(993)h for 12800 micro steps (prescaler 25.6)
(8C4)h for 6400 micro steps (prescaler 12.8)
(862)h for 3200 micro steps (prescaler 6.4)
(831)h for 1600 micro steps (prescaler 3.2)
(813)h for 800 micro steps (prescaler 1.6)
11
10
9
8
7
6…0
Encoder: 50 lines (200 steps per rotation)
(400)h for 12800 micro steps (prescaler 64)
(200)h for 6400 micro steps (prescaler 32)
(100)h for 3200 micro steps (prescaler 16)
(080)h for 1600 micro steps (prescaler 8)
(040)h for 800 micro steps (prescaler 4)
(020)h for 400 micro steps (prescaler 2)
(010)h for 200 steps per rotation (prescaler 1)
N Polarity for Selected Interface
0 = active low (default)
1 = active high
When changing the polarity, please be aware that a single clear on N Event might be triggered,
and thus should not be initiated in the same write access.
Hold on N for Selected Interface
0 = no hold (default)
1 = active: Encoder counter freezes during 0 channel event.
Clear on N Event for Selected Interface
0 = no clear (default)
1 = active
When switched to active, then it depends on bit 8, if a clear event is issued only once, or always
when the N channel becomes active.
N Trigger Selection
0 = only at next N signal (default)
1 = always at N signal
The clear event last until the N signal goes inactive again. If earlier termination is desired, i.e. to
preset the encoder counter to a different value, disable “Clear on N” prior to changing the position
register.
add or sub register for each step (CW = looking onto the axis)
0= add for CW, sub for CCW (default)
1= add for CCW, sub for CW
Reserved
Table 6: SPI Datagram Prescaler
7.2
Encoder Interface Hold Register Operation
To read the actual contents of the position register or to preset the position register the following
command is to be used:
Bit
Encoder Interface Control (Read/Preload Encoder Hold Register)
31…28
“0000” Register Address
27…25
Select Encoder Hold Register
100 = Hold register in encoder interface 1
101 = Hold register in encoder interface 2
110 = Hold register in encoder interface 3
24
Read or Preload Selection
0 = Read encoder hold register
1 = Preload encoder hold register
23…0
Encoder Hold Register Data
Table 7: SPI Datagram Hold Register
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
7.3
17/21
Timer Logic Step Pulse Length and Delay
To parameterize the step length and delay the next datagram is to be used:
Bit
31…25
24
23…16
15…6
5…0
Write Step Pulse Length / Delay
“0000111” Register Address
‘1’
Step Pulse Length (default value = 48(10) after PON)
Step Pulse Delay after Direction Change (default value = 160(10) after PON)
Reserved
Table 8: SPI Datagram Step-/Dir logic
7.4
Control Register and Interrupt Control
This datagram configures the interrupt control of the TMC424. When enabled, the N channel pulse of
all encoders is fed to the NINT pin.
Bit
31…25
24
23
Control Register
“0001000” Register Address
‘1’
Set Common Hold for Encoder Hold Registers
0 = no hold (default)
1 = freeze encoder hold registers
Encoder Interrupt Enable, if Null signal
0 = interrupt disable (default)
1 = interrupt enable
Clear Interrupt Flags
0 = no clear (default)
1= clear flags
Reserved
22
21
20…0
Table 9: SPI Datagram Control Register
7.5
N-Channel Read Back
This datagram returns the state of the three N-Channel inputs ENCx_N after the possible inverting
controlled by ENC_INV. The three inputs are sampled after transmission of the R/W bit. The three
bits are repeated in the datagram for compatibility reasons as if the N-signals were connected to the
SW_ROW_PIN(0..2) inputs of a TMC423.
Bit
31…25
24
23…21,
17…15,
11…9, 5…3
20, 14, 8, 2
19, 13, 7, 1
18, 12, 6, 0
Channel
“0001001” Register Address
‘0’
“000”
ENC3_N when ENC_INV = 0, not ENC3_N when ENC_INV = 1
ENC2_N when ENC_INV = 0, not ENC2_N when ENC_INV = 1
ENC1_N when ENC_INV = 0, not ENC1_N when ENC_INV = 1
Table 10: N-Channel Read Back Register
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
18/21
8 SPI-Protocol for Interface with 6-bit Register
The 6-bit SPI Interface is used to receive step / direction information from the TMC429. The TMC424
processes the data and issues the corresponding step / direction signals via the step / direction pins.
Bit0 (Pulse 1) have to be sent first to the TMC424.
Bit
0
1
2
3
4
5
Step / Direction Converter
Pulse 1
Direction 1
Pulse 2
Direction 2
Pulse 3
Direction 3
Table 11: SPI Datagram Step / Direction Converter
The order of the control signals serially sent from the TMC429 has to be defined. This can be done by
writing so called primary signal codes into the stepper motor driver datagram configuration area of
the on-chip configuration RAM of the TMC429. This signals codes are $13 (step first) and $12
(direction). To switch to the next motor the next motor bit (NxM) has to be set.
Position within
datagram
0
1
2
3
4
5
Driver/motor
1
2
3
NxM bit
TMC429 signal
code
RAM data
0
1
0
1
0
1
$13
$12
$13
$12
$13
$12
$13
$32
$13
$32
$13
$32
TMC429
mnemonic of
primary signal
Step
Direction
Step
Direction
Step
Direction
Table 12: Datagram example and RAM contents for three step-direction drivers
8.1
Step and Direction Pulse conversion
Step pulses can be modified in their pulse width and delayed after an direction change was done. The
corresponding datagram (See 7.3) on page 17) is used to parameterize the Step / Dir interface.
step_in
step_out
step pulse length
t
step pulse delay
t
dir
t
Figure 12: Step Direction conversion
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
9 Package dimensions
Figure 13: 100-Pin TQFP Top View
Attention: Pin 1 marking is by dot only. The position of the chamfered corner may vary!
Figure 14: 100-Pin TQFP Side View
Figure 15: 100-Pin TQFP Side View Detail A
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
19/21
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
JEDEC
Equivalent
Dimension
A
A1
A2
b
c
D/E
D1/E1
e
L
ccc
Theta
Notes :
- all dimensions are in millimeters
- BSC Basic Spacing between Centers
20/21
TQFP100
MS-026 VAR BED
Min
Nom
Max
1.60
0.05
0.15
1.35
1.40
1.45
0.17
0.22
0.27
0.09
0.20
16.00 BSC
14.00 BSC
0.50 BSC
0.45
0.60
0.75
0.08
0
3.50 deg
7 deg
Table 13: TQFP Dimensions
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
TMC424 Datasheet – (V1.04 / 2015-JUL-01)
Life support policy
TRINAMIC Motion Control GmbH & Co. KG does not
authorize or warrant any of its products for use in life
support systems, without the specific written consent
of TRINAMIC Motion Control GmbH & Co. KG. Life
support systems are equipment intended to support
or sustain life, and whose failure to perform, when
properly used in accordance with instructions provided,
can be reasonably expected to result in personal injury
or death.
© 2011 TRINAMIC Motion Control GmbH & Co. KG
Information given in this data sheet is believed to
be accurate and reliable. However no
responsibility is assumed for the consequences
of its use nor for any infringement of patents or
other rights of third parties, which may result form
its use.
Specifications subject to change without notice.
Copyright © 2015 TRINAMIC Motion Control GmbH & Co. KG
21/21