TMC4210+2660-EVAL [TRINAMIC]

MOTION CONTROLLER FOR STEPPER MOTORS;
TMC4210+2660-EVAL
型号: TMC4210+2660-EVAL
厂家: TRINAMIC MOTION CONTROL GMBH & CO. KG.    TRINAMIC MOTION CONTROL GMBH & CO. KG.
描述:

MOTION CONTROLLER FOR STEPPER MOTORS

文件: 总48页 (文件大小:1110K)
中文:  中文翻译
下载:  下载PDF数据表文档文件
MOTION CONTROLLER FOR STEPPER MOTORS  
INTEGRATED CIRCUITS  
TMC4210 DATASHEET  
Low cost 1-Axis Stepper Motor Controller for TMC26x and TMC389 Stepper Driver  
SPI Communication Interface for Microcontroller and Step/Direction interface to Driver  
APPLICATIONS  
CCTV, Security  
Antenna Positioning  
Heliostat Controller  
Battery powered applications  
Office Automation  
ATM, Cash recycler, POS  
Lab Automation  
Liquid Handling  
Medical  
Printer and Scanner  
Pumps and Valves  
DESCRIPTION  
FEATURES AND BENEFITS  
The TMC4210 is a 1-axis miniaturized  
stepper motor controller with an industry  
leading feature set. It controls the motor  
via Step/Direction interface. Based on  
target positions and velocities - which can  
be altered on the fly - it performs all real  
time critical tasks autonomously. The  
TMC4210 offers high level control functions  
for robust and reliable operation. The 4  
wire serial peripheral interface allows for  
communication with the microcontroller.  
1-Axis stepper motor controller  
3.3 V or 5 V operation with CMOS / TTL compatible IOs  
Serial 4-wire interface for µC with easy-to-use protocol  
Step/Direction interface to driver  
Clock frequency: up to 32 MHz (can use CPU clock)  
Internal position counters 24 bit wide  
Microstep frequency up to 1 MHz  
Read-out option for all motion parameters  
Ramp generator for autonomous positioning / speed control  
On-the-fly change of target motion parameters  
Low power operation: 1.25 mA at 4 MHz (typ.)  
Compact Size: ultra small 16 pin SSOP package  
Together with  
a
microcontroller the  
TMC4210 forms a complete motion control  
system. High integration and small form  
factor allow for miniaturized designs for  
cost-effective and highly competitive  
solutions.  
Directly controls TMC260, TMC261, TMC262, TMC2660, TMC389,  
TMC2100 and TMC2130  
BLOCK DIAGRAM  
Ref. Switches  
Ref. Switch  
Processing  
CLK  
Step/Dir  
Pulse  
Generation  
SPI to  
Master  
Linear  
RAMP Generator  
SPI to µC  
Step/Dir OUT  
SDO to µC  
Muliplexed  
Output  
Interrupt  
Controller  
24 Bit  
Target  
Position  
Position  
Comparator  
Position Counter  
TMC4210  
TRINAMIC Motion Control GmbH & Co. KG  
Hamburg, Germany  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
2
APPLICATION EXAMPLE: RELIABLE CONTROL USING STEP/DIR  
The TMC4210 scores with its autonomous handling of all real time critical tasks. By offloading the  
motion control function to the TMC4210, the stepper motor can be operated reliably with very little  
demand for service from the microcontroller. Software only needs to send target positions, and the  
TMC4210 generates precisely timed step pulses by hardware. Parameters for the motor can be  
changed on the fly while software retains full control. This way, high precision and reliable operation  
is achieved while costs are kept down.  
TMC4210+TMC2660-EVAL EVALUATION BOARD  
This evaluation board is a development  
platform for applications based on the  
TMC4210 and the TMC2660 stepper motor  
driver IC. The board features USB and CAN  
interfaces for communication with control  
software running on a PC. The power  
TMC2660  
MOSFETs of the TMC2660 support drive  
currents up to 2.8A RMS at 29V.  
The control software provides a user-friendly  
GUI for setting control parameters and  
visualizing the dynamic response of the  
motor.  
LOGIC OF THE CONTROLLER/DRIVER CHAIN  
DIAGNOSTICS  
VELOCITY  
ACCELERATION  
TARGET POSITION  
STEP AND DIRECTION  
POWER  
SIGNALS  
CPU  
TMC4210  
DRIVER  
M
HOME & STOP  
DIAGNOSTICS  
SYSTEM WITH TMC4210 AND TMC2660  
Mechanical Feedback or virtual  
stop switch  
REF_L, REF_R  
+VM  
TMC2660  
s
T
E
F
S
O
M
VSA / B  
OA1  
.
l
c
n
i
r
TMC4210  
e
v
i
VCC_IO  
r
D
H1  
Half Bridge 1  
Position  
counter  
Reference switch  
processing  
2 phase  
stepper  
motor  
N
STEP_IN  
DIR_IN  
sine table  
4*256 entry  
OA2  
S
chopper  
x
OB1  
nSCS_C  
SCK_C  
SDI_C  
STEP_OUT  
DIR_OUT  
H2  
Half Bridge 2  
Step &  
Direction pulse  
generation  
OB2  
SPI to master  
Linear RAMP  
generator  
STEP/DIR  
BRA / B  
RSA / B  
nINT_SDO_C  
CSN  
SCK  
SDI  
coolStep™  
RSENSE  
RSENSE  
SPI control,  
Config & diags  
SDO  
l
o
r
t
n
Interrupt  
controller  
Position  
comparator  
2 x current  
comparator  
o
c
2 x DAC  
n
Protection  
& diagnostics  
o
i
stallGuard2™  
t
o
M
CLK  
SG_TST  
Realtime event trigger  
Virtual stop switch  
)
*
1K  
Motion command SPI  
*) Connect 1K resistor to nINT_SDO_C to use  
the SPI interface. Another possibility is to use  
a tristate output (e.g., 74HC1G125) as shown  
below.  
User CPU  
l
o
r
t
nINT_SDO_C  
SDO  
System interfacing  
n
o
c
m
e
t
s
y
nSCS_C  
S
ORDER CODES  
Order code  
TMC4210-I  
TMC4210+2660-EVAL  
Description  
1-axis Step/Dir motion controller, SSOP16-package  
Evaluation board for TMC4210 and TMC2660 chipset  
Size  
6 x 5 mm2  
55 x 85 mm2  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
3
TABLE OF CONTENTS  
1
PRINCIPLES OF OPERATION  
4
7.3  
8.1  
HOMING PROCEDURE  
STEP/DIR DRIVERS  
TIMING  
37  
38  
38  
39  
39  
1.1  
1.2  
1.3  
1.4  
1.5  
KEY CONCEPTS  
4
5
5
6
7
8
9
CONTROL INTERFACES  
SOFTWARE VISIBILITY  
STEP FREQUENCIES  
MOVING THE MOTOR  
RUNNING A MOTOR  
GETTING STARTED  
9.1  
9.2  
RUNNING A MOTOR WITH START-STOP-SPEED IN  
RAMP_MODE  
2
GENERAL DEFINITIONS, UNITS, AND  
39  
NOTATIONS  
8
10 ON-CHIP VOLTAGE REGULATOR  
11 POWER-ON RESET  
40  
41  
42  
42  
2.1  
2.2  
2.3  
2.4  
NOTATIONS  
SIGNAL POLARITIES  
UNITS OF MOTION PARAMETERS  
REPRESENTATION OF SIGNED VALUES BY TWOS  
COMPLEMENT  
8
8
8
12 ABSOLUTE MAXIMUM RATINGS  
13 ELECTRICAL CHARACTERISTICS  
8
3
PACKAGE  
9
13.1  
13.2  
13.3  
POWER DISSIPATION  
DC CHARACTERISTICS  
TIMING CHARACTERISTICS  
42  
43  
44  
3.1  
3.2  
PACKAGE OUTLINE  
SIGNAL DESCRIPTIONS  
9
9
15 PACKAGE MACHANICAL DATA  
15.1  
45  
45  
46  
47  
47  
48  
48  
48  
4
5
SAMPLE CIRCUIT  
11  
12  
DIMENSIONAL DRAWINGS  
CONTROL INTERFACE  
16 MARKING  
5.1  
5.2  
5.3  
BUS SIGNALS  
SERIAL PERIPHERAL INTERFACE FOR µC  
REGISTER MAPPING  
12  
12  
17  
17 DISCLAIMER  
18 ESD SENSITIVE DEVICE  
19 TABLE OF FIGURES  
20 REVISION HISTORY  
21 REFERENCES  
6
7
REGISTER DESCRIPTION  
18  
6.1  
6.2  
AXIS PARAMETER REGISTERS  
GLOBAL PARAMETER REGISTERS  
18  
34  
REFERENCE SWITCH INPUTS  
36  
7.1  
7.2  
REFERENCE SWITCH CONFIGURATION, MOT1R 36  
TRIPLE SWITCH CONFIGURATION  
36  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
4
1 Principles of Operation  
POSCOMP  
Interrupt Controller  
TMC4210  
M
U
X
nINT_SDO_C  
Step/Dir  
to driver  
Step  
Dir  
Serial  
µC  
Interface  
STEPPULS  
Generator  
Linear RAMP  
Generator  
nSCS_C  
SCK_C  
SPI to  
µC  
Connect for  
+3.3V operation  
SDI_C  
CLK  
4-32MHz  
TEST  
24 Bit  
V5 /+5V supply  
Power-on  
Reset  
Voltage  
Regulator  
Target  
Position  
Position  
Counter  
V33  
470nF  
100nF  
GND  
GND  
GND  
GND  
Figure 1.1 TMC4210 functional block diagram  
The TMC4210 is a 1-axis miniaturized high performance stepper motor controller with an outstanding  
cost-performance ratio. It is designed for high volume automotive as well as for demanding industrial  
motion control applications. The TMC4210 receives target values for velocity, acceleration, and  
positioning from the microcontroller and calculates autonomously step and direction signals for the  
stepper motor driver IC. The motion controller is equipped with an SPI host interface with easy-to-use  
protocol and with a Step/Dir interface for addressing the stepper motor driver chip.  
1.1 Key Concepts  
The TMC4210 realizes real time critical tasks autonomously and guarantees for a robust and reliable  
drive. These following features contribute toward greater precision, greater efficiency, higher  
reliability, and smoother motion in many stepper motor applications.  
Interfacing  
The TMC4210 provides an SPI interface for communication with the user CPU and a  
Step/Dir interface for driver interfacing.  
Positioning  
The TMC4210 operates the motor based on user specified target positions and  
velocities. Modify all motion target parameters on-the-fly during motion.  
Programming Every parameter can be changed at any time. The uniform access to any TMC4210  
register simplifies application programming. A read-back option for all internal  
registers is available.  
Microstepping Based on internal position counters the TMC4210 performs up to ±223 (micro)steps  
completely independent from the microcontroller. Via STEP/DIR signals any microstep  
resolution can be realized as supported by the driver.  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
5
1.2 Control Interfaces  
1.2.1 Serial µC Interface  
Using this interface, the TMC4210 receives target positions, target velocities, and target acceleration  
values for the microcontroller. Further, it is used for configuration.  
From the software point of view, the TMC4210 provides a set of registers, accessed by the  
microcontroller via a serial interface in a uniform way. Each datagram contains address bits, a read-  
write selection bit, and data bits to access the registers and the on-chip memory. Each time the  
microcontroller sends a datagram to the TMC4210 it simultaneously receives a datagram from the  
TMC4210. This simplifies the communication with the TMC4210 and makes programming easy. Most  
microcontrollers have an SPI hardware interface, which directly connects to the serial four wire  
microcontroller interface of the TMC4210. For microcontrollers without SPI hardware software doing  
the serial communication is sufficient and can easily be implemented.  
1.2.2 Step/Dir Driver Interface  
The TMC4210-I controls the motor position by sending pulses on the STEP signal while indicating the  
direction on the DIR signal. A programmable step pulse length and step frequencies up to 1MHz allow  
operation at high speed and high microstep resolution. The driver chip converts these signals into the  
coil currents which control the position of the motor. The TMC4210-I perfectly fits to the TMC26x smart  
power Step/Dir driver family.  
SPI  
Stepper Motor  
Driver incl.  
MOSFETs  
TMC260/TMC261/  
TMC2660  
SPI  
Step/Dir  
High Level  
Interface  
TMC4210  
Motion Controller  
µC  
M
Figure 1.2 Application example using Step/Dir driver interface  
1.3 Software Visibility  
From the software point of view the TMC4210 provides a set of registers and on-chip RAM (see Figure  
1.1), accessed via the serial µC interface in a uniform way. The serial interface uses a simple protocol  
with fixed datagram length for the read- and write-access. These registers are used for initializing the  
chip as required by the hardware configuration. Afterwards the motor can be moved by writing target  
positions or velocity and acceleration values.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
6
1.4 Step Frequencies  
INITIALIZE THE STEP/DIR INTERFACE!  
The Step/Dir interface has to be initialized by writing 1 to en_sd. Refer to chapter 6.2.1.  
The desired motor velocity is an important design parameter of an application. Therefore it is  
important to understand the limiting factors.  
1.4.1 Step Frequencies using the Step/Dir Driver Interface  
The step pulses can directly be fed to a Step/Dir driver. The maximum full step rate (fsfmax) depends on  
the microstep resolution of the external driver chip.  
The TMC4210 microstep rate (µsf) is up to 1/32 of the clock frequency:  
fCLK  
µ푠f푚푎푥  
=
32  
EXAMPLE FOR FULL STEP FREQUENCY CALCULATION  
fCLK = 16 MHz  
µsfmax = 500 kHz  
µstep resolution of external driver: 16  
500ꢀ푘퐻푧  
푓푠푚푎푥  
=
= 31.25ꢀ푘퐻푧  
16  
With a standard motor with 1.8° per full step this results in up to 31.25kHz/200= 156 rotations per  
second, which is far above realistic motor velocities for this kind of motor and thus imposes no real  
limit on the application.  
A 16 microsteps resolution can be extrapolated to 256 microsteps within the driver when using the  
TMC26x 2-phase stepper driver family or the TMC389 3-phase stepper motor driver.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
7
1.5 Moving the Motor  
Moving the motor is simple:  
-
To move a motor to a new target position, write the target position into the associated register  
by sending a datagram to the TMC4210.  
-
To move a motor with a new target velocity, write the velocity into the register assigned to the  
stepper motor.  
1.5.1 Motion Controller Functionality  
The ramp generator monitors the motion parameters stored in its registers and calculates velocity  
profiles. Based on the actual ramp generator velocity, a pulse generator supplies step pulses to the  
motor driver.  
1.5.2 Modes of Motion  
ramp_mode  
For positioning applications the ramp_mode is most suitable. The user sets the  
position and the TMC4210 calculates a trapezoidal velocity profile and drives  
autonomously to the target position. During motion, the position may be altered  
arbitrarily.  
velocity_mode  
hold_mode  
soft_mode  
For constant velocity applications the velocity_mode is most suitable. In  
velocity_mode, a target velocity is set by the user and the TMC4210 takes into  
account user defined limits of velocity and acceleration.  
In hold_mode, the user sets target velocities, but the TMC4210 ignores any limits of  
velocity and acceleration, to realize arbitrary velocity profiles, controlled completely  
by the user.  
The soft_mode is similar to the ramp_mode, but the decrease of the velocity during  
deceleration is done with a soft, exponentially shaped velocity profile.  
1.5.3 Interrupts  
The TMC4210 has capabilities to generate interrupts. Interrupts are based on ramp generator  
conditions which can be set using an interrupt mask. The interrupt controller (which continuously  
monitors reference switches and ramp generator conditions) generates an interrupt if required.  
nINT_SDO_C is a low active interrupt signal while nSCS_C is high. If the microcontroller disables the  
interrupt during access to the TMC4210 and enables the interrupt otherwise, the multiplexed interrupt  
output of the TMC4210 behaves like a dedicated interrupt output. For polling, the TMC4210 sends the  
status of the interrupt signal to the microcontroller with each datagram.  
1.5.4 Reference Switch Handling  
The TMC4210 has a left (REF_L) and a right (REF_R) reference switch input. Further, the TMC4210 is  
equipped with a general purpose input (GP_IN).  
INITIALIZE THE RIGHT REFERENCE SWITCH!  
The right reference switch REF_R has to be initialized by writing 1 to mot1r.  
1.5.5 Access to Status and Error Bits  
The microcontroller directly controls and monitors the stepper driver. It also needs to take care for  
advanced current control, e.g. power down in stand still.  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
8
2 General Definitions, Units, and Notations  
2.1 Notations  
-
-
-
Decimal numbers are used as usual without additional identification.  
Binary numbers are identified by a prefixed % character.  
Hexadecimal numbers are identified by a prefixed $ character.  
EXAMPLE  
Decimal:  
Binary:  
42  
%101010  
Hexadecimal: $2A  
TMC4210 DATAGRAMS ARE WRITTEN AS 32 BIT NUMBERS, E.G.:  
$1234ABCD = %0001 0010 0011 0100 1010 1011 1100 1101  
TWO TO THE POWER OF N  
In addition to the basic arithmetic operators (+, -, *, /) the operator two to the power of n is required  
at different sections of this data sheet. For better readability instead of 2n the notation 2^n is used.  
2.2 Signal Polarities  
External and internal signals are high active per default, but the polarity of some signals is  
programmable to be inverted. A pre-fixed lower case n indicates low active signals (e.g. nSCS_C,  
nSCS_S). See chapter 6.2, too.  
2.3 Units of Motion Parameters  
The motion parameters position, velocity, and acceleration are given as integer values within TMC4210  
specific units. With a given stepper motor resolution one can calculate physical units for angle,  
angular velocity, angular acceleration. (See chapter 6.1.12)  
2.4 Representation of Signed Values by Two’s Complement  
Motion parameters which have to cover negative and positive motion direction are processed as  
signed numbers represented by two’s complement as usual. Limit motion parameters are represented  
as unsigned binary numbers.  
SIGNED MOTION PARAMETERS ARE:  
X_TARGET / X_ACTUAL / V_TARGET / V_ACTUAL / A_ACTUAL / A_THRESHOLD  
UNSIGNED MOTION PARAMETERS ARE:  
V_MIN / V_MAX / A_MAX  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
9
3 Package  
The TMC4210 is qualified for the industrial temperature range. The package is RoHS compilant.  
Order code  
Package Characteristics  
SSOP16 150 mils, 16 pins, plastic package, industrial (-40… +85°C)  
JEDEC Drawing  
MO-137 (150 mils)  
TMC4210-I  
3.1 Package Outline  
1
2
3
4
5
6
7
8
16  
Please refer to the application note  
PCB_Guidelines_TRINAMIC_packages  
for a practical guideline for all available TRINAMIC  
IC packages and PCB footprints. The application  
note covers package dimensions, example  
footprints and general information on PCB  
footprints for these packages. It is available on  
www.trinamic.com.  
REF_L  
GP_IN  
REF_R  
TEST  
n.c.  
15  
14  
13  
12  
11  
10  
9
GND  
V33  
V5  
CLK  
n.c.  
nSCS_C  
SCK_C  
SDI_C  
DIR_OUT  
STEP_OUT  
nINT_SDO_C  
SSOP16 (150 MILS)  
Figure 3.1 TMC4210 pin out  
3.2 Signal Descriptions  
Pin  
SSOP16 In/Out Description  
Reset  
-
-
Internal power-on reset.  
No external reset input pin is available.  
CLK  
nSCS_C  
SCK_C  
5
6
7
8
9
I
I
Clock input  
Low active SPI chip select input driven from µC  
Serial data clock input driven from µC  
Serial data input driven from µC  
I
SDI_C  
I
nINT_SDO_C  
O
Serial data output to µC input /  
Multiplexed nINTERRUPT output if communication with µC is idle (resp.  
nSCS_C = 1)  
SDO_C will never be high impedance  
n.c.  
12, 16  
11  
-
Leave open  
SCK_S  
SDO_S  
REF_L  
O
O
I
DIR output  
10  
STEP output  
1
Left reference/limit switch input. Pull to GND if not used.  
(no internal pull-up resistor)  
GP_IN  
REF_R  
2
3
I
I
General purpose input. Pull to GND if not used.  
(no internal pull-up resistor)  
Right reference/limit switch input. Pull to GND if not used.  
(no internal pull-up resistor)  
V5  
13  
14  
15  
4
+5V supply / +3.3V supply  
470nF ceramic capacitor pin / +3.3V supply  
Ground  
V33  
GND  
TEST  
I
Must be connected to GND as close as possible to the chip. No user function.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
10  
Attention  
-
Preferably, long wires to the reference switch inputs and the general purpose input should be  
avoided. For long wires, a low pass filter for spike suppression should be provided (refer the  
TMC4210 evaluation board schematic as example).  
-
All inputs are Schmitt-Trigger. Unused inputs (REF_L, REF_R, and GP_IN) need to be connected to  
ground. Unused reference switch inputs have to be connected to ground, too.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
11  
4 Sample Circuit  
This application example shows how to connect the TMC4210 motion controller with the processor  
and one out of TRINAMICs TMC260, TMC261, and TMC2660 stepper motor driver chips. These stepper  
motor driver chips have integrated MOSFETs. The TMC262 needs external power transistors.  
General purpose input  
Reference Switch Inputs  
active high  
GP_IN  
REF_L  
REF_R  
CLK  
CLK  
1K  
1K  
Output SDO_C  
will nerver be  
high impedance  
TMC4210-I  
SDO_C  
STEP_OUT  
DIR_OUT  
SDI_C  
SCK_C  
nSCS_C  
V33  
STEP  
DIR  
V5  
TEST GND  
TMC260  
TMC261  
TMC2660  
SDO  
SDI  
SCK  
CSN  
100nF  
Motor  
1K  
10K  
+5V  
CLK  
MISO  
MOSI  
SCK  
µC  
CSn_0  
CSn_1  
Figure 4.1 TMC4210 application environment with TMC260, TMC261 or TMC2660.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
12  
5 Control Interface  
The communication takes place via a four wire serial interface and 32 bit datagrams of fixed length.  
RESPONSIBILITIES ARE DEFINED AS FOLLOWS:  
-
-
-
The microcontroller is the master of the TMC4210. It initializes the motion controller and sets  
target values for velocity, acceleration, and positioning.  
The TMC4210 is the master of the stepper motor driver. The motion controller calculates, e.g.,  
ramp profiles for positioning. It sends step and direction signals to the stepper motor driver.  
The microcontroller initializes the stepper motor driver. Further, the microcontroller can read out  
status and error flags and thus make the diagnostics.  
AUTOMATIC POWER-ON RESET:  
-
-
The TMC4210 cannot be accessed before the power-on reset is completed and the clock is stable.  
All register bits are initialized with 0 during power-on reset, except the Step/Dir clock pre-devider  
STPDIV_4210 that is initialized with 15.  
5.1 Bus Signals  
Signal Description  
TMC4210  
SCK_C  
SDI_C  
SDO_C  
nSCS_C  
Microcontroller  
Bus clock input  
Serial data input  
Serial data output  
Chip select input  
5.2 Serial Peripheral Interface for µC  
The serial microcontroller interface of the TMC4210 acts as a 32 bit shift register.  
COMMUNICATION BETWEEN µC AND THE TMC4210  
1. The serial µC interface shifts serial data into SDI_C with each rising edge of the clock signal  
SCK_C.  
2. Then, it copies the content of the 32 bit shift register into a buffer register with the rising  
edge of the selection signal nSCS_C.  
3. The serial interface of the TMC4210 immediately sends back data read from registers or read  
from internal RAM via the signal SDO_C.  
4. The signal SDO_C can be sampled with the rising edge of SCK_C. SDO_C becomes valid at  
least four CLK clock cycles after SCK_C becomes low as outlined in the timing diagram.  
5.2.1 Timing  
A complete serial datagram frame has a fixed length of 32 bit. Because of on-the-fly processing of the  
input data stream, the serial µC interface of the TMC4210 requires the serial data clock signal SCK_C to  
have a minimum low / high time of three clock cycles. The SPI signals from the µC interface may be  
asynchronous to the clock signal CLK of the TMC4210.  
If the microcontroller and the TMC4210 work on different clock domains that run asynchronously by  
the timing of the SPI interface of the microcontroller should be made conservative in the way that  
the length of one SPI clock cycle equals 8 or more clock cycles of the TMC4210 clock CLK.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
13  
tCLK  
tDATAGRAMuC  
tSUCSC  
tHDCSC  
tSCKCL  
tSCKCH  
tHDCSC  
tSUCSC  
CLK  
nSCS_C  
SCK_C  
SDI_C  
tSD  
sdi_c_bit#31  
tSD  
sdi_c_bit#30 . . . sdi_c_bit#1  
tSD  
sdi_c_bit#0  
sdo_c_bit#0  
sdo_c_bit#0  
SDOZ_C  
sdo_c_bit#31  
sdo_c_bit#31  
sdo_c_bit#30 ... sdo_c_bit#1  
SDO_C  
(for TMC429-I)  
nINT  
sdo_c_bit#30 ... sdo_c_bit#1  
tPD  
nINT  
tIS  
tSI  
30 x sampled SDI_C  
1 x SDI_C sampled  
1 x SDI_C sampled  
one full 32 bit datagram  
Figure 5.1 Timing diagram of the serial µC interface  
EXPLANATORY NOTES  
-
-
-
-
While the data transmission from the microcontroller to the TMC4210 is idle, the low active serial  
chip select input nSCS_C and also the serial data clock signal SCK_C are set to high.  
While the signal nSCS_C is high, the TMC4210 assigns the status of the internal low active  
interrupt signal nINT to the serial data output SDO_C.  
The data signal SDI_C driven by the microcontroller has to be valid at the rising edge of the  
serial data clock input SCK_C. The maximum duration of the serial data clock period is unlimited.  
While the µC interface of the TMC4210 is idle, the SDO_C signal is the (active low) interrupt status  
nINT of the integrated interrupt controller of the TMC4210. The timing of the multiplexed  
interrupt status signal nINT is characterized by the parameters tIS and tSI (see chapter 13.3).  
The following SPI clock frequencies are recommended in order to avoid possible issues concerning  
the SPI frequency between microcontroller and TMC4210:  
- For fCLK = 16MHz an upper SPI clock frequency of 1MHz is recommended.  
- For fCLK = 32MHz an upper SPI clock frequency of 2MHz is recommended.  
PROCEDURE OF DATA TRANSMISSION  
1. The signal nSCS_C has to be high for at least three clock cycles before starting a datagram  
transmission. To initiate a transmission, the signal nSCS_C has to be set to low.  
2. Three clock cycles later the serial data clock may go low.  
3. 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.  
4. A data transmission is finished by setting nSCS_C high three or more CLK cycles after the last  
rising SCK_C slope.  
5. So, nSCS_C and SCK_C change in opposite order from low to high at the end of a data  
transmission as these signals change from high to low at the beginning.  
In contrast to most other SPI compatible devices, the serial data output SDO_C of the TMC4210-I is  
always driven. It will never be high impedance Z. If high impedance is required for the SDO_C  
connected to the microcontroller, it can be realized using a single gate 74HCT1G125.  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
14  
TIMING CHARACTERISTICS OF THE SERIAL MICROCONTROLLER INTERFACE  
Symbol  
tSUCSC  
tHDCSC  
tSCKCL  
tSCKCH  
tSD  
Parameter  
Min  
Typ  
Max  
Unit  
Setup Clocks for nSCS_C  
Hold Clocks for nSCS_C  
Serial Clock Low  
3
CLK periods  
CLK periods  
CLK periods  
CLK periods  
CLK periods  
CLK periods  
3
3
3
Serial Clock High  
3.5  
SDO_C valid after SCK_C low  
2.5  
tIS  
nINTERRUPT status valid after 2.5  
nSCS_C low  
tSI  
SDO_C valid after nSCS_C high  
Datagram Length  
4.5  
CLK periods  
CLK periods  
tDAMAGRAMuC  
tDAMAGRAMuC  
fCLK  
3+3+32*6= 198  
Datagram Length  
12.375  
0
µs  
MHz  
ns  
32  
Clock Frequency  
tCLK  
Clock Period tCLK = 1 / fCLK  
31.25  
tPD  
CLK-rising-edge-to-Output  
Propagation Delay  
5
ns  
5.2.2 Datagram Structure  
The µC communicates with the TMC4210 via the four wire serial interface. Each datagram sent to the  
TMC4210 via the pin SDI_C and each datagram received from the TMC4210 via the pin SDO_C is 32 bits  
long.  
The first bit sent is the most significant bit (MSB) sdi_c_bit#31. The last bit sent is the least significant  
bit (LSB) sdi_c_bit#0 (see Figure 5.1). During the reception of a datagram, the TMC4210 immediately  
sends back a datagram of the same length to the microcontroller. This return datagram consists of  
requested read data in the lower 24 datagram bits and status bits in the higher 8 datagram bits. A  
read request is distinguished from a write request by the read/not write datagram bit (RW).  
5.2.2.1 Datagrams Sent to the TMC4210  
The datagrams sent to the TMC4210 are assorted in four groups of bits:  
RRS  
ADDRESS  
RW  
The register RAM select (RRS) bit selects either registers or the on-chip RAM.  
Address bits address memory within the register set or within the RAM area.  
The read / not write (RW) bit distinguishes between read access and write access:  
read: RW = 1 / write RW = 0.  
DATA  
Data bits are only for write access. For read access these bits are not used (don’t  
care) and should be set to 0.  
32 BIT DATAGRAM SENT FROM µC TO THE TMC4210 VIA PIN SDI_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  
ADDRESS  
DATA  
NOTE  
-
Different internal registers of the TMC4210 have different lengths. For some registers only a  
subset of 24 data bits is used.  
-
-
Unused data bits should be set to 0.  
Some addresses select a couple of registers mapped together into the 24 data bit space.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
15  
5.2.2.2 Datagrams Received by µC from the TMC4210  
The datagrams received by the µC from the TMC4210 contain two groups of bits:  
STATUS BITS The status bits, sent back with each datagram, comprehend the most important  
internal status bits of the TMC4210 and the settings of the reference switches  
Data bits are only for write access.  
DATA BITS  
The most significant bit MSB is received first; the least significant bit LSB is received last. The TMC4210  
only sends datagrams on demand.  
32 BIT DATAGRAM SENT BACK FROM THE TMC4210 TO µC VIA PIN SDO_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  
STATUS BITS  
DATA BITS  
-
-
-
STATUS INFORMATION BITS  
INT  
The status bit INT is the internal high active interrupt controller status output  
signal. Handling of interrupt conditions without using interrupt techniques is  
possible by polling this status bit.  
The interrupt signal is available multiplexed with the SPI read back data at the  
nINT_SDO_C pin of the TMC4210. The pin nINT_SDO_C may additionally be  
connected to an interrupt input of the microcontroller. Do not set SDO_INT=1  
because this setting disables the SPI output.  
Since the SDO_C / nINT output on TMC4210-I is multiplexed, the microcontroller  
has to disable its interrupt input while it sends a datagram to the TMC4210. The  
SDO_C signal driven by the TMC4210 alternates during datagram transmission.  
R_L  
The status bit R_L represents the state of the left reference switch input (r_l).  
r_r is visible here only, while mot1R has not yet been set.  
R_R  
GP_IN  
The GP_IN status bit represents the setting of the general purpose input. Refer  
to chapter 6.1.10.2, too.  
xEQt1  
The status bit xEQt1 indicates for the stepper motor, if it has reached its target  
position.  
The status bits r_r, r_l, and gp_in and the bit xEQt1 can trigger an interrupt or enable simple polling  
techniques. See chapter 5.3, register 01 1110 for accessing the input bits.  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
16  
5.2.3 Simple Datagram Examples  
The % prefix normally indicating binary representation in this data sheet is omitted for the  
following datagram examples. Assuming, one would like to write (RW=0) to a register (RRS=0) at the  
address %001101 the following data word %0000 0000 0000 0001 0010 0011, one would have to send  
the following 32 bit datagram  
00011010000000000000000100100011  
to the TMC4210. With inactive interrupt (INT=0), no cover datagram waiting (CDGW=0), all reference  
switches inactive (RS3=0, RS2=0, RS1=0), and all stepper motors at target position (xEQt3=1, xEQt2=1,  
xEQt1=1) the status bits would be %10010101 the TMC4210 would send back the 32 bit datagram:  
10010101000000000000000000000000  
To read (RW=1) back the register written before, one would have to send the 32 bit datagram  
00011011000000000000000000000000  
to the TMC4210 and the TMC4210 would reply with the datagram  
10010101000000000000000100100011.  
Write (RW=0) access to on-chip RAM (RRS=1) to an address %111111 occurs similar to register access,  
but with RRS=1. To write two 6 bit data words %100001 and %100011 to successive pair-wise RAM  
addresses %1111110 and %1111111 (%100001 to %1111110 and %100011 to %1111111) which are  
commonly addressed by one datagram, one would have to send the datagram  
11111110000000000010001100100001.  
To read (rw=1) from that on-chip memory address, one would have to send the datagram  
11111111000000000000000000000000.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
17  
5.3 Register Mapping  
All register bits are initialized with 0 during power on reset, except the step pulse length setting that  
is initialized with 15. During power-up, the on-chip RAM of the TMC4210 is initialized internally and  
the chip does not send any datagrams to the stepper motor driver.  
CHANGING TARGET POSITION OR TARGET VELOCITY  
The stepper motor is controlled directly by writing motion parameters into associated registers. Only  
one register write access is necessary for changing a target motion parameter. Thus the  
microcontroller has to send one 32 bit datagram to the TMC4210 for altering the target position or the  
target velocity of the stepper motor.  
READ AND WRITE  
Read and write access is selected by the RW bit (sdi_c_bit#24) of the datagram sent from the µC to  
the TMC4210. The on-chip configuration RAM and the registers are writeable with read-back option.  
Some addresses are read-only. Write access (RW=0) to some of those read-only registers triggers  
additional functions, explained in detail later.  
TMC4210 REGISTER MAPPING  
32 BIT DATAGRAM SENT FROM µC TO THE TMC4210 VIA PIN SDI_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  
ADDRESS  
DATA  
SMDA  
IDX  
0 0 0 0  
0 0 0 1  
0 0 1 0  
0 0 1 1  
0 1 0 0  
0 1 0 1  
0 1 1 0  
0 0 0 1 1 1  
1 0 0 1  
1 0 1 0  
1 0 1 1  
1 1 0 0  
1 1 0 1  
1 1 1 0  
1 1 1 1  
JDX  
STEPPER MOTOR REGISTER SET (SMDA=00)  
X_TARGET  
X_ACTUAL  
V_MIN  
V_MAX  
V_TARGET  
V_ACTUAL  
A_MAX  
A_ACTUAL  
1
PMUL  
REF_CONF  
INTERRUPT_MASK  
PULSE_DIV RAMP_DIV  
DX_REF_TOLERANCE  
PDIV  
R_M  
lp  
INTERRUPF_FLAGS  
0
0
X_LATCHED  
USTEP_COUNT_4210  
GLOBAL PARAMETER REGISTERS (SMDA=11)  
IF_CONFIGURATION_4210  
0 1 0 0  
0 1 0 1  
0 1 1 0  
1 0 0 0  
1 0 0 1  
1 1 1 0  
POS_COMP_4210  
POS_COMP_INT_4210  
M
I
POWER-DOWN  
TYPE_VERSION (= $429101 for TMC4210, read-only)  
1 1  
gp  
_in  
r_l r_r  
-
-
-
STPDIV_4210  
0 0 0 0 0 0 00  
1 1 1 1  
0
0 0 0 0 0  
SMDA  
R_ M  
Stepper motor driver address  
r_l, r_r, gp_in Left switch / right switch / general  
purpose input (read out)  
RAMP_MODE mask  
I
Interrupt  
Unused bits  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
18  
6 Register Description  
The TMC4210 provides axis parameter registers and global parameter registers.  
6.1 Axis Parameter Registers  
The registers hold binary coded numbers. Some are unsigned (positive) numbers, some are signed  
numbers in two’s complement, and some are control bits or single flags. The functionality of different  
registers depends on the RAMP_MODE (refer to chapter 6.1.10).  
OVERVIEW AXIS PARAMETER REGISTER MAPPING  
REGISTER  
R / W TYPE  
DESCRIPTION  
X_TARGET  
R/W  
24 bit  
unsigned  
24 bit  
unsigned  
11 bit  
unsigned  
11 bit  
This register holds the current target position in units of  
microsteps.  
The current position of each stepper motor is available by read  
out of this register.  
This register holds the absolute velocity value at or below which  
the stepper motor can be stopped abruptly.  
This parameter sets the maximum motor velocity.  
R/W*2  
R/W  
X_ACTUAL  
V_MIN  
V_MAX  
R/W  
unsigned  
V_TARGET  
V_ACTUAL  
A_MAX  
R/W  
12 bit signed The V_TARGET register holds the current target velocity. The use  
of V_TARGET depends on the chosen mode of operation.  
12 bit signed This read-only register holds the current velocity of the stepper  
motor.  
R*1  
R/W  
11 bit  
This register defines the absolute value of the desired  
acceleration for velocity_mode and ramp_mode (resp. soft_mode)  
with a value range from 0 to 2047.  
unsigned  
A_ACTUAL  
R
11 bit  
unsigned  
1+7 bit  
4 bit  
The actual acceleration can be read out by the microcontroller  
from the A_ACTUAL read-only register.  
These values form a floating point number with PMUL as  
mantissa and PDIV as exponent. PMUL and PDIV are used for  
calculating the deceleration ramp.  
PMUL  
PDIV  
R/W  
R/W  
unsigned  
RAMP_MODE  
REF_CONF  
lp  
R/W  
R/W  
R
2 bit  
4 bit  
1 bit  
The two bits RAMP_MODE (R_M) select one of the four possible  
modes of operation.  
The configuration bits REF_CONF select the behavior of the  
reference switches.  
The bit called lp (latched position) is a read only status bit.  
The TMC4210 provides one interrupt register of eight flags for  
the stepper motor.  
The parameter RAMP_DIV scales the acceleration parameter  
A_MAX.  
The pulse generator clock defining the maximum step pulse  
rate is determined by the parameter PULSE_DIV. The parameter  
PULSE_DIV scales the velocity parameters.  
INTERRUPT_MASK  
INTERRUPT_FLAGS  
RAMP_DIV  
R/W  
R/W  
R/W  
R/W  
R/W  
8 bit  
8 bit  
4 bit  
4 bit  
2 bit  
PULSE_DIV  
DX_REF_TOLERANCE  
X_LATCHED  
R/W  
R
12 bit  
DX_REF_TOLERANCE excludes a motion range to allow motion  
near the reference position.  
This read-only register stores the actual position X_ACTUAL upon  
a change of the reference switch state.  
24 bit  
unsigned  
USTEP_COUNT_4210  
R/W  
8 bit  
The read-write register USTEP_COUNT_4210 holds the actual  
microstep pointer of the internal sequencer.  
1
*
*
in hold_mode only, this register is a read-write register.  
2
before overwriting X_ACTUAL choose velocity_mode or hold_mode. Refer to chapter 6.1.2.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
19  
6.1.1 X_TARGET (IDX=%0000)  
This register holds the current target position in units of microsteps.  
UNIT OF TARGET POSITION  
The unit of the target position depends on the setting of the associated microstep resolution register  
usrs.  
POSITIONING  
-
If the difference X_TARGET to X_ACTUAL is not zero and R_M = ramp_mode or soft_mode, the  
TMC4210 moves the stepper motor in the direction of X_TARGET in order to position X_ACTUAL to  
X_TARGET. Usually X_TARGET is modified to start a positioning.  
-
-
-
The condition | X_TARGET X_ACTUAL | < 223 must be satisfied for motion into correct direction.  
Target position X_TARGET and current position X_ACTUAL may be altered on the fly.  
To move from one position to another, the ramp generator of the TMC4210 automatically  
generates ramp profiles in consideration of the velocity limits V_MIN and V_MAX and acceleration  
limit A_MAX.  
The registers X_TARGET, X_ACTUAL, V_MIN, V_MAX, and A_MAX are initialized with zero after power up.  
6.1.2 X_ACTUAL (IDX=%0001)  
The current position of the stepper motor is available by read out of the registers called X_ACTUAL.  
The actual position can be overwritten by the microcontroller. This feature is important for the  
reference switch position calibration controlled by the microcontroller.  
UNIT OF CURRENT POSITION  
The unit of the target position depends on the setting of the associated microstep resolution register  
usrs.  
Attention  
Before overwriting X_ACTUAL choose velocity_mode or hold_mode.  
If X_ACTUAL is overwritten in ramp_mode or soft_mode the motor directly drives to X_TARGET.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
20  
6.1.3 V_MIN (IDX=%0010)  
This register holds the absolute velocity value at or below which the stepper motor can be stopped  
abruptly.  
UNIT OF VELOCITY  
The unit of velocity parameters is steps per time unit. The scale of velocity parameters (V_MIN, V_MAX,  
V_TARGET, V_ACTUAL) is defined by the parameter PULSE_DIV (see page 6.1.12 for details) and depends  
on the clock frequency of the TMC4210.  
DECELERATION  
-
-
-
The parameter V_MIN is relevant for deceleration while reaching a target position. V_MIN should  
be set greater than zero.  
This control value allows reaching the target position faster because the stepper motor is not  
slowed down below V_MIN before the target is reached.  
Due to the finite numerical representation of integral relations the target position cannot be  
reached exactly, if the calculated velocity is less than one, before the target is reached. Setting  
V_MIN to at least one assures reaching each target position exactly.  
v(t)  
-
A
X
-
_
A
A
M
M
X
_
A
Δv  
_
A
M
X
A
M
A
Δv  
_
X
A
t
Δt01  
t2  
t3 t4  
t5  
t6  
t7 t8  
t0  
t1  
Δt56  
acceleration  
constant velocity  
deceleration  
acceleration deceleration  
Figure 6.1 Velocity ramp parameters and velocity profiles  
6.1.4 V_MAX (IDX=%0011)  
This parameter sets the maximum motor velocity. The absolute value of the velocity will not exceed  
this limit, except if the limit V_MAX is changed during motion to a value below the current velocity.  
UNIT OF VELOCITY  
The unit of velocity parameters is steps per time unit. The scale of velocity parameters (V_MIN, V_MAX,  
V_TARGET, V_ACTUAL) is defined by the parameter PULSE_DIV (see page 6.1.12 for details) and depends  
on the clock frequency of the TMC4210.  
HOMING PROCEDURE  
To set target position X_TARGET and current position X_ACTUAL to an equivalent value (e.g. to set  
both to zero at a reference point) the stepper motor should be stopped first and the parameter V_MAX  
should be set to zero to hold the stepper motor at rest before writing into the register X_TARGET and  
X_ACTUAL.  
Attention  
Before overwriting X_ACTUAL choose velocity_mode or hold_mode.  
If X_ACTUAL is overwritten in ramp_mode or soft_mode the motor directly drives to X_TARGET.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
21  
6.1.5 V_TARGET (IDX=%0100)  
The use of V_TARGET depends on the chosen mode of operation:  
Mode of operation  
Functionality of V_TARGET  
ramp_mode  
The V_TARGET register holds the current target velocity calculated internally  
by the ramp generator.  
velocity_mode  
A target velocity can be written into the V_TARGET register. The stepper  
motor accelerates until it reaches the specified target velocity. The velocity is  
changed according to the motion parameter limits if the register V_TARGET is  
changed.  
hold_mode  
soft_mode  
The register V_TARGET is ignored.  
The V_TARGET register holds the current target velocity calculated internally  
by the ramp generator.  
UNIT OF VELOCITY  
The unit of velocity parameters is steps per time unit. The scale of velocity parameters (V_MIN, V_MAX,  
V_TARGET, V_ACTUAL) is defined by the parameter PULSE_DIV (see chapter 6.1.12 for details) and  
depends on the clock frequency of the TMC4210.  
6.1.6 V_ACTUAL (IDX=%0101)  
This read-only register holds the current velocity of the associated stepper motor. Internally, the ramp  
generator of the TMC4210 processes with 20 bits while only 12 bits (the most significant bits) can be  
read out as V_ACTUAL.  
In hold_mode only, this register is a read-write register. Writing zero to the register V_ACTUAL  
immediately stops the associated stepper motor, because hidden bits are set to zero with each write  
access to the register V_ACTUAL. In hold_mode motion parameters are ignored and the  
microcontroller has the full control to generate a ramp. The TMC4210 only handles the microstepping  
and datagram generation for the associated stepper motor.  
UNIT  
The unit of velocity parameters is steps per time unit. The scale of velocity parameters (V_MIN, V_MAX,  
V_TARGET, and V_ACTUAL) is defined by the parameter PULSE_DIV (see chapter 6.1.12 for details) and  
depends on the clock frequency of the TMC4210.  
An actual velocity of zero read out by the microcontroller means that the current velocity is in an  
interval between zero and one. Therefore the actual velocity should not be used to detect a stop of  
the stepper motor. It is advised to detect the target_reached flag instead.  
6.1.7 A_MAX (IDX=%0110)  
This register defines the absolute value of the desired acceleration for velocity_mode and ramp_mode  
(resp. soft_mode) with a value range from 0 to 2047.  
Note  
The motion controller cannot stop the stepper motor if A_MAX is set to zero on the fly because  
afterwards the velocity cannot be changed automatically any more.  
UNIT  
The unit of the acceleration is change of step frequency per time unit divided by 256. The scale of  
acceleration parameters (A_MAX, A_ACTUAL, and A_THRESHOLD) is defined by the parameter RAMP_DIV  
(see section 6.1.12) and depends on the clock frequency of the TMC4210.  
6.1.7.1 A_MAX in ramp_mode  
As long as RAMP_DIV PULSE_DIV 1 is valid, any value of A_MAX within its range (0… 2047) is  
allowed and there exists a valid pair {PMUL, PDIV} for each A_MAX. The reason is that the acceleration  
scaling determined by RAMP_DIV is compatible with the step velocity scaling determined by  
PULSE_DIV. A large RAMP_DIV stands for low acceleration and a large PULSE_DIV stands for low  
velocity. Low acceleration is compatible with low speed and high speed as well, but high acceleration  
is more compatible with high speed.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
22  
Changing one parameter out of the triple {A_MAX, RAMP_DIV, PULSE_DIV} requires re-calculation of the  
parameter pair {PMUL, PDIV} to update the associated register. For description of the parameters PMUL  
and PDIV see section 6.1.9.  
6.1.7.1.1 Deceleration in ramp_mode and soft_mode  
If RAMP_DIV and PULSE_DIV differ more than one while deceleration in ramp_mode or soft_mode the  
parameter A_MAX needs to have a lower limit (>1) and an upper limit (<2047). The reason is that the  
deceleration ramp is internally limited to 219 steps (respectively microsteps).  
THE LOWER LIMIT OF A_MAX IS GIVEN BY  
퐴_푀퐴푋퐿푂푊퐸푅_퐿퐼ꢁ퐼푇 = 2(푅ꢂꢁ푃_퐷퐼푉−푃푈퐿푆퐸_퐷퐼푉−ꢃ)  
ꢄꢅ48  
-
-
With V_MAX set to  
(1448) or lower the A_MAXLOWER_LIMIT is half of this value.  
ꢄ  
If RAMP_DIV PULSE_DIV 1 0 the limit A_MAXLOWER_LIMIT is 1 and the parameter A_MAX may be  
set to 1.  
THE UPPER LIMIT OF A_MAX IS GIVEN BY  
퐴_푀퐴푋푈푃푃퐸푅_퐿퐼ꢁ퐼푇 = 2(푅ꢂꢁ푃_퐷퐼푉−푃푈퐿푆퐸_퐷퐼푉+ꢃꢄ) - 1  
-
If RAMP_DIV PULSE_DIV + 1 0 the A_MAX_UPPER_LIMIT is > 2048 and the parameter A_MAX  
might be set to any value up to 2047.  
CONDITIONS  
The parameter A_MAX must not be set below A_MAXLOWER_LIMIT except A_MAX is set to 0. The condition  
A_MAX A_MAXLOWER_LIMIT as well as A_MAX A_MAXUPPER_LIMIT must be satisfied to reach any target  
position without oscillations. If that condition is not satisfied, oscillations around a target position  
may occur.  
6.1.8 A_ACTUAL (IDX=%0111)  
The actual acceleration can be read out by the microcontroller from the A_ACTUAL read-only register.  
The actual acceleration is used to select scale factors for the coil currents. It is updated with each  
clock. The returned value A_ACTUAL is smoothed to avoid oscillations of the readout value. Thus,  
returned A_ACTUAL values should not be used directly for precise calculations.  
UNIT  
The unit of the acceleration is change of step frequency per time unit divided by 256. The scale of  
acceleration parameters (A_MAX, A_ACTUAL, and A_THRESHOLD) is defined by the parameter RAMP_DIV  
(see section 6.1.12) and depends on the clock frequency of the TMC4210.  
6.1.9 PMUL & PDIV (IDX=%1001)  
In ramp mode, the TMC4210 uses an internal algorithm to calculate the deceleration ramp on the fly.  
This algorithm requires an additional proportionality factor P which allows the TMC4210 to calculate  
the velocity required for stopping in time to exactly reach the target position without overshooting.  
This calculation is done for each ramp step. The result of this calculation can be read in the register  
V_TARGET. Whenever V_TARGET falls below the actual velocity, the TMC4210 decelerates. As there is a  
large range of acceleration and velocity values, p is stored in a floating point representation, using  
the registers PMUL (mantissa) and PDIV (exponent).  
Using the proportionality factor P target positions are quickly reached without overshooting. The  
proportionality factor primarily depends on the acceleration limit A_MAX and on the two clock divider  
parameters PULSE_DIV and RAMP_DIV. These two separate clock divider parameters (set to the same  
value for most applications) provide an extremely wide dynamic range for acceleration and velocity.  
PULSE_DIV and RAMP_DIV allow reaching very high velocities with very low acceleration.  
Changing one parameter out of the triple {A_MAX, RAMP_DIV, PULSE_DIV} requires re-calculation of the  
parameter pair {PMUL, PDIV} to update the associated register.  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
23  
6.1.9.1 Calculation of the Proportionality Factor p  
The representation of the proportionality factor p by the two parameters PMUL and PDIV is a floating  
point representation.  
NOTATIONS  
Registers are PMUL and PDIV.  
Operating values are PMUL and PDIV.  
CALCULATE P AS FOLLOWS:  
ꢁ푈퐿  
푝 =  
퐷퐼푉  
with  
PMUL = 128… 255 representing a factor of 1.000 to 1.992 (=1+127/128)  
PDIV = {23, 24, 25… 214, 215, 216}  
PMUL ranges from 128 to 255. PDIV is a power of two with a range from 8 to 65536. Values of p less  
than 128 can be achieved by increasing PDIV.  
The TMC4210 does not directly store the PDIV parameter. The motion controller stores PDIV with  
퐷퐼푉 = 2ꢇ+푃퐷퐼푉  
NOTE  
-
-
Setting the factor p too small will result in a slow approach to the target position.  
Setting the factor p too large will cause overshooting and even oscillations around the target  
position.  
-
The parameters PMUL and PDIV share the address IDX=%1001. The MSB of PMUL is fixed set to 1  
and cannot be changed. This way, PMUL represents a mantissa in the range 1.000 (%1000 0000)  
to 1.992 (%1111 1111).  
PMUL  
PDIV  
V_MIN  
V_MAX  
A_MAX  
X_TARGET  
V_TARGET  
V_ACTUAL  
Target Position  
Calculation  
Velocity Ramp  
Generator  
(Micro-) Step pulses  
Puls Generator  
X_ACTUAL  
clk32  
RAMP_DIV  
PULSE_DIV  
clk  
CLOCK_DIV32  
Figure 6.2 Target position calculation, ramp generator, and pulse generator  
6.1.9.1.1 Calculation of p for a Given Acceleration  
p and the fitting PMUL and PDIV values can be calculated by the microcontroller. Optionally a pair of  
matching values of A_MAX, PMUL and PDIV can be stored into the microcontroller memory. The  
acceleration limit is a stepper motor parameter which is fixed in most applications. If the acceleration  
limit has to be changed nevertheless, the microcontroller can calculate a pair of PMUL and PDIV on  
demand for each new acceleration limit A_MAX with RAMP_DIV and PULSE_DIV. Also, pre-calculated  
pairs of PMUL and PDIV read from a table can be sufficient.  
6.1.9.2 Calculation of PMUL and PDIV  
A pair of PMUL and PDIV has to be calculated for each provided acceleration limit A_MAX. Note, that  
there may be more than one valid pair of PMUL and PDIV for a given A_MAX acceleration limit.  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
24  
CONSIDERATIONS FOR THE CALCULATION OF PMUL AND PDIV  
-
To accelerate, the ramp generator accumulates the acceleration value to the actual velocity with  
each time step.  
-
The absolute value V_MAX of the velocity internally is represented by 11+8=19 bits, while only the  
most significant 11 bits and the sign are used as input for the step pulse generator. So, there are  
211=2048 values possible for specifying a velocity within a range of 0 to 2047.  
The ramp generator accumulates 1/256*A_MAX with each time step to the actual velocity value  
V_ACTUAL during acceleration phases. This accumulation uses 8 bits for decimals. So, the  
acceleration from a velocity V_ACTUAL=0 to the maximum possible velocity V_MAX=2047 spans  
over 2048*256 / A_MAX pulse generator clock pulses.  
-
-
-
Within the acceleration phase the pulse generator generates S = ½ * 2048* 256 / A_MAX * T steps  
for the (micro) step unit.  
The parameter T is the clock divider ratio: T = 2RAMP_DIV/ 2PULSE_DIV= 2RAMP_DIVPULSE_DIV  
During the acceleration, the velocity has to be increased until the velocity limit V_MAX is reached or  
deceleration is required in order to exactly reach the target position. The TMC4210 automatically  
determines the deceleration position in ramp_mode and decelerates. This calculation uses the  
difference between current position and target position and the proportionality parameter p, which  
has to be p = 2048 / S.  
The following formula results:  
20ꢈꢉ  
푝 =  
1
256  
ꢁꢂꢋ  
ꢊ ∗ 20ꢈꢉ ∗  
2
ꢌ ∗ 2푅ꢂꢁ푃_퐷퐼푉−푃푈퐿푆퐸_퐷퐼푉  
This can be simplified to  
퐴_푀퐴푋  
12ꢉ ∗ 2푅ꢂꢁ푃_퐷퐼푉−푃푈퐿푆퐸_퐷퐼푉  
푝 =  
HINTS  
-
To avoid overshooting, the parameter PMUL should be made approximately 1% smaller than  
calculated. Alternatively set p reduced by an amount of 1%.  
-
If the proportionality parameter p is too small, the target position will be reached slower,  
because the slow down ramp starts earlier. The target position is approached with minimal  
velocity V_MIN, whenever the internally calculated target velocity becomes less than V_MIN.  
With a good parameter p the minimal velocity V_MIN is reached a couple of steps before the  
target position.  
With parameter p set a little bit too large and a small V_MIN overshooting of one step  
(respectively one microstep) may occur. A decrement of the parameter PMUL avoids this one-step  
overshooting.  
-
-
v(t)  
V_MAX  
p
p
g
t
o
o
o
o
d
l
a
r
g
e
v  
V_MIN  
t0  
t1  
t2  
Figure 6.3 Proportionality parameter p and outline of velocity profile(s)  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
25  
6.1.9.2.1 Choosing a Pair of PMUL and PDIV  
The calculation is based on the formula  
ꢁ푈퐿  
퐷퐼푉  
ꢆ푀ꢍꢎ  
2ꢇ+푃퐷퐼푉  
푝 =  
=
CALCULATIONS  
1. To represent the parameter p choose a pair of PMUL and PDIV which approximates p.  
2. Value range for PMUL:  
3. Value range for PDIV:  
128… 255  
one out of {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} (representing PDIV  
one out of {8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32786, 65536})  
4. Try all 128 * 14 = 1792 possible pairs of PMUL and PDIV with a program and choose a matching  
pair.  
5. To find a pair, calculate for each pair of PMUL and PDIV  
ꢂ_ꢁꢂꢋ  
ꢏꢐꢑꢒ_ꢓꢔꢕꢖꢒꢗꢘꢙꢚ_ꢓꢔꢕ  
푝 =  
and  
ꢃꢄ8∗ꢄ  
푃ꢁ푈퐿  
ꢛꢜꢒꢓꢔꢕ  
ꢑꢗꢘ  
=  
=
and  
ꢓꢔꢕ  
′  
푞 =  
6. Select one of the pairs satisfying the condition 0.95 < q < 1.0. The value q interpreted as a  
function q(a_max, ramp_div, pulse_div, pmul, pdiv) gives the quality criterion required.  
Although q = 1.0 indicates that the chosen P_MUL and P_DIV perfectly represent the desired p factor  
for a given A_MAX, overshooting could result because of finite numerical precision. On the other hand  
in case of high resolution microstepping, overshooting of one microstep is negligible in most  
applications.  
To avoid overshooting, use P_MUL-1 instead of the selected P_MUL or select a pair (P_MUL, P_DIV)  
with q = 0.99.  
6.1.9.2.2 Optimized Calculation of PMUL and PDIV  
The calculation of the parameters PMUL and PDIV can be simplified using the expression  
ꢂ_ꢁꢂꢋ  
ꢏꢐꢑꢒ_ꢓꢔꢕꢖꢒꢗꢘꢙꢚ_ꢓꢔꢕ  
ꢆ푀ꢍꢎ = 푝 ∗ 2∗ 2푃퐷퐼푉  
with  
푝 =  
ꢃꢄ8∗ꢄ  
To avoid overshooting, use  
푟푒푑푢푐푒푑 = 푝 ∗ (1 ꢝ 푝푟푒푑푢푐푡푖표[%]) with p_reduction approximately 1%  
This results in:  
ꢆ푀ꢍꢎ = 푝푟푒푑푢푐푒푑 ∗ 2∗ 2푃퐷퐼푉 = 0.99 ∗ 푝 ∗ 2∗ 2푃퐷퐼푉  
PMUL becomes a function of the parameter PDIV. To find a valid pair {PMUL, PDIV} choose one out of  
14 pairs for PDIV = {0, 1, 2, 3, ..., 13} with PMUL within the valid range 128 PMUL 255.  
The C language example pmulpdiv.c can be found on www.trinamic.com. The source code can directly  
be copied from the PDF datasheet file.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
26  
6.1.9.2.3 Calculation Example: PMUL and PDIV  
/* PROGRAM EXAMPLE ‘pmulpdiv.c’ : How to Calculate p_mul & p_div for the TMC4210 */  
#include <math.h>  
#include <stdio.h>  
#include <stdlib.h>  
#include <string.h>  
void CalcPMulPDiv(int a_max, int ramp_div, int pulse_div, float p_reduction,  
int *p_mul, int *p_div, double *PIdeal, double *PBest, double *PRedu )  
{
int  
pdiv, pmul, pm, pd ;  
double p_ideal, p_best, p, p_reduced;  
pm=-1; pd=-1; // -1 indicates : no valid pair found  
p_ideal  
p
= a_max / (pow(2, ramp_div-pulse_div)*128.0);  
= a_max / ( 128.0 * pow(2, ramp_div-pulse_div) );  
p_reduced = p * ( 1.0 p_reduction );  
for (pdiv=0; pdiv<=13; pdiv++)  
{
pmul = (int)(p_reduced * 8.0 * pow(2, pdiv)) 128;  
if ( (0 <= pmul) && (pmul <= 127) )  
{
pm = pmul + 128;  
pd = pdiv;  
}
}
*p_mul = pm;  
*p_div = pd;  
p_best = ((double)(pm)) / ((double)pow(2,pd+3));  
*PIdeal = p_ideal;  
*PBest = p_best;  
*PRedu = p_reduced;  
}
int main(int argc, char **argv)  
{
int a_max=0, ramp_div=0, pulse_div=0, p_mul, p_div,  
a_max_lower_limit=0, a_max_upper_limit=0;  
double pideal, pbest, predu;  
float p_reduction=0.0;  
char **argp;  
if (argc>1)  
{
while (argv++, argc--)  
{
argp = argv + 1;  
if (*argp==NULL) break;  
if ( (!strcmp(*argv,”-a”)) ) sscanf(*argp,”%d”,&a_max);  
else if ( (!strcmp(*argv,”-r”)) ) sscanf(*argp,”%d”,&ramp_div);  
else if ( (!strcmp(*argv,”-p”)) ) sscanf(*argp,”%d”,&pulse_div);  
else if ( (!strcmp(*argv,”-pr”))) sscanf(*argp,”%f”,&p_reduction);  
}
}
else  
{
fprintf(stderr,”\n USAGE : pmulpdiv a <a_max> -r <ramp_div> -p <pulse_div> -pr <0.00 .. 0.10>\n”  
EXAMPLE : pmulpdiv a 10 r 3 p 3 pr 0.05\n”);  
return 1;  
}
printf(“\n\n a_max=%d\tramp_div=%d\tpulse_div=%d\tp_reduction=%f\n\n”,  
a_max, ramp_div, pulse_div, p_reduction);  
CalcPMulPDiv(a_max, ramp_div, pulse_div, p_reduction, &p_mul, &p_div, &pideal, &pbest, &predu );  
printf(“ p_mul = %3.3d\n p_div = %3d\n\n p_ideal = %f\n p_best = %f\n p_redu = %f\n\n”,  
p_mul, p_div, pideal, pbest, predu);  
a_max_lower_limit = (int)pow(2,(ramp_div-pulse_div-1));  
printf(“\n a_max_lower_limit = %d”,a_max_lower_limit);  
if (a_max < a_max_lower_limit) printf(“  
[WARNING: a_max < a_max_lower_limit]”);  
a_max_upper_limit = ((int)pow(2,(12+(ramp_div-pulse_div)))) -1;  
printf(“\n a_max_upper_limit = %d”,a_max_upper_limit);  
if (a_max > a_max_upper_limit) printf(“  
[WARNING: a_max > a_max_upper_limit]”);  
printf(“\n\n”);  
return 0;  
}
/* -------------------------------------------------------------------------- */  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
27  
6.1.10 lp, RAMP_MODE, and REF_CONF (IDX=%1010)  
The configuration words REF_CONF and RAMP_MODE are accessed via a common address.  
LP, RAMP_MODE, AND REF_CONF  
Bit or Register  
Function  
RAMP_MODE  
The two bits RAMP_MODE (R_M) select one of the four possible stepping  
modes.  
lp  
The bit called lp (latched position) is a read only status bit.  
The configuration bits REF_CONF select the behavior of the reference switches.  
REF_CONF  
6.1.10.1 RAMP_MODE Register  
TMC4210 MOTION MODES  
RAMP_MODE bits  
Mode  
Function  
Default mode for positioning applications with trapezoidal  
ramp. This mode is provided as default mode for positioning  
tasks.  
%00  
ramp_mode  
Similar to ramp_mode, but with soft target position  
approaching. The target position is approached with  
exponentially reduced velocity. This feature can be useful for  
applications where vibrations at the target position have to be  
minimized.  
%01  
soft_mode  
Mode for velocity control applications, change of velocities with  
linear ramps. This mode is for applications, where stepper  
motors have to be driven precisely with constant velocity.  
The velocity is controlled by the microcontroller, motion  
parameter limits are ignored. This mode is provided for motion  
control applications, where the ramp generation is completely  
controlled by the microcontroller.  
%10  
%11  
velocity_mode  
hold_mode  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
28  
6.1.10.2 The REF_CONF Register and the lp Read-Only Status Bit  
A reference switch can be used as an automatic stop switch. The reference switch indicates the  
reference position within a given tolerance. The automatic stop function of the switches can be  
enabled or disabled. Also a reference tolerance range (see register DX_REF_TOLERANCE, chapter 0) can  
be programmed to allow motion within the reference switch active range during homing.  
When a reference switch is triggered, the actual position can be stored automatically. This allows a  
precise determination of the reference point. It is initiated by writing a dummy value to the register  
X_LATCHED (see chapter 6.1.14). The read-only status bit lp (latch position waiting) indicates that the  
next change of the selected reference switch will trigger latching the position X_ACTUAL. The lp bit is  
automatically reset after position latching.  
Motor  
Left switch  
Right switch  
Traveller  
xleft  
xright  
xtraveler  
x1  
x2  
x3  
x4  
Negative direction  
Positive direction  
Mechanical inaccuracy of switches  
(switching hysteresis)  
DX_REF_TOLERANCE  
Figure 6.4 Left switch and right switch for reference search and automatic stop function  
The bits contained in the REF_CONF register control the semantic and the actions of the reference/stop  
switch modes for interrupt generation as explained later. The stepper motor stops if the  
reference/stop switch becomes active. This mechanism reacts only to the switch which corresponds to  
the actual motion direction, e.g. the right switch when moving to a more positive position. The  
configuration bits named disable_stop_l respectively disable_stop_r disable these automatic stop  
functions. If the bit soft_stop is set, the motor stops with linear ramp as determined by A_MAX.  
REFERENCE SWITCH CONFIGURATION BITS REF_CONF AND LP STATUS BIT  
REF_CONF mnemonic  
Function  
0 :  
The motor will be stopped when the velocity is negative  
(V_ACTUAL < 0) and the left reference switch becomes active.  
Left reference switch is disabled as an automatic stop switch.  
Stops the motor if the velocity is positive (V_ACTUAL > 0) and the  
right reference switch becomes active.  
disable_stop_l  
1 :  
0 :  
disable_stop_r  
soft_stop  
1 :  
0 :  
Right reference switch is disabled as an automatic stop switch.  
Stopping takes place immediately; motion parameter limits are  
ignored.  
1 :  
Stopping takes place in consideration of motion parameter limits;  
stops with linear ramp.  
The bit ref_RnL (reference switch Right not Left) defines which  
switch will be used as the reference switch.  
The definition of the reference switch by the configuration bit  
ref_RnL has no effect on the stop function of the reference  
switches if disable_stop_l = 0 respectively disable_stop_r = 0.  
The left reference switch controls reference switch functions.  
The right (not left) reference switch controls reference switch  
functions.  
ref_RnL  
0 :  
1 :  
0 :  
1 :  
This is the power-on default of the lp (latched position waiting)  
bit.  
X_LATCHED has been initialized by a write access to latch the  
position on a change of the reference switch. It is set to 0 after a  
position has been latched.  
lp  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
29  
ATTENTION  
Per default there is only one switch available: REF_L is configured as left reference switch. For  
configuring REF_R as right switch, it is necessary to set the mot1r bit in the STEPPER MOTOR GLOBAL  
PARAMETER REGISTER to 1. Please refer to chapter 6.2.1.5 for further information.  
There is a functional difference between reference switches and stop switches. Reference switches are  
used to determine a reference position for the stepper motor. Stop switches are used for automatic  
stopping the motor when reaching a limit. The signals of switches are processed via the inputs REF_L  
and REF_R. They might be used as automatic stop switches, reference switches, or both.  
32 BIT DATAGRAM SENT FROM A µC TO THE TMC4210  
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  
ADDRESS  
DATA  
REF_CONF  
RAMP_  
MODE  
lp  
0 0 1 0 1 0  
0
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
30  
6.1.11 INTERRUPT_MASK & INTERRUPT_FLAGS (IDX=%1011)  
The TMC4210 provides one interrupt register of eight flags for the stepper motor.  
Interrupt bits are named int_<mnemonic>. The interrupt out nINT_SDO_C is set active low and the  
interrupt status bit int is set active high if at least one interrupt flag of the motor becomes set. If the  
interrupt status is inactive, nINT is high (1) and int is low (0).  
SETTING MASKS AND FLAGS  
-
-
An interrupt flag is set to 1 if its assigned interrupt condition occurs.  
Each interrupt bit can either be enabled or disabled (1/0) individually by an associated interrupt  
mask bit named mask_<mnemonic>.  
-
-
Interrupt flags are reset to 0 by a write access (RW=0) to their interrupt register address  
(IDX=%1011). Write 1 at the position of the bit to clear the flag. Writing a 0 to the corresponding  
position leaves the interrupt flag untouched.  
Interrupt flags are forced to 0 if the corresponding mask bit is disabled (0).  
INTERRUPT FLAGS  
int_<mnemonic>  
Function  
int_pos_end  
If a target position is reached while the interrupt mask mask_pos_end is 1,  
the bit is set to 1.  
int_ref_wrong  
Reference switch signal was active outside the reference switch tolerance  
range (defined by the DX_REF_TOLERANCE register).  
The switches processed via the inputs REF_L and REF_R can be used as stop  
switches for automatic motion limiting, as reference switches, and for both. If  
a reference switch becomes active out of the reference switch tolerance range  
the interrupt flag int_ref_wrong is set if the interrupt mask bit  
mask_ref_wrong is set.  
int_ref_miss  
int_stop  
The interrupt flag int_ref_miss is set if the reference switch is inactive at the 0  
position and the mask mask_ref_miss is enabled.  
The int_stop flag is set, if the reference switch has forced a stop during  
motion and if the interrupt mask mask_stop is set.  
int_stop_left_low  
High to low transition of left reference switch. The int_stop_left_low flag is  
set if the reference switch changes from high to low and if the interrupt mask  
bit mask_stop_left_low is set.  
int_stop_right_low  
int_stop_left_high  
int_stop_right_high  
High to low transition of right reference switch. The int_stop_right_low flag is  
set if the reference switch changes from high to low and if the interrupt mask  
bit mask_stop_right_low is set.  
Low to high transition of left reference switch. The int_stop_left_high flag  
indicates that the left reference switch input changes from low to high if the  
mask bit mask_stop_left_high is set.  
Low to high transition of right reference switch. The int_stop_right_high flag  
indicates that the right reference switch input changes from low to high if  
the mask bit mask_stop_right_high is set.  
INTERRUPT MASK BIT  
mask_<mnemonic>  
Function  
mask_pos_end  
mask_ref_wrong  
mask_ref_miss  
1: mask enabled; 0: mask disabled.  
1: mask enabled; 0: mask disabled.  
1: mask enabled; 0: mask disabled.  
1: mask enabled; 0: mask disabled.  
1: mask enabled; 0: mask disabled.  
1: mask enabled; 0: mask disabled.  
1: mask enabled; 0: mask disabled.  
mask_stop  
mask_stop_left_low  
mask_stop_right_low  
mask_stop_left_high  
mask_stop_right_high 1: mask enabled; 0: mask disabled.  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
31  
32 BIT DATAGRAM SENT FROM A µC TO THE TMC4210  
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  
ADDRESS  
1 0 1 1  
DATA  
INTERRUPT_MASK  
INTERRUPT_FLAGS  
0 0  
0
The interrupt status is mapped to the most significant bit (31) of each datagram sent back to the µC  
and it is only available at the nINT_SDO_C pin of the TMC4210 if the pin nSCS_C is high.  
De-multiplexing of the multiplexed interrupt status signal at the pin nINT_SDO_C can be done using  
additional hardware. It is not necessary if the microcontroller always disables its interrupt while it  
sends a datagram to the TMC4210.  
6.1.12 PULSE_DIV & RAMP_DIV (IDX=%1100)  
The frequency of the external clock signal (pin CLK) is divided by 32 (see Figure 6.2). This clock drives  
two programmable clock dividers: RAMP_DIV for the ramp generator and PULSE_DIV for the pulse  
generator.  
RAMP_DIV and PULSE_DIV allow a division of 1/32 fCLK by the following value settings:  
value  
division by  
0
1
1
2
2
4
3
8
4
16  
5
32  
6
64  
7
8
9
10  
11  
12  
13  
128 256 512 1024 2048 4096 8192  
PULSE_DIV  
RAMP_DIV  
The pulse generator clock defining the maximum step pulse rate is determined by  
the parameter PULSE_DIV. The parameter PULSE_DIV scales the velocity parameters.  
The parameter RAMP_DIV scales the acceleration parameter A_MAX.  
6.1.12.1 Calculating the Step Pulse Rate R  
[
]
퐻푍 ∗ 푣ꢟ푙ꢠꢡꢢꢣ푦  
퐶퐿퐾  
[
]
ꢞ 퐻푧 =  
2푃푈퐿푆퐸_퐷퐼푉 ∗ 20ꢈꢉ ∗ 32  
where  
fCLK[Hz] is the frequency of the external clock signal.  
velocity is in range 0 to 2047 and represents parameters V_MIN, V_MAX, and absolute values of  
V_TARGET and V_ACTUAL.  
The pulse generator of the TMC4210 generates one step pulse with each 1/(32*2^PULSE_DIV) clock  
pulse with a given theoretical velocity setting of 2048. [Attention: Range ±2047]  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
32  
The full step frequency RFS is given by  
[
]
ꢞ 퐻푍  
[
]
퐹푆 퐻푧 =  
2푈푆푅푆  
The change R in the pulse rate per time unit is given by  
[
]
[ ]  
퐻푍 ∗ 퐴_푀퐴푋  
퐶퐿퐾  
퐶퐿퐾  
퐻푍 ∗ 푓  
[
]
∆ꢞ 퐻푧/푠 =  
2푃푈퐿푆퐸_퐷퐼푉+푅ꢂꢁ푃_퐷퐼푉+ꢄꢤ  
where  
R:  
29:  
32  
pulse frequency change per second (acceleration)  
the constant is derived form 229 = 25 * 25 * 28 * 211 = 32*32*256*2048.  
comes from fixed clock pre-dividers,  
256  
2048  
comes from the velocity accumulation clock pre-divider, and  
comes from the velocity accumulation clock divider programmed by A_MAX. The parameter  
A_MAX is in range 0 to 2047.  
The change of fullstep frequency RFS in the pulse rate per time unit is given by  
[
]
ꢞ 퐻푍  
[
]
퐹푆 퐻푧 =  
2푈푆푅푆  
The angular velocity of a stepper motor can be calculated based on the full step frequency RFS[Hz] for  
a given number of full steps per rotation. Similarly, the angular acceleration of a stepper motor can  
be calculated based on the change of the full step frequency per second RFS[Hz].  
6.1.12.2 Calculating the Number of Steps During Linear Acceleration  
1
ꢄ  
ꢥ =  
2
where  
S = number of steps  
a = linear acceleration  
v = velocity  
With v = R[Hz] and a = R[Hz/s] one gets:  
1
2
ꢄ  
2푅ꢂꢁ푃_퐷퐼푉  
ꢥ =  
÷ 2ꢇ  
ꢁꢂꢋ 2푃푈퐿푆퐸_퐷퐼푉  
The number of full steps SFS during linear acceleration is given by  
2푢ꢧ푟ꢧ  
퐹푆  
=
Changing PULSE_DIV in velocity_mode or in hold_mode might force an internal microstep (with  
microstep resolution defined by usrs) depending on the actual microstep position. This behavior can  
be observed especially when the motor is at rest. In ramp_mode this does not occur.  
PULSE_DIV should only be changed in ramp_mode!  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
33  
6.1.13 DX_REF_TOLERANCE (IDX=%1101)  
Generally, the switch inputs REF_L and REF_R can be used as stop switches for automatic motion  
limiting and as reference switches defining a reference position for the stepper motor. To allow the  
motor to drive near the reference point, it is possible to exclude a motion range of steps from the  
stop switch function.  
The parameter DX_REF_TOLERANCE disables automatic stopping by a switch around the origin (see  
Figure 6.4). To use the DX_REF_TOLERANCE far from the origin, the actual position has to be adapted,  
e.g. by setting it to zero in the center of the tolerance range. Additionally, the parameter  
DX_REF_TOLERANCE affects interrupt conditions as described before (section 6.1.11).  
6.1.14 X_LATCHED (IDX=%1110)  
This read-only register stores the actual position X_ACTUAL upon a change of the reference switch  
state. The reference switch is defined by the bit ref_RnL of the configuration register 6.2.1.5. Writing a  
dummy value to the (read-only) register X_LATCHED initializes the position storage mechanism. The  
actual position is saved with the next rising edge or falling edge signal of the reference switch  
depending on the actual motion direction of the stepper motor. The actual position is latched when  
the switch defined as the reference switch by the ref_RnL bit changes (see chapter 1.5.4). The status  
bit lp signals, if latching of a position is pending. This way, a precise reference is available for  
homing.  
An event at the reference switch associated to the actual motion direction takes effect only during  
motion (when V_ACTUAL 0).  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
34  
6.2 Global Parameter Registers  
The registers addressed by RRS=0 with SMDA=%11 are global common parameter registers. To  
emphasize this difference, the address label JDX is used as index name instead of IDX (see overview  
in chapter 5.3).  
OVERVIEW GLOBAL PARAMETER REGISTER MAPPING  
REGISTER  
DESCRIPTION  
IF_CONFIGURATION_4210 This register is used for configuration of  
-
-
-
the reference switch inputs  
the Step/Dir interface  
the association of the position compare output signal to one stepper motor  
STEPPER MOTOR GLOBAL This register holds configuration bits for the stepper motor driver chain and defines  
PARAMETER REGISTER  
-
-
timing  
reference switch adjustments  
6.2.1 IF_CONFIGURATION_4210 (JDX=%0100)  
The register IF_CONFIGURATION_4210 is the interface configuration register for the TMC4210. It is used  
for configuration of  
-
-
-
the reference inputs  
the interrupt output  
the Step/Dir interface  
INTERFACE CONFIGURATION REGISTER CONTROL BITS  
IF_CONFIGURATION_4210 Function  
inv_ref  
Invert common polarity for all reference switches. If this bit is set, a low level  
on the input signals an active reference switch.  
step_half  
Toggle on each step pulse (this halfs the step frequency, both pulse edges  
represent steps). step_half reduces the required step pulse bandwidth and is  
useful if for low-bandwidth optocouplers. This function can be used for the  
TMC262 stepper driver.  
inv_stp  
inv_dir  
Invert step pulse polarity. This configuration can be used for adaption of the  
step polarity to external driver stage.  
Invert step pulse polarity. This is for adaption to external driver stages.  
Alternatively, this can be used as a shaft bit to adjust the direction of motion  
for the motor, but do not use this as a direction bit because it has no effect  
on the internal handling of signs (X_ACTUAL, V_ACTUAL).  
en_sd  
Enable the Step/Dir interface by setting this bit to 1 (EN_SD=1).  
Note: The step pulse timing (length) must be compatible with both, the  
desired step frequency and the external drivers’ requirements. The step pulse  
timing is determined by the 4 LSBs of STPDIV_4210.  
32 BIT DATAGRAM SENT FROM A µC TO THE TMC4210  
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  
ADDRESS  
0 1 0 0  
DATA  
IF_CONFIGURATION_4210  
1 1  
0
0
0
www.trinamic.com  
 
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
35  
INITIALIZE THE STEP/DIR INTERFACE!  
Enable the Step/Dir interface by setting en_sd=1!  
After power-on, the output signals are logic high until they become configured for step/direction.  
6.2.1.1 POS_COMP_4210 (JDX=%0101)  
POS_COMP_4210 defines a position, which becomes compared to the motor position.  
6.2.1.2 POS_COMP_INT_4210 (JDX=%0110)  
The position compare interrupt mask (M) and interrupt flag (I) register hold the mask and interrupt  
concerning the position compare function of the TMC4210.  
6.2.1.3 POWER_DOWN (JDX=%1000)  
A write to the register address POWER_DOWN sets the TMC4210 into the power down mode until it  
detects a falling edge at the pin nSCS_C. During power down, all internal clocks are stopped. All  
outputs remain stable, and all register contents are preserved.  
6.2.1.4 TYPE_AND_VERSION_4210 (JDX=%1001)  
Read only register that gives type und version of the design.  
6.2.1.5 REFERENCE_SWITCHES (JDX=%1110)  
The current state of the reference switches can be read out with this register. Per default  
configuration, only the left reference switch is active (mot1r=0).  
INITIALIZE THE RIGHT REFERENCE SWITCH!  
For using both reference switches, write 1 to mot1r.  
If it is desired to invert the polarity of the reference switches, the bit inv_ref of the  
IF_CONFIGURATION_4210 register can be set. This allows matching normally open contacts or  
normally closed contacts.  
6.2.2 STEPPER MOTOR GLOBAL PARAMETER REGISTER (JDX=%1111)  
This register holds different configuration bits for the stepper motor driver chain. The absolute  
address (RRS & ADDRESS) of the stepper motor global parameter register is %01111110 = $7E.  
STEPPER MOTOR GLOBAL PARAMETER CONTROL  
Register  
Function  
STPDIV_4210  
The timing of the Step/Dir interface is controlled by four LSBs. Please refer to  
chapter 8.1 for the calculation of Step/Dir timing.  
mot1r  
Set mot1r to 1 for a left and a right swicht. In case switches are not to be  
used, pull the related pins to GND. Refer to chapter 7.1.  
32 BIT DATAGRAM SENT FROM A µC TO THE TMC4210  
1 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  
0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0  
ADDRESS  
DATA  
0
0
0
0
0
0
0
0
00  
0 1 1 1 1 1 1  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
36  
7 Reference Switch Inputs  
7.1 Reference Switch Configuration, mot1r  
mot1r is for configuring the reference switches of the TMC4210. Per default, mot1r=0.  
REFERENCE INPUTS DEPENDING ON CONFIGURATION BITS  
mot1r  
left switch  
right switch  
0
1
REF_L  
REF_L  
-
REF_R  
7.2 Triple Switch Configuration  
The programmable tolerance range around the reference switch position is useful for a triple switch  
configuration, as outlined in Figure 7.1. In this configuration two switches are used as automatic stop  
switches and one additional switch is used as the reference switch between the left stop switch and  
the right stop switch. The left stop switch and the reference switch are connected in series. In order  
to use the reference switch, program a tolerance range into the register DX_REF_TOLERANCE. This  
disables the automatic stop within the tolerance range of the reference switch. The homing procedure  
can use the right switch to make sure, that the reference switch is found properly. The TMC4210 can  
automatically check the correct position of the driver whenever the reference switch is passed.  
Motor  
Reference switch  
Left stop switch  
Right stop switch  
traveller  
x'  
left  
x
x
right  
0
x'  
1
x'  
x
x
x
x
x
4
2
traveler  
1
2
3
Negative  
direction  
Positive  
direction  
DX_REF_TOLERANCE  
Figure 7.1 Triple switch configuration left stop switch reference switch right stop switch  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
37  
7.3 Homing Procedure  
In order to home the drive, the reference switch position xref must be determined after each power on  
(see Figure 7.2).  
PROCEED AS FOLLOWS:  
1. Due to mechanical inaccuracy of switches, the reference switch is active within the following  
range: x1 < xref < x2, where x1 and x2 may vary. If the traveler is within the range x1 < xtraveler < x2 at  
the start of the homing procedure, it is necessary to leave this range, because the associated  
reference switch is active. A dummy write access to X_LATCHED initializes the position latch  
register.  
2. With the traveler within the range x2 < xtraveler < xmax and the register X_LATCHED initialized, the  
position x2 can simply be determined by motion with a target position X_TARGET set to xmax.  
3. When reaching position x2 the position is latched automatically.  
4. With stop switch enabled, the stepper motor automatically stops if the position x2 is reached.  
5. Now, set the DX_REF_TOLERANCE in order to allow motion within the active reference switch  
range x1 < xref < x2 and to move the traveler to a position xtraveler < x1 if desired.  
6. Afterwards initialize the register X_LATCHED again to latch the position x1 by a motion to a  
target position xtraveler < x1.  
7. When the positions x1 and x2 are determined the reference position xref = (x1 + x2 ) / 2 can be set.  
Finally, one should move to the target position X_TARGET = xref and set X_TARGET := 0 and  
X_ACTUAL := 0 when reached.  
Motor  
reference  
switch  
traveller  
x
ref  
dx  
x
x
dx  
x
x
max  
1
1
2
2
traveler  
Negative  
direction  
Positive  
direction  
mechanical inaccuracy of switches  
(switching hysteresis)  
DX_REF_TOLERANCE  
Figure 7.2 Reference search  
www.trinamic.com  
 
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
38  
8 Step/Dir Drivers  
Step/Dir drivers contain an internal sequencer. The Step/Dir interface is a simple and universal  
interface for real time motion control. All additional control functions like current control have to be  
provided by the microcontroller directly communicating to the driver.  
The Step/Dir mode is enabled if the control bit en_sd (enable Step/Dir) of the IF_CONFIGURATION_4210  
register is set to 1.  
8.1 Timing  
The timing of the Step/Dir interface should be adapted to the requirements of the driver and the  
transmission line. The minimum pulse width may be limited.  
The timing of the Step/Dir interface is controlled by four LSBs named STPDIV_4210.  
For a given clock frequency fCLK [MHz] of the TMC4210, the length tSTEP [µs] of a step pulse is  
1 ꢨ ꢥꢩꢆꢪꢫꢬ_ꢈ210  
푆푇퐸푃[휇ꢧ] = 16 ∗  
퐶퐿퐾[ꢁꢭꢮ]  
-
-
-
For a clock frequency fCLK[MHz] of 16MHz the step pulse length can be programmed in integer  
multiple of 1µs by STPDIV_4210.  
The STPDIV_4210 has to be set compatible to the upper step frequency fSTEP = 1/tSTEP which is  
used.  
The first step pulse after a change of direction is delayed by tDIR2STP which is equal to tSTEP to  
avoid setup time violations of the Step/Dir power stage.  
MAXIMUM STEP FREQUENCIES  
Generally, the maximum step pulse frequency is fSTEP_MAX [MHz] = fCLK [MHz] / 32.  
For a clock frequency fCLK [MHz] = 16 MHz the maximum step pulse frequency fSTEP_MAX is 500kHz.  
For a clock frequency fCLK [MHz] = 32 MHz the maximum step pulse frequency fSTEP_MAX is 1MHz.  
tDIR2STP = tSTEP  
tDIR2STP = tSTEP  
DIR  
STP  
tSTEP  
tSTEP  
Figure 8.1 Step/Dir timing (en_sd = 1; step_half = 0)  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
39  
9 Running a Motor  
9.1 Getting Started  
For starting a motor proceed as follows:  
1. Set en_sd to 1 to enable the Step/Dir interface to the driver IC.  
2. Set the velocity parameters V_MIN and V_MAX.  
3. Set the clock pre-dividers PULSE_DIV and RAMP_DIV.  
4. Set A_MAX with a valid pair of PMUL and PDIV.  
5. Choose the ramp mode with RAMP_MODE register.  
6. Choose the reference switch configuration. Set mot1r to 1 for a left and a right reference  
switch. If this bit is not set and the right switch is not to be used, pull REF_R to GND.  
7. Now, the TMC4210 runs a motor if you write either X_TARGET or V_TARGET, depending on the  
choice of the ramp mode.  
9.2 Running a Motor with Start-Stop-Speed in ramp_mode  
The TMC4210 has an integrated automatic start-stop-speed mechanism. This can easily be realized by a  
simple command sequence. To start and stop with a speed V_START_STOP different from zero, one  
has to proceed as follows:  
1. Set V_MIN := V_START_STOP.  
2. Set ramp_mode.  
3. Set X_TARGET to desired target position.  
4. Set V_ACTUAL immediately with correct sign for V_ACTUAL to +V_MIN resp. V_MIN, depending  
on the direction of positioning.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
40  
10 On-Chip Voltage Regulator  
The on-chip voltage regulator delivers a 3.3 V supply for the chip core. The TMC4210 provides two  
operational modes to operate in 5 V or in 3.3 V environments. For both operational modes one resp.  
two external capacitors are required. Please keep all connections as short as possible!  
OPERATIONAL MODE  
Operational mode  
Necessary additional hardware  
- An external 100nF ceramic capacitor (CBLOCK) has to be connected  
between pin V5 and ground.  
- An external 470nF ceramic capacitor has to be connected between the  
V33 pin and ground.  
5 V  
An external 100nF ceramic capacitor is necessary only between pin V33 and  
ground.  
3.3 V  
CHARACTERISTICS OF THE ON-CHIP VOLTAGE REGULATOR  
Symbol Parameter Conditions  
VDD5REG Supply voltage vdd5 5 V Operational Mode  
Block capacitor Operational Mode, x7r ceramic  
capacitor  
Min  
4.5  
Typ Max  
Unit  
V
nF  
5
5.5  
CBLOCK  
5
V
100  
VDD3REG  
ICCNLREG  
tSREG  
Supply voltage vdd3 3.3 V Operational Mode  
Current consumption No load  
2.9  
3.3  
50  
3.6  
100  
20  
V
µA  
µs  
Startup time  
No external capacitor connected  
tSREGC  
TDRFT  
Startup time  
Temperature drift  
C_load = 470 nF  
150  
300  
µs  
ppm /  
°C  
VRIPPLE  
CREG  
Ripple on vdd3  
With ripple over 50 mV the input  
thresholds may differ from that specified  
in the data sheet  
Use x7r ceramic capacitors on pin 33. 33  
Using an external capacitor with capacity  
other than typical, the ripple should be  
measured on pin v33 to be sure that  
requirements are satisfied.  
100  
mV  
External capacitor  
470  
470  
nF  
pF  
COPT  
Optional capacitor  
Optional parallel capacitor for additional  
reduction of high frequency ripple, c0g  
ceramic, unnecessary in most cases  
3.3V Operation (CMOS)  
5V Operation (TTL)  
REF_L  
REF_L  
REF_R  
GP_IN  
REF_R  
GP_IN  
nSCS_C  
SDI_C  
STEP_OUT  
DIR_OUT  
nSCS_C  
SDI_C  
STEP_OUT  
DIR_OUT  
TMC4210  
TMC4210  
SCK_C  
SCK_C  
CLK  
CLK  
nINT_SDO_C  
TEST GND  
nINT_SDO_C  
V33  
V5  
V33  
V5  
TEST GND  
Copt  
470 nF*  
100 nF*  
+3.3V  
100 nF*  
+ 5V  
* Capacitors should be placed as close as possible to the chip.  
GND and TEST have to be connected to ground as close as possible to the chip.  
In most cases the optional capacitor Copt is not necessary.  
Figure 10.1 3 V operation (CMOS) vs. 5 V operation (TTL)  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
41  
11 Power-On Reset  
The TMC4210 is equipped with a static and dynamic reset with an internal hysteresis. The chip  
performs an automatic reset during power-on. If the power supply voltage falls below the threshold  
VON, an automatic power-on reset is performed. The power-on reset time tRESPOR depends on the  
power-up time of the on-chip voltage regulator.  
CHARACTERISTICS OF THE ON-CHIP POWER-ON-RESET  
Symbol  
VDD  
Temp  
VOP  
VOFF  
VON  
Parameter  
Power supply range  
Temperature  
Reset ON/OFF hysteresis  
Reset OFF  
Reset ON  
Min  
3.0  
-55  
Typ  
3.3  
25  
Max  
3.6  
Unit  
V
°C  
V
V
V
125  
0.80  
2.85  
2.70  
5.52  
1.58  
1.49  
2.14  
2.13  
1.98  
3.31  
tRESPOR  
Reset time of on-chip power-on-reset  
µs  
Static  
Dynamic  
VOFF  
VON  
VOP  
0
VOFF  
VON  
VOP  
0
tRESPOR  
Figure 11.1 Operating principle of the power-on-reset  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
42  
12 Absolute Maximum Ratings  
The maximum ratings may not be exceeded under any circumstances. Operating the circuit at or near  
more than one maximum rating at a time for extended periods shall be avoided by application  
design.  
Symbol Parameter  
Conditions  
Min  
Max  
Unit  
VDD3  
DC supply voltage  
Voltage at Pin V33 in 3.3V  
mode  
-0.3  
3.6  
V
VI3  
DC input voltage,  
3.3 V I/Os  
DC output voltage,  
3.3 V I/Os  
-0.3  
-0.3  
VDD3 + 0.3  
VDD3 + 0.3  
V
V
VO3  
VDD5  
VI5  
DC supply voltage  
DC input voltage,  
5V I/Os  
DC output voltage,  
5V I/Os  
Voltage at Pin V5  
Continuous DC Voltage  
-0.3  
-0.3  
5.5  
V
V
VDD5 + 0.3,  
5.5 max  
VDD5 + 0.3,  
5.5 max  
2000  
VO5  
Continuous DC Voltage  
-0.3  
V
V
VESD  
ESD voltage  
PAD cells are designed to  
resist ESD voltages  
according to Human Body  
Model according to MIL-  
STD-883, with RC = 1 10  
M, RD = 1.5 K, and CS =  
100 pF, but it cannot be  
guaranteed.  
TEMPD2  
TEMPD3  
TEMPD4  
TSG  
Ambient air temperature Industrial / consumer type  
range  
Ambient air temperature Automotive type  
range  
Ambient air temperature Industrial type  
range  
Storage temperature  
-40  
-55  
-40  
-60  
+85  
°C  
°C  
°C  
°C  
+125  
+105  
+150  
13 Electrical Characteristics  
13.1 Power Dissipation  
General DC characteristics  
Symbol Parameter  
ISC32MHZ Supply current  
ISC16MHZ Supply current  
ISC8MHZ4210 Supply current  
Conditions  
Min  
Typ  
15  
5
Max  
Unit  
f = 32 MHz at Tc = 25°C  
f = 16 MHz at Tc = 25°C  
f = 8 MHz at Tc = 25°C  
(IOs driven)  
mA  
mA  
mA  
10  
5
ISC4MHZ  
IPDN25C  
Supply current  
Power down current  
f = 4 MHz at Tc = 25°C  
Power down mode at  
Tc = 25°C, 5V supply  
1.25  
70  
2.5  
150  
mA  
µA  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
43  
13.2 DC Characteristics  
DC characteristics contain the spread of values guaranteed within the specified supply voltage range  
unless otherwise specified. A device with typical values will not leave Min/Max range within the full  
temperature range.  
General DC characteristics  
Symbol Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
ILC  
CIN  
LIL  
Input leakage current  
Input capacitance  
Input with pull up  
-10  
10  
µA  
pF  
µA  
7
-30  
VIN = 0V  
-110  
-5  
DC characteristics for 3.3V supply mode  
Symbol Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
VDD3  
VI3  
VIL3  
VIH3  
VLTH3  
DC supply voltage  
DC input voltage  
Low level input voltage  
High level input voltage Pin TEST only  
Low level input voltage All inputs except TEST  
threshold  
3.0  
0
0
3.3  
3.6  
VDD3  
0.3 x VDD3  
VDD3 + 0.3  
1.2  
V
V
V
V
V
Pin TEST only  
0.7 x VDD3  
0.9  
VHTH3  
VHYS3  
High level input voltage All inputs except TEST  
threshold  
Schmitt-Trigger  
hysteresis  
Low level output voltage IOL = 0.3 mA  
1.5  
0.4  
1.9  
0.7  
0.1  
V
V
VOL3  
VOH3  
V
V
High  
level  
output IOH = 0.3 mA  
VDD30.1  
VDD30.4  
voltage  
VOL3  
VOH3  
Low level output voltage IOL = 2 mA  
0.4  
High  
level  
output IOH = 2 mA  
V
voltage  
Ripple on VDD3 has to be taken into account when measuring thresholds and hysteresis.  
DC characteristics for 5V supply mode  
Symbol Parameter  
Conditions  
Min  
Typ  
Max  
Unit  
VDD5  
VI5  
VIL5  
VIH5  
VLTH5  
DC supply voltage  
DC input voltage  
Low level input voltage  
High level input voltage Pin TEST only  
Low level input voltage  
threshold  
4.5  
0
0
5
5.5  
VDD5  
0.3 x VDD5  
VDD5 + 0.3  
1.2  
V
V
V
V
V
Pin TEST only  
0.7 x VDD5  
0.9  
All inputs except TEST,  
VDD5=5V  
VHTH5  
VHYS5  
High level input voltage All inputs except TEST,  
1.5  
0.4  
1.9  
0.7  
0.1  
V
V
threshold  
VDD5=5V  
Schmitt-Trigger  
hysteresis  
Low level output voltage IOL = 0.3 mA  
VOL5  
VOH5  
V
V
High  
level  
output IOH = 0.3 mA  
VDD50.1  
VDD50.4  
voltage  
VOL5  
VOH5  
Low level output voltage IOL = 4 mA  
0.4  
High  
level  
output IOH = 4 mA  
V
voltage  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
44  
13.3 Timing Characteristics  
General timing parameters (TMC4210 with EMI optimized output drivers)  
Symbol Parameter  
Conditions  
fCLK = 1 / tCLK  
Rising edge to rising  
edge of CLK  
Min  
0
31.25  
Typ  
16  
Max  
32  
Unit  
MHz  
ns  
fCLK  
tCLK  
Operation frequency  
Clock period  
tCLK_L  
tCLK_H  
tRISE_I  
Clock time low  
Clock time high  
Input signal rise time  
12.5  
12.5  
0.5  
ns  
ns  
ns  
10% to 90% except TEST  
pin  
tFALL_I  
Input signal fall time  
90% to 10% except TEST  
pin  
0.5  
ns  
tRISE_O_4210 Output signal rise time  
tFALL_O_4210 Output signal fall time  
10% to 90%  
90% to 10%  
Relative to falling clock  
edge at CLK  
Relative to falling clock  
edge at CLK  
50% of rising edge of  
the clock CLK to the 50%  
of the output  
7
7
ns  
ns  
ns  
tSU  
Setup time  
1
1
1
tHD  
Hold time  
ns  
ns  
tPD_4210  
Propagation delay time  
10  
tCLK  
tCLK_H  
tCLK_L  
50%  
CLK  
tRISE  
tSU  
90%  
50%  
10%  
OUTPUT  
tFALL  
tHD  
tPD  
Figure 13.1 General timing parameters  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
45  
15 Package Machanical Data  
15.1 Dimensional Drawings  
Attention: Drawings not to scale.  
S
TOP VIEW  
h x 45°  
8
7 6  
5
3
4
2
1
LEAD (SIDE VIEW)  
b
b1  
E
H
c1  
c
WITH PLATING  
BASE METAL  
9 10 11 12 13 14 15 16  
e
N=16  
B
h x 45°  
C
A2  
A
L
D
A
1
SIDE VIEW  
END VIEW  
Figure 15.1 Dimensional drawings SSOP16, 150 MILS, 0.635mm (0.025 inch) pitch  
DIMENSIONS OF PACKAGE SSOP16, 150 MILS  
Dimensions in MILLIMETERS  
Dimensions in INCHES  
Symbol  
Min  
1.55  
0.10  
1.40  
0.20  
0.20  
0.18  
0.18  
0.20  
0.19  
4.80  
Typ  
1.63  
0.15  
1.47  
Max  
1.73  
0.25  
1.55  
0.30  
0.28  
0.25  
0.23  
0.31  
0.25  
4.98  
Min  
0.061  
0.004  
0.055  
0.008  
0.008  
0.007  
0.007  
0.008  
0.0075  
0.189  
Typ  
Max  
0.068  
0.0098  
0.061  
0.012  
0.011  
0.010  
0.009  
0.012  
0.0098  
0.196  
A
0.064  
0.006  
0.058  
A1  
A2  
b
b  
c
c  
B
C
D
E
e
H
h
L
0.25  
0.010  
0.20  
0.25  
0.20  
0.008  
0.010  
0.008  
4.93  
3.91 best case  
0.635 best case  
6.02 best case  
0.33  
0.194  
0.154 best case  
0.025 best case  
0.237 best case  
0.013  
0.25  
0.41  
0.41  
0.89  
0.010  
0.016  
0.016  
0.035  
0.635  
0.025  
N
S
16  
0.114  
16  
0.0045  
0.051  
0.178  
0.0020  
0.0070  
0  
5  
8  
0  
5  
8  
15.1.1 Package Code  
Device  
Package  
Temperature range  
Code/ Marking  
TMC4210-I  
TMC4210  
SSOP16 (RoHS)  
-40° to +105°C  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
46  
16 Marking  
PRODUCT NAME  
TMC4210-I  
Package  
SSOP16 150 MILS  
Date code  
Lot number identifier  
Logo  
WWYY (week WW and year YY)  
LLLL  
No  
TMC4210-I  
Trinamic  
WWYYLLLL  
Zoomed Size  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
47  
17 Disclaimer  
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.  
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 from its use.  
Specifications are subject to change without notice.  
All trademarks used are property of their respective owners.  
18 ESD Sensitive Device  
The TMC4210 is an ESD-sensitive CMOS device and sensitive to electrostatic discharge. Take special  
care to use adequate grounding of personnel and machines in manual handling. After soldering the  
devices to the board, ESD requirements are more relaxed. Failure to do so can result in defects or  
decreased reliability.  
PAD cells are designed to resist ESD voltages corresponding to Human Body Model (MIL-STD-883, with  
RC = 1 10 M, RD = 1.5 K, and CS = 100 pF).  
Note: In a modern SMD manufacturing process, ESD voltages well below 100V are standard. A major  
source for ESD is hot-plugging the motor during operation.  
www.trinamic.com  
TMC4210 DATASHEET (Rev. 1.03 / 2015-JUN-03)  
48  
19 Table of Figures  
Figure 1.1 TMC4210 functional block diagram .............................................................................................................4  
Figure 1.2 Application example using Step/Dir driver interface.............................................................................5  
Figure 3.1 TMC4210 pin out...............................................................................................................................................9  
Figure 4.1 TMC4210 application environment with TMC260, TMC261 or TMC2660..........................................11  
Figure 5.1 Timing diagram of the serial µC interface..............................................................................................13  
Figure 6.1 Velocity ramp parameters and velocity profiles....................................................................................20  
Figure 6.2 Target position calculation, ramp generator, and pulse generator.................................................23  
Figure 6.3 Proportionality parameter p and outline of velocity profile(s).........................................................24  
Figure 6.4 Left switch and right switch for reference search and automatic stop function .......................28  
Figure 7.1 Triple switch configuration left stop switch reference switch right stop switch................36  
Figure 7.2 Reference search.............................................................................................................................................37  
Figure 8.1 Step/Dir timing (en_sd = 1; step_half = 0)...............................................................................................38  
Figure 10.1 3 V operation (CMOS) vs. 5 V operation (TTL) .....................................................................................40  
Figure 11.1 Operating principle of the power-on-reset...........................................................................................41  
Figure 13.1 General timing parameters........................................................................................................................44  
Figure 15.1 Dimensional drawings SSOP16, 150 MILS, 0.635mm (0.025 inch) pitch.......................................45  
20 Revision History  
Version Date  
Author  
SD Sonja Dwersteg  
Description  
BD Bernhard Dwersteg  
1.00  
1.01  
2013-SEP-09  
SD  
SD  
-
-
-
TMC4210 Datasheet Rev. 1.00 based on TMC429 Datasheet  
Chapter 6.2 and 6.2.1 corrected.  
Description of status information bits in chapter 5.2.2.2  
corrected. Do not set SDO_INT=1 because this disables  
the SPI output.  
2014-OCT-10  
2015-JUN-03  
1.03  
BD  
-
Update SPI status  
21 References  
[TMC4210+2660-EVAL] TMC4210+2660-EVAL Manual / Evaluation board for S/D  
www.trinamic.com  

相关型号:

TMC4210-I

MOTION CONTROLLER FOR STEPPER MOTORS
TRINAMIC

TMC423

Serial Triple Incremental Encoder Interface
TRINAMIC

TMC423_1

Serial Triple Incremental Encoder Interface
TRINAMIC

TMC428

Three Axis Stepper Motor Controller with Integrated Sequencer
TRINAMIC

TMC428-A

Intelligent Triple Stepper Motor Controller with Serial Peripheral Interfaces
ETC

TMC428-DI20

Intelligent Triple Stepper Motor Controller with Serial Peripheral Interfaces
ETC

TMC428-I

Three Axis Stepper Motor Controller with Integrated Sequencer
TRINAMIC

TMC428-PI24

Three Axis Stepper Motor Controller with Integrated Sequencer
TRINAMIC

TMC4281GT

SCREW MACHINE SOCKETS & TERMINAL STRIPS
ADAM-TECH

TMC4281TT

SCREW MACHINE SOCKETS & TERMINAL STRIPS
ADAM-TECH

TMC4282GT

SCREW MACHINE SOCKETS & TERMINAL STRIPS
ADAM-TECH

TMC4282TT

SCREW MACHINE SOCKETS & TERMINAL STRIPS
ADAM-TECH