TMC2208-EVAL [TRINAMIC]

POWER DRIVER FOR STEPPER MOTORS;
TMC2208-EVAL
型号: TMC2208-EVAL
厂家: TRINAMIC MOTION CONTROL GMBH & CO. KG.    TRINAMIC MOTION CONTROL GMBH & CO. KG.
描述:

POWER DRIVER FOR STEPPER MOTORS

驱动
文件: 总81页 (文件大小:2155K)
中文:  中文翻译
下载:  下载PDF数据表文档文件
POWER DRIVER FOR STEPPER MOTORS  
INTEGRATED CIRCUITS  
TMC2208/2 & TMC2224/0/5 family Datasheet  
TMC2202, TMC2208, TMC2220, TMC2224, TMC2225 Step/Dir Drivers for Two-Phase Bipolar Stepper Motors  
up to 2A peak - stealthChop™ for Quiet Movement - UART Interface Option.  
APPLICATIONS  
Compatible Design Upgrade  
3D Printers  
Printers, POS  
Office and home automation  
Textile, Sewing Machines  
CCTV, Security  
ATM, Cash recycler  
HVAC  
FEATURES AND BENEFITS  
DESCRIPTION  
The TMC2202, TMC2208, TMC2220, TMC2224  
and TMC2225 are ultra-silent motor driver  
ICs for two phase stepper motors. Their  
pinning is compatible to a number of  
legacy drivers. TRINAMICs sophisticated  
stealthChop2 chopper ensures noiseless  
operation, maximum efficiency and best  
motor torque. Its fast current regulation  
and optional combination with spreadCycle  
2-phase stepper motors up to 2A coil current (peak)  
STEP/DIR Interface with 2, 4, 8, 16 or 32 microstep pin  
setting  
Smooth Running 256 microsteps by microPlyer™ interpolation  
stealthChop2™ silent motor operation  
spreadCycle™ highly dynamic motor control chopper  
Low RDSon LS 280mΩ & HS 290mΩ (typ. at 25°C)  
Voltage Range 4.75… 36V DC  
allow  
for  
highly  
dynamic  
motion.  
Automatic Standby current reduction (option)  
Internal Sense Resistor option (no sense resistors required)  
Passive Braking and Freewheeling  
Integrated power-MOSFETs handle motor  
current up to 1.4A RMS. Protection and  
diagnostic features support robust and  
reliable operation. A simple to use UART  
interface opens up more tuning and  
control options. Application specific tuning  
can be stored to OTP memory. Industries’  
most advanced STEP/DIR stepper motor  
driver family upgrades designs to noiseless  
and most precise operation for cost-  
effective and highly competitive solutions.  
Single Wire UART & OTP for advanced configuration options  
Integrated Pulse Generator for standalone motion  
Full Protection & Diagnostics  
Choice of QFN, TQFP and HTSSOP packages for best fit  
BLOCK DIAGRAM  
IREF optional current scaling  
Step/Dir  
TMC220X  
TMC222X  
Power  
+5V Regulator  
Supply  
OTP  
memory  
Step Multiplyer  
Charge Pump  
Standstill Current  
Reduction  
DAC Reference  
Motor  
UART  
optional control  
UART Control  
Control  
Register  
Set  
spreadCycle  
DRIVER  
256 µStep  
Sequencer  
Configuration  
Pins  
Mode  
Selection  
stealthChop  
Protection  
& Diagnostics  
CLK Oscillator /  
Selector  
CLK  
Pulse Generator  
Diag Out /  
Index  
TRINAMIC Motion Control GmbH & Co. KG  
Hamburg, Germany  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
2
APPLICATION EXAMPLES: SIMPLE SOLUTIONS HIGHLY EFFECTIVE  
The TMC22xx family scores with power density, integrated power MOSFETs, smooth and quiet  
operation, and a congenial simplicity. The TMC22xx covers a wide spectrum of applications from  
battery systems to embedded applications with up to 2A motor current per coil. TRINAMICs unique  
chopper modes spreadCycle and stealthChop2 optimize drive performance. stealthChop reduces motor  
noise to the point of silence at low velocities. Standby current reduction keeps costs for power  
dissipation and cooling down. Extensive support enables rapid design cycles and fast time-to-market  
with competitive products.  
STANDALONE REPLACEMENT FOR LEGACY STEPPER DRIVER  
In this example, configuration is hard  
wired via pins. Software based motion  
control generates STEP and DIR  
(direction) signals, INDEX and ERROR  
signals report back status information.  
0A+  
S/D  
N
S
0A-  
TMC22xx  
ERROR, INDEX  
0B+  
0B-  
UART INTERFACE FOR FULL DIAGNOSTICS AND CONTROL  
A CPU operates the driver via step and  
direction signals. It accesses diagnostic  
0A+  
S/D  
UART  
information  
and  
configures  
the  
N
High-Level  
Interface  
S
0A-  
CPU  
TMC22xx  
TMC22xx via the UART interface. The  
CPU manages motion control and the  
TMC22xx drives the motor and smoo-  
thens and optimizes drive performance.  
0B+  
0B-  
Sense Resistors may be omitted  
TMC2208-EVAL EVALUATION BOARD  
The  
TMC22xx-EVAL  
is  
part  
of  
TRINAMICs universal evaluation board  
system which provides a convenient  
handling of the hardware as well as a  
user-friendly  
software  
tool  
for  
evaluation. The TMC22xx evaluation  
board system consists of three parts:  
STARTRAMPE (base board), TMC2208-  
BRIDGE (connector board with several  
test points and stand-alone settings),  
and TMC22xx-EVAL.  
ORDER CODES  
Size [mm2]  
5 x 5  
5 x 5  
5 x 5  
Order code  
TMC2208-LA  
TMC2224-LA  
TMC2202-WA  
TMC2220-TA  
TMC2225-SA  
TMC2208-EVAL  
TMC2224-EVAL  
TMC22xx-Bridge  
STARTRAMPE  
Description  
stealthChop standalone driver; QFN28 (RoHS compliant)  
stealthChop standalone driver; QFN28 (RoHS compliant)  
stealthChop driver; wettable edge QFN32 (RoHS compliant)  
Option package: TQFP 48 please request for availability!  
Option package: HTSSOP28 please request for availability!  
Evaluation board for TMC2208 stepper motor driver  
Evaluation board for TMC2224 stepper motor driver  
Connector and jumper board fitting to TMC22xx family  
Baseboard for TMC2208-EVAL and further evaluation boards  
9 x 9  
9.7 x 6.4  
85 x 55  
85 x 55  
61 x 38  
85 x 55  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
3
Table of Contents  
1
PRINCIPLES OF OPERATION .........................4  
7
SPREADCYCLE CHOPPER...............................47  
1.1  
KEY CONCEPTS................................................5  
CONTROL INTERFACES.....................................6  
MOVING AND CONTROLLING THE MOTOR........6  
STEALTHCHOP2 & SPREADCYCLE DRIVER........6  
PRECISE CLOCK GENERATOR AND CLK INPUT...7  
AUTOMATIC STANDSTILL POWER DOWN.........7  
INDEX OUTPUT................................................7  
7.1  
SPREADCYCLE SETTINGS ...............................48  
SELECTING SENSE RESISTORS....................51  
MOTOR CURRENT CONTROL........................52  
1.2  
1.3  
1.4  
1.5  
1.6  
1.7  
8
9
9.1  
ANALOG CURRENT SCALING VREF...............53  
10 INTERNAL SENSE RESISTORS.....................55  
11 STEP/DIR INTERFACE....................................57  
2
PIN ASSIGNMENTS...........................................8  
11.1 TIMING.........................................................57  
11.2 CHANGING RESOLUTION...............................58  
11.3 MICROPLYER STEP INTERPOLATOR AND STAND  
STILL DETECTION.......................................................59  
11.4 INDEX OUTPUT .............................................60  
2.1  
PACKAGE OUTLINE TMC2208........................8  
SIGNAL DESCRIPTIONS TMC2208..................8  
PACKAGE OUTLINE TMC2202........................9  
SIGNAL DESCRIPTIONS TMC2202..................9  
PACKAGE OUTLINE TMC2224......................10  
SIGNAL DESCRIPTIONS TMC2224................11  
PACKAGE OUTLINE TMC2225......................12  
SIGNAL DESCRIPTIONS TMC2225................12  
PACKAGE OUTLINE TMC2220......................13  
2.2  
2.3  
2.4  
2.5  
2.6  
2.7  
2.8  
2.9  
12 INTERNAL STEP PULSE GENERATOR.........61  
13 DRIVER DIAGNOSTIC FLAGS......................62  
13.1 TEMPERATURE MEASUREMENT.......................62  
13.2 SHORT PROTECTION......................................62  
13.3 OPEN LOAD DIAGNOSTICS ...........................63  
13.4 DIAGNOSTIC OUTPUT ...................................63  
2.10 SIGNAL DESCRIPTIONS TMC2220................13  
3
SAMPLE CIRCUITS..........................................15  
3.1  
3.2  
3.3  
3.4  
3.5  
3.6  
STANDARD APPLICATION CIRCUIT ................15  
INTERNAL RDSON SENSING..........................15  
5V ONLY SUPPLY..........................................16  
CONFIGURATION PINS ..................................17  
HIGH MOTOR CURRENT.................................17  
DRIVER PROTECTION AND EME CIRCUITRY...18  
14 QUICK CONFIGURATION GUIDE................64  
15 EXTERNAL RESET.............................................67  
16 CLOCK OSCILLATOR AND INPUT...............67  
17 ABSOLUTE MAXIMUM RATINGS.................68  
18 ELECTRICAL CHARACTERISTICS.................68  
4
5
6
UART SINGLE WIRE INTERFACE ................19  
4.1  
DATAGRAM STRUCTURE.................................19  
CRC CALCULATION .......................................21  
UART SIGNALS ............................................21  
ADDRESSING MULTIPLE SLAVES....................22  
18.1 OPERATIONAL RANGE...................................68  
18.2 DC AND TIMING CHARACTERISTICS..............69  
18.3 THERMAL CHARACTERISTICS..........................73  
4.2  
4.3  
4.4  
19 LAYOUT CONSIDERATIONS.........................74  
REGISTER MAP.................................................23  
19.1 EXPOSED DIE PAD........................................74  
19.2 WIRING GND..............................................74  
19.3 SUPPLY FILTERING........................................74  
19.4 LAYOUT EXAMPLE TMC2208........................75  
5.1  
GENERAL REGISTERS.....................................24  
VELOCITY DEPENDENT CONTROL...................29  
SEQUENCER REGISTERS .................................30  
CHOPPER CONTROL REGISTERS .....................31  
5.2  
5.3  
5.4  
20 PACKAGE MECHANICAL DATA....................76  
STEALTHCHOP..............................................37  
20.1 DIMENSIONAL DRAWINGS QFN28...............76  
20.2 DIMENSIONAL DRAWINGS QFN32-WA.......78  
20.3 PACKAGE CODES...........................................79  
6.1  
AUTOMATIC TUNING.....................................37  
STEALTHCHOP OPTIONS................................39  
STEALTHCHOP CURRENT REGULATOR.............39  
VELOCITY BASED SCALING............................41  
COMBINING STEALTHCHOP AND SPREADCYCLE..  
.....................................................................43  
FLAGS IN STEALTHCHOP................................44  
FREEWHEELING AND PASSIVE BRAKING........45  
6.2  
6.3  
6.4  
6.5  
21 TABLE OF FIGURES.........................................80  
22 REVISION HISTORY.......................................81  
23 REFERENCES......................................................81  
6.6  
6.7  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
4
1 Principles of Operation  
The TMC22xx family of stepper drivers is intended as a drop-in upgrade for existing low cost stepper  
driver applications. Its silent drive technology stealthChop enables non-bugging motion control for  
home and office applications. A highly efficient power stage enables high current from a tiny package.  
The TMC22xx requires just a few control pins on its tiny package. They allow selection of the most  
important setting: the desired microstep resolution. A choice of 2, 4, 8, 16 or 32 microsteps adapts the  
driver to the capabilities of the motion controller. Some package options also allow chopper mode  
selection by pin.  
Even at low microstepping rate, the TMC22xx offers a number of unique enhancements over  
comparable products: TRINAMICs sophisticated stealthChop2 chopper plus the microstep enhancement  
microPlyer ensure noiseless operation, maximum efficiency and best motor torque. Its fast current  
regulation and optional combination with spreadCycle allow for highly dynamic motion. Protection  
and diagnostic features support robust and reliable operation. A simple-to-use 8 bit UART interface  
opens up more tuning and control options. Application specific tuning can be stored to on-chip OTP  
memory. Industries’ most advanced step & direction stepper motor driver family upgrades designs to  
noiseless and most precise operation for cost-effective and highly competitive solutions.  
Place near IC with  
short path to die pad  
2.2µ  
6.3V  
22n  
50V  
100n  
16V  
+VM  
VS  
TMC22xx  
STEP  
DIR  
100n  
100n  
100µF  
Step and Direction  
motion control  
5V Voltage  
regulator  
Analog Scaling  
Step&Dir input  
charge pump  
Full Bridge A  
VREF  
IREF  
Low ESR type  
OA1  
OA2  
Step Pulse  
Generator  
Stand Still  
Current  
Reduction  
N
stepper  
motor  
S
Configuration  
Memory (OTP)  
MS1  
MS2  
RSA  
Configuration  
(GND or VCC_IO)  
BRA  
stealthChop2  
Driver  
Configuration  
Interface  
SPREAD  
(only TMC222x)  
IREF  
256 Microstep  
Sequencer  
Integrated  
Rsense  
Connect directly  
to GND plane  
PDN/UART  
B. Dwersteg, ©  
TRINAMIC 2016  
optional UART interface  
Use low inductivity SMD  
type, e.g. 1206, 0.5W for  
RSA and RSB  
UART interface  
+ Register Block  
spreadCycle  
DIAG  
Programmable  
Diagnostic  
Outputs  
Driver error  
Index pulse  
OB1  
OB2  
INDEX  
Full Bridge B  
(not with TMC2202)  
Trimmed  
CLK oscillator/  
selector  
opt. ext. clock  
10-16MHz  
CLK_IN  
RSB  
BRB  
3.3V or 5V  
I/O voltage  
VCC_IO  
Connect directly  
to GND plane  
100n  
opt. driver enable  
Figure 1.1 TMC22xx basic application block diagram  
THREE MODES OF OPERATION:  
OPTION 1: Standalone STEP/DIR Driver (Legacy Mode)  
A CPU (µC) generates step & direction signals synchronized to additional motors and other  
components within the system. The TMC22xx operates the motor as commanded by the configuration  
pins and STEP/DIR signals. Motor run current either is fixed, or set by the CPU using the analog input  
VREF. The pin PDN_UART selects automatic standstill current reduction. Feedback from the driver to  
the CPU is granted by the INDEX and DIAG output signals. Enable or disable the motor using the ENN  
pin.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
5
OPTION 2: Standalone STEP/DIR Driver with OTP pre-configuration  
Additional options enabled by pre-programming OTP memory (label UART & OTP):  
UART  
OTP  
+
+
+
Tuning of the chopper to the application for application tailored performance  
Cost reduction by switching the driver to internal sense resistor mode  
Adapting the automatic power down level and timing for best application efficiency  
0A+  
S/D  
N
High-Level  
Interface  
S
0A-  
CPU  
ERROR, INDEX TMC22xx  
0B+  
0B-  
TXD only or bit  
bang UART  
Other drivers  
External pre-  
programming  
Figure 1.2 Stand-alone driver with pre-configuration  
To enable the additional options, either one-time program the driver’s OTP memory, or store  
configuration in the CPU and transfer it to the on-chip registers following each power-up. Operation  
uses the same signals as Option 1. Programming does not need to be done within the application - it  
can be executed during testing of the PCB! Alternatively, use bit-banging by CPU firmware to configure  
the driver. Multiple drivers can be programmed at the same time using a single TXD line.  
OPTION 3: STEP/DIR Driver with Full Diagnostics and Control  
Similar to Option 2, but pin PDN_UART is connected to the CPU UART interface.  
UART  
Additional options (label UART):  
+
+
+
+
Detailed diagnostics and thermal management  
Passive braking and freewheeling for flexible, lowest power stop modes  
More options for microstep resolution setting (fullstep to 256 microstep)  
Software controlled motor current setting and more chopper options  
This mode allows replacing all control lines like ENN, DIAG, INDEX, MS1, MS2, and analog current  
setting VREF by a single interface line. This way, only three signals are required for full control: STEP,  
DIR and PDN_UART. Even motion without external STEP pulses is provided by an internal  
programmable step pulse generator: Just set the desired motor velocity. However, no ramping is  
provided by the TMC22xx. Access to multiple driver ICs is possible using an analog multiplexer IC.  
1.1 Key Concepts  
The TMC22xx implements advanced features which are exclusive to TRINAMIC products. These features  
contribute toward greater precision, greater energy efficiency, higher reliability, smoother motion, and  
cooler operation in many stepper motor applications.  
stealthChop2No-noise, high-precision chopper algorithm for inaudible motion and inaudible  
standstill of the motor. Allows faster motor acceleration and deceleration than  
stealthChop™ and extends stealthChop to low stand still motor currents.  
spreadCycleHigh-precision cycle-by-cycle current control algorithm for highest dynamic  
movements.  
microPlyer™  
Microstep interpolator for obtaining full 256 microstep smoothness with lower  
resolution step inputs starting from fullstep  
In addition to these performance enhancements, TRINAMIC motor drivers offer safeguards to detect  
and protect against shorted outputs, output open-circuit, overtemperature, and undervoltage  
conditions for enhancing safety and recovery from equipment malfunctions.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
6
1.2 Control Interfaces  
The TMC22xx supports both, discrete control lines for basic mode selection and a UART based single  
wire interface with CRC checking. The UART interface automatically becomes enabled when correct  
UART data is sent. When using UART, the pin selection may be disabled by control bits.  
UART  
1.2.1 UART Interface  
The single wire interface allows unidirectional operation (for parameter setting only), or bi-directional  
operation for full control and diagnostics. It can be driven by any standard microcontroller UART or  
even by bit banging in software. Baud rates from 9600 Baud to 500k Baud or even higher (when  
using an external clock) may be used. No baud rate configuration is required, as the TMC22xx  
automatically adapts to the masters’ baud rate. The frame format is identical to the intelligent  
TRINAMIC controller & driver ICs TMC5130 and TMC5072. A CRC checksum allows data transmission  
over longer distance. For fixed initialization sequences, store the data including CRC into the µC, thus  
consuming only a few 100 bytes of code for a full initialization. CRC may be ignored during read  
access, if not desired. This makes CRC use an optional feature! The IC has a fixed address. Multiple  
drivers can be programmed in parallel by tying together all interface pins, in case no read access is  
required. An optional addressing can be provided by analog multiplexers, like 74HC4066.  
From a software point of view the TMC22xx is a peripheral with a number of control and status  
registers. Most of them can either be written only or are read only. Some of the registers allow both,  
read and write access. In case read-modify-write access is desired for a write only register, a shadow  
register can be realized in master software.  
1.3 Moving and Controlling the Motor  
1.3.1 STEP/DIR Interface  
The motor is controlled by a step and direction input. Active edges on the STEP input can be rising  
edges or both rising and falling edges as controlled by a special mode bit (DEDGE). Using both edges  
cuts the toggle rate of the STEP signal in half, which is useful for communication over slow interfaces  
such as optically isolated interfaces. The state sampled from the DIR input upon an active STEP edge  
determines whether to step forward or back. Each step can be a fullstep or a microstep, in which  
there are 2, 4, 8, 16, 32, 64, 128, or 256 microsteps per fullstep. A step impulse with a low state on  
DIR increases the microstep counter and a high decreases the counter by an amount controlled by the  
microstep resolution. An internal table translates the counter value into the sine and cosine values  
which control the motor current for microstepping.  
UART  
1.3.2 Internal Step Pulse Generator  
Some applications do not require a precisely co-ordinate motion the motor just is required to move  
for a certain time and at a certain velocity. The TMC22xx comes with an internal pulse generator for  
these applications: Just provide the velocity via UART interface to move the motor. The velocity sign  
automatically controls the direction of the motion. However, the pulse generator does not integrate a  
ramping function. Motion at higher velocities will require ramping up and ramping down the velocity  
value via software.  
STEP/DIR mode and internal pulse generator mode can be mixed in an application!  
1.4 stealthChop2 & spreadCycle Driver  
stealthChop is a voltage chopper based principle. It especially guarantees that the motor is absolutely  
quiet in standstill and in slow motion, except for noise generated by ball bearings. Unlike other  
voltage mode choppers, stealthChop2 does not require any configuration. It automatically learns the  
best settings during the first motion after power up and further optimizes the settings in subsequent  
motions. An initial homing sequence is sufficient for learning. Optionally, initial learning parameters  
can be stored to OTP. stealthChop2 allows high motor dynamics, by reacting at once to a change of  
motor velocity.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
7
For highest velocity applications, spreadCycle is an option to stealthChop2. It can be enabled via input  
pin (TMC222x) or via UART and OTP. stealthChop2 and spreadCycle may even be used in a combined  
configuration for the best of both worlds: stealthChop2 for no-noise stand still, silent and smooth  
performance, spreadCycle at higher velocity for high dynamics and highest peak velocity at low  
vibration.  
spreadCycle is an advanced cycle-by-cycle chopper mode. It offers smooth operation and good  
resonance dampening over a wide range of speed and load. The spreadCycle chopper scheme  
automatically integrates and tunes fast decay cycles to guarantee smooth zero crossing performance.  
Benefits of using stealthChop2:  
-
-
-
-
Significantly improved microstepping with low cost motors  
Motor runs smooth and quiet  
Absolutely no standby noise  
Reduced mechanical resonance yields improved torque  
1.5 Precise clock generator and CLK input  
The TMC22xx provides a factory trimmed internal clock generator for precise chopper frequency and  
performance. However, an optional external clock input is available for cases, where quartz precision  
is desired, or where a lower or higher frequency is required. For safety, the clock input features  
timeout detection, and switches back to internal clock upon fail of the external source.  
1.6 Automatic Standstill Power Down  
An automatic current reduction drastically reduces application power dissipation and cooling  
requirements. Per default, the stand still current reduction is enabled by pulling PDN_UART input to  
GND. It reduces standstill power dissipation to less than 33% by going to slightly more than half of  
the run current.  
Modify stand still current, delay time and decay via UART, or pre-programmed via internal OTP.  
Automatic freewheeling and passive motor braking are provided as an option for stand still. Passive  
braking reduces motor standstill power consumption to zero, while still providing effective  
dampening and braking!  
STEP  
CURRENT  
IRUN  
IHOLD  
t
IHOLDDELAY  
power down  
ramp time  
TPOWERDOWN  
power down  
delay time  
RMS motor current trace with pin PDN=0  
Figure 1.3 Automatic Motor Current Power Down  
1.7 Index Output  
The index output gives one pulse per electrical rotation, i.e. one pulse per each four fullsteps. It  
shows the internal sequencer microstep 0 position (MSTEP near 0). This is the power on position. In  
combination with a mechanical home switch, a more precise homing is enabled.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
8
2 Pin Assignments  
The TMC22xx family comes in a number of package variants in order to fit different footprints. Please  
check for availability.  
2.1 Package Outline TMC2208  
28 27 26 25 24 23 22  
OB2  
ENN  
GND  
CPO  
CPI  
VCP  
-
OA2  
-
DIR  
GND  
VREF  
STEP  
VCC_IO  
TMC2208  
QFN28  
© B. Dwersteg,  
TRINAMIC  
Pad=GND  
8
9
10 11 12 13 14  
Figure 2.1 TMC2208 Pinning Top View type: QFN28, 5x5mm², 0.5mm pitch  
2.2 Signal Descriptions TMC2208  
Pin  
Number Type  
Function  
OB2  
1
Motor coil B output 2  
Enable not input. The power stage becomes switched off (all motor  
outputs floating) when this pin becomes driven to a high level.  
GND. Connect to GND plane near pin.  
ENN  
2
DI  
GND  
CPO  
CPI  
3, 18  
4
5
6
7, 20,  
25  
Charge pump capacitor output.  
Charge pump capacitor input. Tie to CPO using 22nF 50V capacitor.  
Charge pump voltage. Tie to VS using 100nF capacitor.  
Unused pin, leave open or connect to GND for compatibility to future  
versions.  
VCP  
N.C.  
Output of internal 5V regulator. Attach 2.2µF to 4.7µF ceramic  
capacitor to GND near to pin for best performance. Provide the  
shortest possible loop to the GND pad.  
5VOUT  
8
MS1  
MS2  
DIAG  
INDEX  
9
DI (pd) Microstep resolution configuration (internal pull down resistors)  
MS2, MS1: 00: 1/8, 01: 1/2, 10: 1/4 11: 1/16  
Diagnostic output. Hi level upon driver error. Reset by ENN=high.  
Configurable index output. Provides index pulse.  
CLK input. Tie to GND using short wire for internal clock or supply  
external clock.  
10  
11  
12  
DI (pd)  
DO  
DO  
CLK  
13  
DI  
Power down not control input (low = automatic standstill current  
reduction).  
Optional UART Input/Output. Power down function can be disabled  
in UART mode.  
PDN_UART 14  
VCC_IO 15  
DIO  
3.3V to 5V IO supply voltage for all digital pins.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
9
Pin  
Number Type  
Function  
STEP  
16  
DI  
STEP input  
Analog reference voltage for current scaling or reference current for  
use of internal sense resistors (optional mode)  
DI (pd) DIR input (internal pull down resistor)  
Motor supply voltage. Provide filtering capacity near pin with  
shortest possible loop to GND pad.  
VREF  
DIR  
VS  
17  
AI  
19  
22, 28  
21  
OA2  
BRA  
Motor coil A output 2  
Sense resistor connection for coil A. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Motor coil A output 1  
23  
OA1  
OB1  
24  
26  
Motor coil B output 1  
Sense resistor connection for coil B. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Connect the exposed die pad to a GND plane. Provide as many as  
possible vias for heat transfer to GND plane. Serves as GND pin for  
power drivers and analogue circuitry.  
BRB  
27  
Exposed  
die pad  
-
2.3 Package Outline TMC2202  
32 31 30 29 28 27 26 25  
OB2  
-
OA2  
-
VS  
VS  
-
-
TMC2202  
QFN32  
ENN  
GND  
CPO  
CPI  
DIR  
GND  
VREF  
STEP  
© B. Dwersteg,  
TRINAMIC  
Pad=GND  
9
10 11 12 13 14 15 16  
Figure 2.2 TMC2202 Pinning Top View type: QFN32, 5x5mm², 0.5mm pitch  
2.4 Signal Descriptions TMC2202  
Pin  
Number Type  
Function  
OB2  
1
Motor coil B output 2  
2, 4, 21,  
23, 26,  
28, 29,  
31  
Unused pin, leave open to provide for higher creeping voltage  
distances.  
N.C.  
Motor supply voltage. Provide filtering capacity near pin with  
shortest possible loop to GND pad.  
VS  
3, 22  
Enable not input. The power stage becomes switched off (all motor  
outputs floating) when this pin becomes driven to a high level.  
ENN  
5
DI  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
10  
Pin  
Number Type  
Function  
GND  
CPO  
CPI  
6, 19  
GND. Connect to GND plane near pin.  
Charge pump capacitor output.  
Charge pump capacitor input. Tie to CPO using 22nF 50V capacitor.  
Charge pump voltage. Tie to VS using 100nF capacitor.  
7
8
9
VCP  
Output of internal 5V regulator. Attach 2.2µF to 4.7µF ceramic  
capacitor to GND near to pin for best performance. Provide the  
shortest possible loop to the GND pad.  
5VOUT  
10  
MS1  
MS2  
DIAG  
11  
12  
13  
DI (pd) Microstep resolution configuration (internal pull down resistors)  
MS2, MS1: 00: 1/8, 01: 1/2, 10: 1/4 11: 1/16  
Diagnostic output. Hi level upon driver error. Reset by ENN=high.  
CLK input. Tie to GND using short wire for internal clock or supply  
external clock.  
DI (pd)  
DO  
CLK  
14  
DI  
Power down not control input (low = automatic standstill current  
reduction).  
Optional UART Input/Output. Power down function can be disabled  
PDN_UART 15  
DIO  
in UART mode.  
VCC_IO  
STEP  
16  
17  
3.3V to 5V IO supply voltage for all digital pins.  
STEP input  
Analog reference voltage for current scaling or reference current for  
use of internal sense resistors (optional mode)  
DI  
AI  
VREF  
18  
DIR  
OA2  
20  
24  
DI (pd) DIR input (internal pull down resistor)  
Motor coil A output 2  
Sense resistor connection for coil A. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Motor coil A output 1  
BRA  
25  
OA1  
OB1  
27  
30  
Motor coil B output 1  
Sense resistor connection for coil B. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Connect the exposed die pad to a GND plane. Provide as many as  
possible vias for heat transfer to GND plane. Serves as GND pin for  
power drivers and analogue circuitry.  
BRB  
32  
Exposed  
die pad  
-
2.5 Package Outline TMC2224  
28 27 26 25 24 23 22  
MS2  
INDEX  
GND  
CPO  
CPI  
DIAG  
PDN_UART  
VCC_IO  
5VOUT  
GND  
TMC2224  
QFN28  
© B. Dwersteg,  
TRINAMIC  
VCP  
VS  
TEST  
VREF  
Pad=GND  
8
9
10 11 12 13 14  
Figure 2.3 TMC2224 Pinning Top View type: QFN28, 5x5mm², 0.5mm pitch  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
11  
2.6 Signal Descriptions TMC2224  
Pin  
Number Type  
Function  
MS1  
MS2  
INDEX  
GND  
CPO  
CPI  
28  
1
2
DI (pd) Microstep resolution configuration (internal pull down resistors)  
MS2, MS1: 00: 1/4, 01: 1/8, 10: 1/16, 11: 1/32  
Configurable index output. Provides index pulse.  
GND. Connect to GND plane near pin.  
DI (pd)  
DO  
3, 17  
4
5
6
Charge pump capacitor output.  
Charge pump capacitor input. Tie to CPO using 22nF 50V capacitor.  
Charge pump voltage. Tie to VS using 100nF capacitor.  
VCP  
Motor supply voltage. Provide filtering capacity near pin with  
shortest possible loop to GND pad.  
VS  
7, 14  
OA2  
BRA  
8
9
Motor coil A output 2  
Sense resistor connection for coil A. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Motor coil A output 1  
OA1  
OB1  
10  
11  
Motor coil B output 1  
Sense resistor connection for coil B. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Motor coil B output 2  
Analog reference voltage for current scaling or reference current for  
use of internal sense resistors (optional mode)  
Connect to GND. May alternatively be left open or connected to VREF.  
Output of internal 5V regulator. Attach 2.2µF to 4.7µF ceramic  
capacitor to GND near to pin for best performance. Provide the  
shortest possible loop to the GND pad.  
3.3V to 5V IO supply voltage for all digital pins.  
Power down not control input (low = automatic standstill current  
reduction). (internal pull down resistor)  
Optional UART Input/Output. Power down function can be disabled  
in UART mode.  
BRB  
12  
13  
15  
16  
OB2  
VREF  
TEST  
AI  
5VOUT  
VCC_IO  
18  
19  
DIO  
(pd)  
PDN_UART 20  
DIAG  
SPREAD  
DIR  
21  
22  
23  
DO  
Diagnostic output. Hi level upon driver error. Reset by ENN=high.  
DI (pd) Chopper mode selection: Low=stealthChop, High=spreadCycle  
DI (pd) DIR input (internal pull down resistor)  
Enable not input. The power stage becomes switched off (all motor  
outputs floating) when this pin becomes driven to a high level.  
DI (pd) STEP input (internal pull down resistor)  
Unused pin, leave open or connect to GND for compatibility to future  
versions.  
ENN  
STEP  
N.C.  
24  
25  
26  
DI  
CLK input. Tie to GND using short wire for internal clock or supply  
external clock.  
Connect the exposed die pad to a GND plane. Provide as many as  
possible vias for heat transfer to GND plane. Serves as GND pin for  
power drivers and analogue circuitry.  
CLK  
27  
-
DI  
Exposed  
die pad  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
12  
2.7 Package Outline TMC2225  
GND  
INDEX  
MS2  
CPO  
CPI  
VCP  
VS  
MS1  
OA2  
BRA  
OA1  
OB1  
BRB  
OB2  
VS  
VREF  
TEST  
GND  
CLK  
-
STEP  
ENN  
DIR  
SPREAD  
DIAG  
PDN_UART  
VCC_IO  
5VOUT  
TMC2225  
HTSSOP28  
© B. Dwersteg,  
TRINAMIC  
Pad=GND  
Figure 2.4 TMC2225 Pinning Top View type: HTSSOP28, 9.7x6.4mm² over pins, 0.65mm pitch  
2.8 Signal Descriptions TMC2225  
Pin  
Number Type  
Function  
CPO  
CPI  
VCP  
1
2
3
Charge pump capacitor output.  
Charge pump capacitor input. Tie to CPO using 22nF 50V capacitor.  
Charge pump voltage. Tie to VS using 100nF capacitor.  
Motor supply voltage. Provide filtering capacity near pin with  
shortest possible loop to GND pad.  
VS  
4, 11  
OA2  
BRA  
5
6
Motor coil A output 2  
Sense resistor connection for coil A. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Motor coil A output 1  
OA1  
OB1  
7
8
Motor coil B output 1  
Sense resistor connection for coil B. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Motor coil B output 2  
Analog reference voltage for current scaling or reference current for  
use of internal sense resistors (optional mode)  
Connect to GND. May alternatively be left open or connected to VREF.  
GND. Connect to GND plane near pin.  
BRB  
OB2  
VREF  
9
10  
12  
AI  
TEST  
GND  
13  
14, 28  
Output of internal 5V regulator. Attach 2.2µF to 4.7µF ceramic  
capacitor to GND near to pin for best performance. Provide the  
shortest possible loop to the GND pad.  
3.3V to 5V IO supply voltage for all digital pins.  
Power down not control input (low = automatic standstill current  
reduction). (internal pull down resistor)  
5VOUT  
VCC_IO  
15  
16  
DIO  
(pd)  
PDN_UART 17  
Optional UART Input/Output. Power down function can be disabled  
in UART mode.  
DIAG  
SPREAD  
DIR  
18  
19  
20  
DO  
Diagnostic output. Hi level upon driver error. Reset by ENN=high.  
DI (pd) Chopper mode selection: Low=stealthChop, High=spreadCycle  
DI (pd) DIR input (internal pull down resistor)  
Enable not input. The power stage becomes switched off (all motor  
outputs floating) when this pin becomes driven to a high level.  
ENN  
21  
DI  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
13  
Pin  
Number Type  
Function  
STEP  
22  
DI (pd) STEP input (internal pull down resistor)  
Unused pin, leave open or connect to GND for compatibility to future  
versions.  
CLK input. Tie to GND using short wire for internal clock or supply  
external clock.  
N.C.  
CLK  
23  
24  
DI  
MS1  
MS2  
INDEX  
25  
26  
27  
DI (pd) Microstep resolution configuration (internal pull down resistors)  
MS2, MS1: 00: 1/4, 01: 1/8, 10: 1/16, 11: 1/32  
DI (pd)  
DO  
Configurable index output. Provides index pulse.  
Connect the exposed die pad to a GND plane. Provide as many as  
possible vias for heat transfer to GND plane. Serves as GND pin for  
power drivers and analogue circuitry.  
Exposed  
die pad  
-
2.9 Package Outline TMC2220  
36  
35  
34  
33  
32  
31  
30  
29  
28  
27  
26  
25  
1
OB1  
OA1  
OA1  
-
2
OB1  
3
-
4
VS  
VS  
5
VS  
VS  
TMC2220-TA  
TQFP-48  
9mm x 9mm  
6
-
VCP  
CPI  
-
7
-
8
TEST  
9
GND  
CPO  
GND  
VREF  
MS2  
10  
VCC_IO  
Pad = GND  
11  
12  
PDN_UART  
DIAG  
Figure 2.5 TMC2220 Pinning Top View type: TQFP-EP 48, 9x9mm² over pins, 0.5mm pitch  
2.10 Signal Descriptions TMC2220  
Pin  
Number Type  
Function  
OB1  
1, 2  
Motor coil B output 1  
4, 5, 32,  
33  
Motor supply voltage. Provide filtering capacity near pin with  
shortest possible loop to GND pad.  
VS  
TEST  
GND  
VCC_IO  
8
Connect to GND. May alternatively be left open.  
GND. Connect to GND plane near pin.  
9, 14,  
27  
10, 24  
3.3V to 5V IO supply voltage for all digital pins.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
14  
Pin  
Number Type  
Function  
Power down not control input (low = automatic standstill current  
reduction). (internal pull down resistor)  
Optional UART Input/Output. Power down function can be disabled  
in UART mode.  
DIO  
(pd)  
PDN_UART 11  
Output of internal 5V regulator. Attach 2.2µF to 4.7µF ceramic  
capacitor to GND near to pin for best performance. Provide the  
shortest possible loop to the GND pad.  
5VOUT  
15  
5VIN  
16  
12  
17  
18  
Input of 5V supply. Directly connect to 5VOUT terminal.  
Diagnostic output. Hi level upon driver error. Reset by ENN=high.  
DI (pd) Chopper mode selection: Low=stealthChop, High=spreadCycle  
DI (pd) DIR input (internal pull down resistor)  
DIAG  
SPREAD  
DIR  
DO  
Enable not input. The power stage becomes switched off (all motor  
outputs floating) when this pin becomes driven to a high level.  
ENN  
19  
DI  
STEP  
INDEX  
20  
21  
DI (pd) STEP input (internal pull down resistor)  
DO  
Configurable index output. Provides index pulse.  
CLK input. Tie to GND using short wire for internal clock or supply  
external clock.  
CLK  
22  
DI  
MS1  
MS2  
23  
25  
DI (pd) Microstep resolution configuration (internal pull down resistors)  
MS2, MS1: 00: 1/4, 01: 1/8, 10: 1/16, 11: 1/32  
DI (pd)  
Analog reference voltage for current scaling or reference current for  
use of internal sense resistors (optional mode)  
Charge pump capacitor output.  
Charge pump capacitor input. Tie to CPO using 22nF 50V capacitor.  
Charge pump voltage. Tie to VS using 100nF capacitor.  
Motor coil A output 1  
VREF  
26  
AI  
CPO  
CPI  
VCP  
OA1  
28  
30  
31  
35, 36  
Sense resistor connection for coil A. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Motor coil A output 2  
BRA  
37, 38  
OA2  
OB2  
40, 41  
44, 45  
Motor coil B output 2  
Sense resistor connection for coil B. Place sense resistor to GND near  
pin. Tie to GND when using internal sense resistor.  
Unused pin, leave open or connect to GND for compatibility to future  
versions.  
BRB  
N.C.  
47, 48  
Connect the exposed die pad to a GND plane. Provide as many as  
possible vias for heat transfer to GND plane. Serves as GND pin for  
power drivers and analogue circuitry.  
Exposed  
die pad  
-
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
15  
3 Sample Circuits  
The sample circuits show the connection of external components in different operation and supply  
modes. The connection of the bus interface and further digital signals is left out for clarity.  
3.1 Standard Application Circuit  
Place near IC with  
short path to die pad  
2.2µ  
6.3V  
22n  
50V  
100n  
16V  
+VM  
VS  
TMC22xx  
STEP  
DIR  
100n  
100n  
100µF  
Step and Direction  
motion control  
5V Voltage  
regulator  
Analog Scaling  
Step&Dir input  
charge pump  
Full Bridge A  
VREF  
IREF  
Low ESR type  
OA1  
OA2  
Step Pulse  
Generator  
Stand Still  
Current  
Reduction  
N
stepper  
motor  
S
Configuration  
Memory (OTP)  
MS1  
MS2  
RSA  
Configuration  
(GND or VCC_IO)  
BRA  
stealthChop2  
Driver  
Configuration  
Interface  
SPREAD  
(only TMC222x)  
IREF  
256 Microstep  
Sequencer  
Integrated  
Rsense  
Connect directly  
to GND plane  
PDN/UART  
B. Dwersteg, ©  
TRINAMIC 2016  
optional UART interface  
Use low inductivity SMD  
type, e.g. 1206, 0.5W for  
RSA and RSB  
UART interface  
+ Register Block  
spreadCycle  
DIAG  
Programmable  
Diagnostic  
Outputs  
Driver error  
Index pulse  
OB1  
OB2  
INDEX  
Full Bridge B  
(not with TMC2202)  
Trimmed  
CLK oscillator/  
selector  
opt. ext. clock  
10-16MHz  
CLK_IN  
RSB  
BRB  
3.3V or 5V  
I/O voltage  
VCC_IO  
Connect directly  
to GND plane  
100n  
opt. driver enable  
Figure 3.1 Standard application circuit  
The standard application circuit uses a minimum set of additional components. Two sense resistors  
set the motor coil current. See chapter 8 to choose the right sense resistors. Use low ESR capacitors  
for filtering the power supply. The capacitors need to cope with the current ripple cause by chopper  
operation. A minimum capacity of 100µF near the driver is recommended for best performance.  
Current ripple in the supply capacitors also depends on the power supply internal resistance and  
cable length. VCC_IO can be supplied from 5VOUT, or from an external source, e.g. a 3.3V regulator.  
Basic layout hints  
Place sense resistors and all filter capacitors as close as possible to the related IC pins. Use a solid  
common GND for all GND connections, also for sense resistor GND. Connect 5VOUT filtering capacitor  
directly to 5VOUT and the die pad. See layout hints for more details. Low ESR electrolytic capacitors  
are recommended for VS filtering.  
3.2 Internal RDSon Sensing  
For cost critical or space limited applications, sense resistors can be omitted. For internal current  
sensing, a reference current set by a tiny external resistor programs the output current. For calculation  
of the reference resistor, refer chapter 9.1.  
Attention  
Be sure to switch the IC to RDSon mode, before enabling drivers: Set otp_internalRsense = 1.  
www.trinamic.com  
 
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
16  
Place near IC with  
short path to die pad  
RREF  
2.2µ  
6.3V  
22n  
50V  
100n  
16V  
+VM  
VS  
TMC22xx  
STEP  
100n  
100n  
100µF  
Step and Direction  
motion control  
5V Voltage  
regulator  
Analog Scaling  
Step&Dir input  
charge pump  
Full Bridge A  
DIR  
VREF  
IREF  
Low ESR type  
OA1  
OA2  
Step Pulse  
Generator  
Stand Still  
Current  
Reduction  
N
stepper  
motor  
S
Configuration  
Memory (OTP)  
MS1  
MS2  
Configuration  
(GND/open or VCC_IO)  
BRA  
Connect directly  
to GND plane  
stealthChop2  
Driver  
Configuration  
Interface  
SPREAD  
(only TMC222x)  
IREF  
256 Microstep  
Sequencer  
Integrated  
Rsense  
PDN/UART  
B. Dwersteg, ©  
TRINAMIC 2016  
UART interface  
+ Register Block  
Attention:  
optional UART interface  
Start with ENN=high!  
Set GCONF.1 or OTP0.6  
prior to enabling the driver!  
spreadCycle  
DIAG  
Programmable  
Diagnostic  
Outputs  
Driver error  
Index pulse  
OB1  
OB2  
INDEX  
Full Bridge B  
(not with TMC2202)  
Trimmed  
CLK oscillator/  
selector  
opt. ext. clock  
10-16MHz  
CLK_IN  
BRB  
Connect directly  
to GND plane  
3.3V or 5V  
I/O voltage  
VCC_IO  
100n  
opt. driver enable  
Figure 3.2 Application circuit using RDSon based sensing  
3.3 5V Only Supply  
10R  
Place near IC with  
Optional bridges the  
short path to die pad  
internal 5V reference  
10µ  
6.3V  
22n  
50V  
100n  
16V  
4.7-5.4V  
VS  
TMC22xx  
STEP  
DIR  
100n  
100n  
100µF  
Step and Direction  
motion control  
5V Voltage  
regulator  
Analog Scaling  
Step&Dir input  
charge pump  
Full Bridge A  
VREF  
IREF  
Low ESR type  
OA1  
OA2  
Step Pulse  
Generator  
Stand Still  
Current  
Reduction  
N
stepper  
motor  
S
Configuration  
Memory (OTP)  
MS1  
MS2  
RSA  
Configuration  
(GND/open or VCC_IO)  
BRA  
stealthChop2  
Driver  
Configuration  
Interface  
SPREAD  
(only TMC222x)  
IREF  
256 Microstep  
Sequencer  
Integrated  
Rsense  
Connect directly  
to GND plane  
PDN/UART  
B. Dwersteg, ©  
TRINAMIC 2016  
optional UART interface  
Use low inductivity SMD  
type, e.g. 1206, 0.5W for  
RSA and RSB  
UART interface  
+ Register Block  
spreadCycle  
DIAG  
Programmable  
Diagnostic  
Outputs  
Driver error  
Index pulse  
OB1  
OB2  
INDEX  
Full Bridge B  
(not with TMC2202)  
Trimmed  
CLK oscillator/  
selector  
opt. ext. clock  
10-16MHz  
CLK_IN  
RSB  
BRB  
3.3V or 5V  
I/O voltage  
VCC_IO  
Connect directly  
to GND plane  
100n  
opt. driver enable  
Figure 3.3 5V only operation  
While the standard application circuit is limited to roughly 5.2V lower supply voltage, a 5V only  
application lets the IC run from a 5V +/-5% supply. In this application, linear regulator drop must be  
www.trinamic.com  
 
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
17  
minimized. Therefore, the internal 5V regulator is filtered with a higher capacitance. An optional  
resistor bridges the internal 5V regulator by connecting 5VOUT to the external power supply. This RC  
filter keeps chopper ripple away from 5VOUT. With this resistor, the external supply is the reference  
for the absolute motor current and must not exceed 5.5V.  
3.4 Configuration Pins  
The TMC22xx family members provide three or four configuration pins depending on the package  
option. These pins allow quick configuration for standalone operation. Several additional options can  
be set by OTP programming. In UART mode, the configuration pins can be disabled in order to set a  
different configuration via registers.  
PDN_UART: CONFIGURATION OF STANDSTILL POWER DOWN  
PDN_UART  
GND  
VCC_IO  
Current Setting  
Enable automatic power down in standstill periods  
Disable  
UART interface  
When using the UART interface, the configuration pin should be disabled via  
GCONF.pdn_disable = 1. Program IHOLD as desired for standstill periods.  
OPTIONS FOR TMC220X DEVICES, ONLY:  
MS1/MS2: CONFIGURATION OF MICROSTEP RESOLUTION FOR STEP INPUT (TMC220X)  
MS2  
GND  
GND  
MS1  
GND  
Microstep Setting  
8 microsteps  
VCC_IO 2 microsteps (half step)  
4 microsteps (quarter step)  
VCC_IO GND  
VCC_IO VCC_IO 16 microsteps  
OPTIONS FOR TMC222X DEVICES, ONLY:  
SPREAD (ONLY WITH TMC222X): SELECTION OF CHOPPER MODE  
SPREAD  
Chopper Setting  
GND or  
stealthChop is selected. Automatic switching to spreadCycle in dependence of  
the step frequency can be programmed via OTP.  
Pin open / not  
available  
VCC_IO  
spreadCycle operation.  
MS1/MS2: CONFIGURATION OF MICROSTEP RESOLUTION FOR STEP INPUT (TMC222X)  
MS2  
GND  
GND  
MS1  
GND  
Microstep Setting  
4 microsteps (quarter step)  
VCC_IO 8 microsteps  
16 microsteps  
VCC_IO GND  
VCC_IO VCC_IO 32 microsteps  
3.5 High Motor Current  
When operating at a high motor current, the driver power dissipation due to MOSFET switch on-  
resistance significantly heats up the driver. This power dissipation will significantly heat up the PCB  
cooling infrastructure, if operated at an increased duty cycle. This in turn leads to a further increase of  
driver temperature. An increase of temperature by about 100°C increases MOSFET resistance by  
roughly 50%. This is a typical behavior of MOSFET switches. Therefore, under high duty cycle, high  
load conditions, thermal characteristics have to be carefully taken into account, especially when  
increased environment temperatures are to be supported. Refer the thermal characteristics and the  
layout hints for more information. As a thumb rule, thermal properties of the PCB design become  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
18  
critical for the tiny QFN 5mm x 5mm package at or above 1A RMS motor current for increased periods  
of time. Keep in mind that resistive power dissipation raises with the square of the motor current. On  
the other hand, this means that a small reduction of motor current significantly saves heat dissipation  
and energy.  
Pay special attention to good thermal properties of your PCB layout, when going for 1A RMS current  
or more.  
An effect which might be perceived at medium motor velocities and motor sine wave peak currents  
above roughly 1.4A peak is a slight sine distortion of the current wave when using spreadCycle. It  
results from an increasing negative impact of parasitic internal diode conduction, which in turn  
negatively influences the duration of the fast decay cycle of the spreadCycle chopper. This is, because  
the current measurement does not see the full coil current during this phase of the sine wave,  
because an increasing part of the current flows directly from the power MOSFETs’ drain to GND and  
does not flow through the sense resistor. This effect with most motors does not negatively influence  
the smoothness of operation, as it does not impact the critical current zero transition. The effect does  
not occur with stealthChop.  
3.6 Driver Protection and EME Circuitry  
Some applications have to cope with ESD events caused by motor operation or external influence.  
Despite ESD circuitry within the driver chips, ESD events occurring during operation can cause a reset  
or even a destruction of the motor driver, depending on their energy. Especially plastic housings and  
belt drive systems tend to cause ESD events of several kV. It is best practice to avoid ESD events by  
attaching all conductive parts, especially the motors themselves to PCB ground, or to apply electrically  
conductive plastic parts. In addition, the driver can be protected up to a certain degree against ESD  
events or live plugging / pulling the motor, which also causes high voltages and high currents into  
the motor connector terminals. A simple scheme uses capacitors at the driver outputs to reduce the  
dV/dt caused by ESD events. Larger capacitors will bring more benefit concerning ESD suppression,  
but cause additional current flow in each chopper cycle, and thus increase driver power dissipation,  
especially at high supply voltages. The values shown are example values they may be varied  
between 100pF and 1nF. The capacitors also dampen high frequency noise injected from digital parts  
of the application PCB circuitry and thus reduce electromagnetic emission. A more elaborate scheme  
uses LC filters to de-couple the driver outputs from the motor connector. Varistors in between of the  
coil terminals eliminate coil overvoltage caused by live plugging. Optionally protect all outputs by a  
varistor to GND against ESD voltage.  
470pF  
100V  
50Ohm  
100MHz  
@
V1A  
V1B  
OA1  
OA2  
OA1  
OA2  
N
N
V1  
Full Bridge  
A
stepper  
motor  
Full Bridge  
A
stepper  
motor  
S
S
50Ohm  
100MHz  
@
470pF  
100V  
470pF  
100V  
470pF  
100V  
BRA  
100nF  
16V  
Driver  
Driver  
RSA  
470pF  
100V  
50Ohm  
100MHz  
@
V2A  
V2B  
OB1  
OB2  
OB1  
OB2  
V2  
Full Bridge  
B
Full Bridge B  
50Ohm  
100MHz  
@
Varistors V1 and V2 protect  
against inductive motor coil  
overvoltage.  
470pF  
100V  
470pF  
100V  
470pF  
100V  
BRB  
Fit varistors to supply voltage  
rating. SMD inductivities  
conduct full motor coil  
current.  
V1A, V1B, V2A, V2B:  
Optional position for varistors  
in case of heavy ESD events.  
100nF  
16V  
RSB  
Figure 3.4 Simple ESD enhancement and more elaborate motor output protection  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
19  
UART  
4 UART Single Wire Interface  
The UART single wire interface allows control of the TMC22xx with any microcontroller UART. It shares  
transmit and receive line like an RS485 based interface. Data transmission is secured using a cyclic  
redundancy check, so that increased interface distances (e.g. over cables between two PCBs) can be  
bridged without danger of wrong or missed commands even in the event of electro-magnetic  
disturbance. The automatic baud rate detection makes this interface easy to use.  
4.1 Datagram Structure  
4.1.1 Write Access  
UART WRITE ACCESS DATAGRAM STRUCTURE  
each byte is LSB…MSB, highest byte transmitted first  
0 … 63  
8 bit slave  
address  
8…15  
RW + 7 bit  
register addr.  
16…23  
sync + reserved  
32 bit data  
CRC  
56…63  
CRC  
0…7  
24…55  
data bytes 3, 2, 1, 0  
(high to low byte)  
Reserved (don’t cares  
but included in CRC)  
register  
1
0
1
0
SLAVEADDR=0  
1
address  
A sync nibble precedes each transmission to and from the TMC22xx and is embedded into the first  
transmitted byte, followed by an addressing byte (0 for TMC22xx). Each transmission allows a  
synchronization of the internal baud rate divider to the master clock. The actual baud rate is adapted  
and variations of the internal clock frequency are compensated. Thus, the baud rate can be freely  
chosen within the valid range. Each transmitted byte starts with a start bit (logic 0, low level on  
SWIOP) and ends with a stop bit (logic 1, high level on SWIOP). The bit time is calculated by  
measuring the time from the beginning of start bit (1 to 0 transition) to the end of the sync frame (1  
to 0 transition from bit 2 to bit 3). All data is transmitted bytewise. The 32 bit data words are  
transmitted with the highest byte first.  
A minimum baud rate of 9000 baud is permissible, assuming 20MHz clock (worst case for low baud  
rate). Maximum baud rate is fCLK/16 due to the required stability of the baud clock.  
The slave address SLAVEADDR is always 0 for the TMC22xx.  
The communication becomes reset if a pause time of longer than 63 bit times between the start bits  
of two successive bytes occurs. This timing is based on the last correctly received datagram. In this  
case, the transmission needs to be restarted after a failure recovery time of minimum 12 bit times of  
bus idle time. This scheme allows the master to reset communication in case of transmission errors.  
Any pulse on an idle data line below 16 clock cycles will be treated as a glitch and leads to a timeout  
of 12 bit times, for which the data line must be idle. Other errors like wrong CRC are also treated the  
same way. This allows a safe re-synchronization of the transmission after any error conditions.  
Remark, that due to this mechanism an abrupt reduction of the baud rate to less than 15 percent of  
the previous value is not possible.  
Each accepted write datagram becomes acknowledged by the receiver by incrementing an internal  
cyclic datagram counter (8 bit). Reading out the datagram counter allows the master to check the  
success of an initialization sequence or single write accesses. Read accesses do not modify the  
counter.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
20  
The UART line must be logic high during idle state. Therefore, the power down function cannot be  
assigned by the pin PDN_UART in between of transmissions. In an application using the UART  
interface, set the desired power down function by register access and set pdn_disable in GCONF to  
disable the pin function.  
4.1.2 Read Access  
UART READ ACCESS REQUEST DATAGRAM STRUCTURE  
each byte is LSB…MSB, highest byte transmitted first  
RW + 7 bit register  
sync + reserved  
8 bit slave address  
8…15  
CRC  
24…31  
CRC  
address  
16…23  
0...7  
Reserved (don’t cares  
but included in CRC)  
1
0
1
0
SLAVEADDR=0  
register address  
0
The read access request datagram structure is identical to the write access datagram structure, but  
uses a lower number of user bits. Its function is the addressing of the slave and the transmission of  
the desired register address for the read access. The TMC22xx responds with the same baud rate as  
the master uses for the read request.  
In order to ensure a clean bus transition from the master to the slave, the TMC22xx does not  
immediately send the reply to a read access, but it uses a programmable delay time after which the  
first reply byte becomes sent following a read request. This delay time can be set in multiples of  
eight bit times using SENDDELAY time setting (default=8 bit times) according to the needs of the  
master.  
UART READ ACCESS REPLY DATAGRAM STRUCTURE  
each byte is LSB…MSB, highest byte transmitted first  
0 ...... 63  
8 bit master  
address  
8…15  
RW + 7 bit  
register addr.  
16…23  
sync + reserved  
32 bit data  
CRC  
56…63  
CRC  
0…7  
24…55  
data bytes 3, 2, 1, 0  
(high to low byte)  
register  
1
0
1
0
reserved (0)  
0xFF  
0
address  
The read response is sent to the master using address code %11111111. The transmitter becomes  
switched inactive four bit times after the last bit is sent.  
Address %11111111 is reserved for read access replies going to the master.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
21  
4.2 CRC Calculation  
An 8 bit CRC polynomial is used for checking both read and write access. It allows detection of up to  
eight single bit errors. The CRC8-ATM polynomial with an initial value of zero is applied LSB to MSB,  
including the sync- and addressing byte. The sync nibble is assumed to always be correct. The  
TMC22xx responds only to correctly transmitted datagrams containing its own slave address. It  
increases its datagram counter for each correctly received write access datagram.  
퐶푅퐶 = 푥8 + 푥2 + 푥1 + 푥0  
SERIAL CALCULATION EXAMPLE  
CRC = (CRC << 1) OR (CRC.7 XOR CRC.1 XOR CRC.0 XOR [new incoming bit])  
C-CODE EXAMPLE FOR CRC CALCULATION  
void swuart_calcCRC(UCHAR* datagram, UCHAR datagramLength)  
{
int i,j;  
UCHAR* crc = datagram + (datagramLength-1); // CRC located in last byte of message  
UCHAR currentByte;  
*crc = 0;  
for (i=0; i<(datagramLength-1); i++) {  
currentByte = datagram[i];  
// Execute for all bytes of a message  
// Retrieve a byte to be sent from Array  
for (j=0; j<8; j++) {  
if ((*crc >> 7) ^ (currentByte&0x01))  
// update CRC based result of XOR operation  
{
*crc = (*crc << 1) ^ 0x07;  
}
else  
{
*crc = (*crc << 1);  
}
currentByte = currentByte >> 1;  
} // for CRC bit  
} // for message byte  
}
4.3 UART Signals  
The UART interface on the TMC22xx uses a single bi-direction pin:  
UART INTERFACE SIGNAL  
PDN_UART  
Non-inverted data input and output. I/O with Schmitt Trigger and VCC_IO level.  
The IC checks PDN_UART for correctly received datagrams with its own address continuously. It adapts  
to the baud rate based on the sync nibble, as described before. In case of a read access, it switches  
on its output drivers and sends its response using the same baud rate. The output becomes switched  
off four bit times after transfer of the last stop bit.  
TMC22xx  
(R/W access)  
TMC22xx #1  
(write only access)  
TMC22xx #2  
(write only access)  
TXD  
RXD  
Master CPU  
(µC with UART)  
Master CPU  
(µC with UART)  
1k  
TXD  
Figure 4.1 Attaching the TMC22xx to a microcontroller UART  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
22  
4.4 Addressing Multiple Slaves  
WRITE ONLY ACCESS  
If read access is not used, and all slaves are to be programmed with the same initialization values, no  
addressing is required. All slaves can be programmed in parallel like a single device (Figure 4.1.).  
ADDRESSING MULTIPLE SLAVES  
As the TMC22xx uses a fixed UART address, in principle only one IC can be accessed per UART  
interface channel. Adding analog switches allows separated access to individual ICs. This scheme is  
similar to an SPI bus with individual slave select lines (Figure 4.2).  
TMC22xx  
#1  
TMC22xx  
#2  
TMC22xx  
#3  
+VIO  
+VIO  
+VIO  
22k  
22k  
22k  
¼ 74HC4066  
Port pin  
Port pin  
Port pin  
Port pin  
TXD  
Select#1  
¼ 74HC4066  
Select#2  
¼ 74HC4066  
Select#3  
Master CPU  
(µC with UART)  
74HC1G125  
buffer  
1k  
RXD  
Optional  
for  
transmission over long  
lines or many slaves.  
Figure 4.2 Addressing multiple TMC22xx via single wire interface using analog switches  
PROCEED AS FOLLOWS TO CONTROL MULTIPLE SLAVES:  
-
-
-
Set the UART to 8 bits, no parity. Select a baud rate safely within the valid range. At  
250kBaud, a write access transmission requires 320µs (=8 Bytes * (8+2) bits * 4µs).  
Before starting an access, activate the select pin going to the analog switch by setting it high.  
All other slaves select lines shall be off, unless a broadcast is desired.  
When using the optional buffer, set TMC22xx transmission send delay to an appropriate value  
allowing the µC to switch off the buffer before receiving reply data.  
-
-
To start a transmission, activate the TXD line buffer by setting the control pin low.  
When sending a read access request, switch off the buffer after transmission of the last stop  
bit is finished.  
-
Take into account, that all transmitted data also is received by the RXD input.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
23  
UART  
5 Register Map  
This chapter gives an overview of the complete register set. Some of the registers bundling a number  
of single bits are detailed in extra tables. The functional practical application of the settings is detailed  
in dedicated chapters.  
Note  
- Reset default: All registers become reset to 0 upon power up, unless otherwise noted.  
- Add 0x80 to the address Addr for write accesses!  
NOTATION OF HEXADECIMAL AND BINARY NUMBERS  
0x  
%
precedes a hexadecimal number, e.g. 0x04  
precedes a multi-bit binary number, e.g. %100  
NOTATION OF R/W FIELD  
R
Read only  
W
Write only  
R/W  
R+C  
Read- and writable register  
Clear upon read  
OVERVIEW REGISTER MAPPING  
REGISTER  
DESCRIPTION  
General Configuration Registers  
These registers contain  
-
-
-
-
global configuration  
global status flags  
OTP read access and programming  
interface configuration  
Velocity Dependent Driver Feature Control Register This register set offers registers for  
Set  
-
-
-
driver current control, stand still reduction  
setting thresholds for different chopper modes  
internal pulse generator control  
Chopper Register Set  
This register set offers registers for  
-
optimization of stealthChop2 and spreadCycle  
and read out of internal values  
passive braking and freewheeling options  
driver diagnostics  
-
-
-
driver enable / disable  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
24  
5.1 General Registers  
GENERAL CONFIGURATION REGISTERS (0X00…0X0F)  
R/W  
Addr  
n
Register  
Description / bit names  
Bit GCONF Global configuration flags  
0 I_scale_analog (Reset default=1)  
0:  
Use internal reference derived from 5VOUT  
1:  
Use voltage supplied to VREF as current reference  
1 internal_Rsense (Reset default: OTP)  
0:  
Operation with external sense resistors  
1:  
Internal sense resistors. Use current supplied into  
VREF as reference for internal sense resistor. VREF  
pin internally is driven to GND in this mode.  
2 en_spreadCycle (Reset default: OTP)  
0:  
stealthChop PWM mode enabled (depending on  
velocity thresholds). Initially switch from off to  
on state while in stand still, only.  
1:  
spreadCycle mode enabled  
A high level on the pin SPREAD (TMC222x, only) inverts  
this flag to switch between both chopper modes.  
3 shaft  
1:  
4 index_otpw  
Inverse motor direction  
0:  
INDEX shows the first microstep position of  
sequencer  
1:  
INDEX pin outputs overtemperature prewarning  
flag (otpw) instead  
5 index_step  
RW  
0x00  
10  
GCONF  
0:  
INDEX output as selected by index_otpw  
1:  
INDEX output shows step pulses from internal  
pulse generator (toggle upon each step)  
6 pdn_disable  
0:  
PDN_UART controls standstill current reduction  
1:  
PDN_UART input function disabled. Set this bit,  
when using the UART interface!  
7 mstep_reg_select  
0:  
1:  
Microstep resolution selected by pins MS1, MS2  
Microstep resolution selected by MSTEP register  
8 multistep_filt (Reset default=1)  
0:  
No filtering of STEP pulses  
1:  
Software pulse generator optimization enabled  
when fullstep frequency > 750Hz (roughly). TSTEP  
shows filtered step time values when active.  
9 test_mode  
0:  
1:  
Normal operation  
Enable analog test output on pin ENN (pull down  
resistor off), ENN treated as enabled.  
IHOLD[1..0] selects the function of DCO:  
0…2: T120, DAC, VDDH  
Attention: Not for user, set to 0 for normal operation!  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
25  
GENERAL CONFIGURATION REGISTERS (0X00…0X0F)  
R/W  
Addr  
n
Register  
Description / bit names  
Bit GSTAT Global status flags  
(Re-Write with ‘1’ bit to clear respective flags)  
0 reset  
1:  
Indicates that the IC has been reset since the last  
read access to GSTAT. All registers have been  
cleared to reset values.  
1 drv_err  
R+  
WC  
1:  
Indicates, that the driver has been shut down  
0x01  
3
GSTAT  
due to overtemperature or short circuit detection  
since the last read access. Read DRV_STATUS for  
details. The flag can only be cleared when all  
error conditions are cleared.  
2 uv_cp  
1:  
Indicates an undervoltage on the charge pump.  
The driver is disabled in this case. This flag is not  
latched and thus does not need to be cleared.  
Interface transmission counter. This register becomes  
incremented with each successful UART interface write  
access. Read out to check the serial transmission for  
lost data. Read accesses do not change the content.  
The counter wraps around from 255 to 0.  
R
0x02  
0x03  
8
4
IFCNT  
Bit  
SLAVECONF  
11..8 SENDDELAY for read access (time until reply is sent):  
0, 1:  
2, 3:  
4, 5:  
6, 7:  
8, 9:  
8 bit times  
3*8 bit times  
5*8 bit times  
7*8 bit times  
9*8 bit times  
W
SLAVECONF  
10, 11: 11*8 bit times  
12, 13: 13*8 bit times  
14, 15: 15*8 bit times  
Bit  
OTP_PROGRAM OTP programming  
Write access programs OTP memory (one bit at a time),  
Read access refreshes read data from OTP after a write  
2..0 OTPBIT  
Selection of OTP bit to be programmed to the selected  
byte location (n=0..7: programs bit n to a logic 1)  
W
0x04  
16 OTP_PROG  
5..4 OTPBYTE  
Selection of OTP programming location (0, 1 or 2)  
15..8 OTPMAGIC  
Set to 0xbd to enable programming. A programming  
time of minimum 10ms per bit is recommended (check  
by reading OTP_READ).  
Bit  
OTP_READ (Access to OTP memory result and update)  
See separate table!  
7..0  
OTP0 byte 0 read data  
R
R
0x05  
0x06  
24 OTP_READ  
15..8 OTP1 byte 1 read data  
23..16 OTP2 byte 2 read data  
Bit  
INPUT (Reads the state of all input pins available)  
0 ENN (TMC220x)  
1 PDN_UART (TMC222x)  
2 MS1 (TMC220x), SPREAD (TMC222x)  
3 MS2 (TMC220x), DIR (TMC222x)  
10  
+
IOIN  
8
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
26  
GENERAL CONFIGURATION REGISTERS (0X00…0X0F)  
R/W  
Addr  
n
Register  
Description / bit names  
4 DIAG (TMC220x), ENN (TMC222x)  
5 STEP (TMC222x)  
6 PDN_UART (TMC220x), MS1 (TMC222x)  
7 STEP (TMC220x), MS2 (TMC222x)  
8 SEL_A: Driver type  
1: TMC220x  
0: TMC222x  
9 DIR (TMC220x)  
31.. VERSION: 0x20=first version of the IC  
24 Identical numbers mean full digital compatibility.  
4..0 FCLKTRIM (Reset default: OTP)  
0…31: Lowest to highest clock frequency. Check at  
charge pump output. The frequency span is not  
guaranteed, but it is tested, that tuning to 12MHz  
internal clock is possible. The devices come preset to  
12MHz clock frequency by OTP programming.  
FACTORY_  
CONF  
RW  
0x07  
5+2  
9..8 OTTRIM  
(Default: OTP)  
OT=143°C, OTPW=120°C  
OT=150°C, OTPW=120°C  
OT=150°C, OTPW=143°C  
OT=157°C, OTPW=143°C  
%00:  
%01:  
%10:  
%11:  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
27  
5.1.1 OTP_READ OTP configuration memory  
The OTP memory holds power up defaults for certain registers. All OTP memory bits are cleared to 0  
by default. Programming only can set bits, clearing bits is not possible. Factory tuning of the clock  
frequency affects otp0.0 to otp0.4. The state of these bits therefore may differ between individual ICs.  
0X05: OTP_READ OTP MEMORY MAP  
Bit Name  
Function  
Comment  
23 otp2.7  
otp_en_spreadCycle  
This flag determines if the driver defaults to spreadCycle  
or to stealthChop.  
0
Default: stealthChop (GCONF.en_spreadCycle=0)  
OTP 1.0 to 1.7 and 2.0 used for stealthChop  
spreadCycle settings: HEND=0; HSTART=5; TOFF=3  
Default: spreadCycle (GCONF.en_spreadCycle=1)  
OTP 1.0 to 1.7 and 2.0 used for spreadCycle  
stealthChop settings: PWM_GRAD=0; TPWM_THRS=0;  
PWM_OFS=36; pwm_autograd=1  
1
22 otp2.6  
21 otp2.5  
OTP_IHOLD  
Reset default for standstill current IHOLD (used only if  
current reduction enabled, e.g. pin PDN_UART low).  
%00: IHOLD= 16  
(53% of IRUN)  
( 9% of IRUN)  
(28% of IRUN)  
(78% of IRUN)  
%01: IHOLD=  
2
%10: IHOLD=  
8
%11: IHOLD= 24  
(Reset default for run current IRUN=31)  
Reset default for IHOLDDELAY  
%00: IHOLDDELAY= 1  
20 otp2.4  
19 otp2.3  
OTP_IHOLDDELAY  
%01: IHOLDDELAY= 2  
%10: IHOLDDELAY= 4  
%11: IHOLDDELAY= 8  
18 otp2.2  
17 otp2.1  
16 otp2.0  
otp_PWM_FREQ  
otp_PWM_REG  
otp_PWM_OFS  
Reset default for PWM_FREQ:  
0: PWM_FREQ=%01=2/683  
1: PWM_FREQ=%10=2/512  
Reset default for PWM_REG:  
0: PWM_REG=%1000: max. 4 increments / cycle  
1: PWM_REG=%0010: max. 1 increment / cycle  
Depending on otp_en_spreadCycle  
0
0: PWM_OFS=36  
1: PWM_OFS=00 (no feed forward scaling);  
pwm_autograd=0  
OTP_CHOPCONF8  
OTP_TPWMTHRS  
1
Reset default for CHOPCONF.8 (hend1)  
15 otp1.7  
14 otp1.6  
13 otp1.5  
Depending on otp_en_spreadCycle  
0 Reset default for TPWM_THRS as defined by (0..7):  
0: TPWM_THRS=  
0
1: TPWM_THRS= 200  
2: TPWM_THRS= 300  
3: TPWM_THRS= 400  
4: TPWM_THRS= 500  
5: TPWM_THRS= 800  
6: TPWM_THRS= 1200  
7: TPWM_THRS= 4000  
OTP_CHOPCONF7...5  
otp_pwm_autograd  
1
Reset default for CHOPCONF.5 to CHOPCONF.7  
(hstrt1, hstrt2 and hend0)  
12 otp1.4  
Depending on otp_en_spreadCycle  
0
0: pwm_autograd=1  
1: pwm_autograd=0  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
28  
0X05: OTP_READ OTP MEMORY MAP  
Bit Name  
Function  
OTP_CHOPCONF4  
Comment  
Reset  
(pwm_autograd=1)  
Depending on otp_en_spreadCycle  
0 Reset default for PWM_GRAD as defined by (0..15):  
1
default  
for  
CHOPCONF.4  
(hstrt0);  
11 otp1.3  
10 otp1.2  
OTP_PWM_GRAD  
0: PWM_GRAD= 14  
1: PWM_GRAD= 16  
2: PWM_GRAD= 18  
3: PWM_GRAD= 21  
4: PWM_GRAD= 24  
5: PWM_GRAD= 27  
6: PWM_GRAD= 31  
7: PWM_GRAD= 35  
8: PWM_GRAD= 40  
9: PWM_GRAD= 46  
10: PWM_GRAD= 52  
11: PWM_GRAD= 59  
12: PWM_GRAD= 67  
13: PWM_GRAD= 77  
14: PWM_GRAD= 88  
15: PWM_GRAD= 100  
9
8
otp1.1  
otp1.0  
OTP_CHOPCONF3...0  
otp_TBL  
1
Reset default for CHOPCONF.0 to CHOPCONF.3 (TOFF)  
7
6
5
otp0.7  
otp0.6  
otp0.5  
Reset default for TBL:  
0: TBL=%10  
1: TBL=%01  
Reset default for GCONF.internal_Rsense  
0: External sense resistors  
1: Internal sense resistors  
Reset default for OTTRIM:  
otp_internalRsense  
otp_OTTRIM  
0: OTTRIM= %00 (143°C)  
1: OTTRIM= %01 (150°C)  
(internal power stage temperature about 10°C above the  
sensor temperature limit)  
4
3
2
1
0
otp0.4  
otp0.3  
otp0.2  
otp0.1  
otp0.0  
OTP_FCLKTRIM  
Reset default for FCLKTRIM  
0: lowest frequency setting  
31: highest frequency setting  
Attention: This value is pre-programmed by factory clock  
trimming to the default clock frequency of 12MHz and  
differs between individual ICs! It should not be altered.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
29  
5.2 Velocity Dependent Control  
VELOCITY DEPENDENT DRIVER FEATURE CONTROL REGISTER SET (0X10…0X1F)  
R/W  
Addr  
n
Register  
Description / bit names  
Bit IHOLD_IRUN Driver current control  
4..0 IHOLD (Reset default: OTP)  
Standstill current (0=1/32 31=32/32)  
In combination with stealthChop mode, setting  
IHOLD=0 allows to choose freewheeling or coil  
short circuit (passive braking) for motor stand still.  
12..8 IRUN (Reset default=31)  
5
+
Motor run current (0=1/32 31=32/32)  
W
0x10  
5
+
4
IHOLD_IRUN  
Hint: Choose sense resistors in a way, that normal  
IRUN is 16 to 31 for best microstep performance.  
19..16 IHOLDDELAY (Reset default: OTP)  
Controls the number of clock cycles for motor  
power down after standstill is detected (stst=1) and  
TPOWERDOWN has expired. The smooth transition  
avoids a motor jerk upon power down.  
0:  
1..15:  
instant power down  
Delay per current reduction step in multiple  
of 2^18 clocks  
TPOWERDOWN (Reset default=20)  
Sets the delay time from stand still (stst) detection to motor  
current power down. Time range is about 0 to 5.6 seconds.  
0…((2^8)-1) * 2^18 tCLK  
Attention: A minimum setting of 2 is required to allow  
automatic tuning of stealthChop PWM_OFFS_AUTO.  
Actual measured time between two 1/256 microsteps derived  
from the step input frequency in units of 1/fCLK. Measured  
value is (2^20)-1 in case of overflow or stand still.  
TPOWER  
DOWN  
W
0x11  
0x12  
8
The TSTEP related threshold uses a hysteresis of 1/16 of the  
compare value to compensate for jitter in the clock or the step  
frequency: (Txxx*15/16)-1 is the lower compare value for each  
TSTEP based comparison.  
R
20 TSTEP  
This means, that the lower switching velocity equals the  
calculated setting, but the upper switching velocity is higher as  
defined by the hysteresis setting.  
Sets the upper velocity for stealthChop voltage PWM mode.  
TSTEP TPWMTHRS  
-
stealthChop PWM mode is enabled, if configured  
W
W
0x13  
0x22  
20 TPWMTHRS  
24 VACTUAL  
When the velocity exceeds the limit set by TPWMTHRS, the  
driver switches to spreadCycle.  
0: Disabled  
VACTUAL allows moving the motor by UART control.  
It gives the motor velocity in +-(2^23)-1 [µsteps / t]  
0: Normal operation. Driver reacts to STEP input.  
/=0: Motor moves with the velocity given by VACTUAL. Step  
pulses can be monitored via INDEX output. The motor  
direction is controlled by the sign of VACTUAL.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
30  
5.3 Sequencer Registers  
The sequencer registers have a pure informative character and are read-only. They help for special  
cases like storing the last motor position before power off in battery powered applications.  
MICROSTEPPING CONTROL REGISTER SET (0X60…0X6B)  
R/W  
Addr  
n
Register  
Description / bit names  
Range [Unit]  
Microstep counter. Indicates actual position 0…1023  
in the microstep table for CUR_A. CUR_B uses  
an offset of 256 into the table. Reading out  
MSCNT allows determination of the motor  
position within the electrical wave.  
R
0x6A  
10 MSCNT  
bit 8… 0:  
CUR_A (signed):  
+/-0...255  
Actual microstep current for  
motor phase A as read from the  
internal sine wave table (not  
scaled by current setting)  
9
+
9
R
0x6B  
MSCURACT  
bit 24… 16: CUR_B (signed):  
Actual microstep current for  
motor phase B as read from the  
internal sine wave table (not  
scaled by current setting)  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
31  
5.4 Chopper Control Registers  
DRIVER REGISTER SET (0X6C…0X7F)  
R/W  
Addr  
n
Register  
Description / bit names  
Chopper and driver configuration  
See separate table!  
Range [Unit]  
Reset default=  
0x10000053  
RW  
0x6C  
32 CHOPCONF  
Driver status flags and current level read  
back  
See separate table!  
stealthChop PWM chopper configuration  
See separate table!  
DRV_  
32  
R
0x6F  
0x70  
STATUS  
Reset default=  
0xC10D0024  
RW  
22 PWMCONF  
Results of stealthChop amplitude regulator.  
These values can be used to monitor  
automatic PWM amplitude scaling (255=max.  
voltage).  
bit 7… 0  
PWM_SCALE_SUM:  
0…255  
Actual PWM duty cycle. This  
value is used for scaling the  
values CUR_A and CUR_B read  
from the sine wave table.  
R
0x71  
9+8 PWM_SCALE  
bit 24… 16 PWM_SCALE_AUTO:  
signed  
9 Bit signed offset added to the -255…+255  
calculated PWM duty cycle. This  
is the result of the automatic  
amplitude regulation based on  
current measurement.  
These automatically generated values can be  
read out in order to determine a default /  
power up setting for PWM_GRAD and  
PWM_OFS.  
bit 7… 0  
PWM_OFS_AUTO:  
Automatically determined offset  
value  
0…255  
0…255  
R
0x72  
8+8 PWM_AUTO  
bit 23… 16 PWM_GRAD_AUTO:  
Automatically  
determined  
gradient value  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
32  
5.4.1 CHOPCONF Chopper Configuration  
0X6C: CHOPCONF CHOPPER CONFIGURATION  
Bit Name  
Function  
Comment  
31 diss2vs  
Low side short  
protection disable  
short to GND  
protection disable  
enable double edge  
step pulses  
0: Short protection low side is on  
1: Short protection low side is disabled  
0: Short to GND protection is on  
1: Short to GND protection is disabled  
1: Enable step impulse at each step edge to reduce step  
frequency requirement. This mode is not compatible  
with the step filtering function (multistep_filt)  
1: The actual microstep resolution (MRES) becomes  
extrapolated to 256 microsteps for smoothest motor  
operation.  
30 diss2g  
29 dedge  
28 intpol  
interpolation to 256  
microsteps  
(Default: 1)  
27 mres3  
26 mres2  
25 mres1  
24 mres0  
MRES  
%0000:  
micro step resolution  
Native 256 microstep setting.  
%0001 … %1000:  
128, 64, 32, 16, 8, 4, 2, FULLSTEP  
Reduced microstep resolution.  
The resolution gives the number of microstep entries per  
sine quarter wave.  
When choosing a lower microstep resolution, the driver  
automatically uses microstep positions which result in a  
symmetrical wave.  
Number of microsteps per step pulse = 2^MRES  
(Selection by pins unless disabled by GCONF.  
mstep_reg_select)  
23  
22  
21  
20  
19  
18  
-
reserved  
set to 0  
17 vsense  
sense resistor voltage  
based current scaling  
TBL  
0: Low sensitivity, high sense resistor voltage  
1: High sensitivity, low sense resistor voltage  
%00 … %11:  
Set comparator blank time to 16, 24, 32 or 40 clocks  
Hint: %00 or %01 is recommended for most applications  
(Default: OTP)  
16 tbl1  
15 tbl0  
blank time select  
14  
13  
12  
11  
-
reserved  
set to 0  
10 hend3  
HEND  
hysteresis low value  
OFFSET  
sine wave offset  
%0000 … %1111:  
Hysteresis is -3, -2, -1, 0, 1, …, 12  
(1/512 of this setting adds to current setting)  
This is the hysteresis value which becomes used for the  
hysteresis chopper.  
9
8
7
hend2  
hend1  
hend0  
(Default: OTP, resp. 5 in stealthChop mode)  
6
5
4
hstrt2  
hstrt1  
hstrt0  
HSTRT  
hysteresis start value  
added to HEND  
%000 … %111:  
Add 1, 2, …, 8 to hysteresis low value HEND  
(1/512 of this setting adds to current setting)  
Attention: Effective HEND+HSTRT 16.  
Hint: Hysteresis decrement is done each 16 clocks  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
33  
0X6C: CHOPCONF CHOPPER CONFIGURATION  
Bit Name  
Function  
Comment  
(Default: OTP, resp. 0 in stealthChop mode)  
3
2
1
0
toff3  
toff2  
toff1  
toff0  
TOFF off time  
and driver enable  
Off time setting controls duration of slow decay phase  
NCLK= 12 + 32*TOFF  
%0000: Driver disable, all bridges off  
%0001: 1 use only with TBL 2  
%0010 … %1111: 2 … 15  
(Default: OTP, resp. 3 in stealthChop mode)  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
34  
5.4.2 PWMCONF Voltage PWM Mode stealthChop  
0X70: PWMCONF VOLTAGE MODE PWM STEALTHCHOP  
Bit Name  
Function  
Comment  
31 PWM_LIM  
PWM automatic scale  
amplitude limit when  
switching on  
Limit for PWM_SCALE_AUTO when switching back from  
spreadCycle to stealthChop. This value defines the upper  
limit for bits 7 to 4 of the automatic current control  
when switching back. It can be set to reduce the current  
jerk during mode change back to stealthChop.  
It does not limit PWM_GRAD or PWM_GRAD_AUTO offset.  
(Default = 12)  
30  
29  
28  
27 PWM_REG Regulation loop  
User defined maximum PWM amplitude change per half  
wave when using pwm_autoscale=1. (1…15):  
1: 0.5 increments (slowest regulation)  
2: 1 increment (default with OTP2.1=1)  
3: 1.5 increments  
gradient  
26  
25  
24  
4: 2 increments  
8: 4 increments (default with OTP2.1=0)  
...  
15: 7.5 increments (fastest regulation)  
set to 0  
23  
22  
21  
20  
-
-
reserved  
reserved  
Allows different  
set to 0  
freewheel1  
freewheel0 standstill modes  
Stand still option when motor current setting is zero  
(I_HOLD=0).  
%00: Normal operation  
%01: Freewheeling  
%10: Coil shorted using LS drivers  
%11: Coil shorted using HS drivers  
19 pwm_  
autograd  
PWM automatic  
gradient adaptation  
0
1
Fixed value for PWM_GRAD  
(PWM_GRAD_AUTO = PWM_GRAD)  
Automatic tuning (only with pwm_autoscale=1)  
PWM_GRAD_AUTO is initialized with PWM_GRAD  
and becomes optimized automatically during  
motion.  
Preconditions  
1. PWM_OFS_AUTO has been automatically  
initialized. This requires standstill at IRUN for  
>130ms in order to a) detect standstill b) wait >  
128 chopper cycles at IRUN and c) regulate  
PWM_OFS_AUTO so that  
-1 < PWM_SCALE_AUTO < 1  
2. Motor running and 1.5 * PWM_OFS_AUTO <  
PWM_SCALE_SUM < 4* PWM_OFS_AUTO and  
PWM_SCALE_SUM < 255.  
Time required for tuning PWM_GRAD_AUTO  
About 8 fullsteps per change of +/-1.  
User defined feed forward PWM amplitude. The  
current settings IRUN and IHOLD have no influence!  
The resulting PWM amplitude (limited to 0…255) is:  
PWM_OFS * ((CS_ACTUAL+1) / 32)  
18 pwm_  
autoscale  
PWM automatic  
amplitude scaling  
0
1
+ PWM_GRAD * 256 / TSTEP  
Enable automatic current control (Reset default)  
pwm_freq1  
17  
PWM frequency  
%00: fPWM=2/1024 fCLK  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
35  
0X70: PWMCONF VOLTAGE MODE PWM STEALTHCHOP  
Bit Name  
Function  
Comment  
pwm_freq0  
16  
selection  
%01: fPWM=2/683 fCLK  
%10: fPWM=2/512 fCLK  
%11: fPWM=2/410 fCLK  
15 PWM_  
User defined amplitude Velocity dependent gradient for PWM amplitude:  
gradient PWM_GRAD * 256 / TSTEP  
GRAD  
14  
13  
12  
11  
10  
9
This value is added to PWM_AMPL to compensate for  
the velocity-dependent motor back-EMF.  
With automatic scaling (pwm_autoscale=1) the value is  
used for first initialization, only. Set PWM_GRAD to the  
application specific value (it can be read out from  
PWM_GRAD_AUTO) to speed up the automatic tuning  
process. An approximate value can be stored to OTP by  
programming OTP_PWM_GRAD.  
8
7
6
5
4
3
2
1
0
PWM_  
OFS  
User defined amplitude User defined PWM amplitude offset (0-255) related to full  
(offset)  
motor current (CS_ACTUAL=31) in stand still.  
(Reset default=36)  
When using automatic scaling (pwm_autoscale=1) the  
value is used for initialization, only. The autoscale  
function starts with PWM_SCALE_AUTO=PWM_OFS and  
finds the required offset to yield the target current  
automatically.  
PWM_OFS = 0 will disable scaling down motor current  
below a motor specific lower measurement threshold.  
This setting should only be used under certain  
conditions, i.e. when the power supply voltage can vary  
up and down by a factor of two or more. It prevents  
the motor going out of regulation, but it also prevents  
power down below the regulation limit.  
PWM_OFS > 0 allows automatic scaling to low PWM duty  
cycles even below the lower regulation threshold. This  
allows low (standstill) current settings based on the  
actual (hold) current scale (register IHOLD_IRUN).  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
36  
5.4.3 DRV_STATUS Driver Status Flags  
0X6F: DRV_STATUS DRIVER STATUS FLAGS AND CURRENT LEVEL READ BACK  
Bit Name  
Function  
Comment  
31 stst  
standstill indicator  
This flag indicates motor stand still in each operation  
mode. This occurs 2^20 clocks after the last step pulse.  
1: Driver operates in stealthChop mode  
0: Driver operates in spreadCycle mode  
Ignore these bits.  
30 stealth  
stealthChop indicator  
reserved  
29  
28  
27  
26  
25  
24  
23  
22  
21  
-
-
reserved  
Ignore these bits.  
20 CS_  
actual motor current /  
smart energy current  
Actual current control scaling, for monitoring the  
function of the automatic current scaling.  
ACTUAL  
19  
18  
17  
16  
15  
14  
13  
12  
-
reserved  
Ignore these bits.  
11 t157  
10 t150  
157°C comparator  
150°C comparator  
143°C comparator  
120°C comparator  
open load indicator  
phase B  
1: Temperature threshold is exceeded  
1: Temperature threshold is exceeded  
1: Temperature threshold is exceeded  
1: Temperature threshold is exceeded  
9
8
7
t143  
t120  
olb  
1: Open load detected on phase A or B.  
Hint: This is just an informative flag. The driver takes no  
action upon it. False detection may occur in fast motion  
and standstill. Check during slow motion, only.  
1: Short on low-side MOSFET detected on phase A or B.  
The driver becomes disabled. The flags stay active, until  
the driver is disabled by software (TOFF=0) or by the  
ENN input. Flags are separate for both chopper modes.  
1: Short to GND detected on phase A or B. The driver  
becomes disabled. The flags stay active, until the driver  
is disabled by software (TOFF=0) or by the ENN input.  
Flags are separate for both chopper modes.  
1: The selected overtemperature limit has been reached.  
Drivers become disabled until otpw is also cleared due  
to cooling down of the IC.  
6
5
4
3
2
1
ola  
open load indicator  
phase A  
low side short  
indicator phase B  
low side short  
indicator phase A  
short to ground  
indicator phase B  
short to ground  
indicator phase A  
overtemperature flag  
s2vsb  
s2vsa  
s2gb  
s2ga  
ot  
The overtemperature flag is common for both bridges.  
1: The selected overtemperature pre-warning threshold  
is exceeded.  
0
otpw  
overtemperature pre-  
warning flag  
The overtemperature pre-warning flag is common for  
both bridges.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
37  
6 stealthChop™  
stealthChop is an extremely quiet mode of operation for stepper motors. It is based on a  
voltage mode PWM. In case of standstill and at low velocities, the motor is absolutely  
noiseless. Thus, stealthChop operated stepper motor applications are very suitable for  
indoor or home use. The motor operates absolutely free of vibration at low velocities.  
With stealthChop, the motor current is applied by driving a certain effective voltage into  
the coil, using a voltage mode PWM. With the enhanced stealthChop2, the driver automatically adapts  
to the application for best performance. No more configurations are required. Optional configuration  
allows for tuning the setting in special cases, or for storing initial values for the automatic adaptation  
algorithm. For high velocity drives spreadCycle should be considered in combination with stealthChop.  
Figure 6.1 Motor coil sine wave current with stealthChop (measured with current probe)  
6.1 Automatic Tuning  
stealthChop2 integrates an automatic tuning procedure (AT), which adapts the most important  
operating parameters to the motor automatically. This way, stealthChop2 allows high motor dynamics  
and supports powering down the motor to very low currents. Just two steps have to be respected by  
the motion controller for best results: Start with the motor in standstill, but powered with nominal  
run current (AT#1). Move the motor at a medium velocity, e.g. as part of a homing procedure (AT#2).  
Figure 6.2 shows the tuning procedure.  
Border conditions in for AT#1 and AT#2 are shown in the following table:  
AUTOMATIC TUNING TIMING AND BORDER CONDITIONS  
Step Parameter  
AT#1 PWM_  
OFS_AUTO  
Conditions  
Duration  
≤ 2^20+2*2^18 tCLK,  
≤ 130ms  
- Motor in standstill and actual current scale (CS) is  
identical to run current (IRUN).  
- If standstill reduction is enabled (pin PDN_UART=0),  
an initial step pulse switches the drive back to run  
current.  
(with internal clock)  
- Pins VS and VREF at operating level.  
- Motor must move at a velocity, where a significant 8 fullsteps are required  
AT#2 PWM_  
amount of back EMF is generated and where the full for a change of +/-1.  
GRAD_AUTO  
run current can be reached. Conditions:  
For a typical motor with  
PWM_GRAD_AUTO  
- 1.5 * PWM_OFS_AUTO  
<
PWM_SCALE_SUM  
<
4 * PWM_OFS_AUTO  
PWM_SCALE_SUM < 255.  
optimum at 64 or less, up  
to 400 fullsteps are  
-
Hint: A typical range is 60-300 RPM. Determine best required when starting  
conditions with the evaluation board. from OTP default 14.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
38  
Power Up  
PWM_GRAD_AUTO becomes  
initialized by OTP  
Driver Enabled?  
Y
N
N
Driver Enabled?  
Y
N
Y
Issue (at least) a single step  
pulse and stop again, to  
power motor to run current  
Standstill re-  
duction enabled?  
stealthChop2 regulates to nominal  
current and stores result to  
PWM_OFS_AUTO  
AT#1  
(Requires stand still for >130ms)  
Stand still  
PWM_  
GRAD_AUTO stored  
Y
in OTP?  
N
Move the motor, e.g. for homing.  
Include a constant, medium velocity  
ramp segment.  
AT#2  
Homing  
stealthChop2 regulates to nominal  
current and optimizes PWM_GRAD_AUTO  
(requires 8 fullsteps per change of 1,  
typically a few 100 fullsteps in sum)  
Store PWM_GRAD_AUTO or  
write to OTP for faster  
tuning procedure  
stealthChop2 settings are optimized!  
Option with UART  
Ready  
stealthChop2 keeps tuning during  
subsequent motion and stand still periods  
adapting to motor heating, supply  
variations, etc.  
Figure 6.2 stealthChop2 automatic tuning procedure  
Attention:  
Modifying VREF or the supply voltage VS invalidates the result of the automatic tuning process. Motor  
current regulation cannot compensate significant changes until next AT#1 phase. Automatic tuning  
adapts to changed conditions whenever AT#1 and AT#2 conditions are fulfilled in the later operation.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
39  
UART  
6.2 stealthChop Options  
In order to match the motor current to a certain level, the effective PWM voltage becomes scaled  
depending on the actual motor velocity. Several additional factors influence the required voltage level  
to drive the motor at the target current: The motor resistance, its back EMF (i.e. directly proportional  
to its velocity) as well as the actual level of the supply voltage. Two modes of PWM regulation are  
provided: The automatic tuning mode (AT) using current feedback (pwm_autoscale = 1, pwm_autograd  
= 1) and a feed forward velocity controlled mode (pwm_autoscale = 0). The feed forward velocity  
controlled mode will not react to a change of the supply voltage or to events like a motor stall, but it  
provides very stable amplitude. It does not use nor require any means of current measurement. This  
is perfect when motor type and supply voltage are well known. Therefore we recommend the  
automatic mode, unless current regulation is not satisfying in the given operating conditions.  
It is recommended to operate in automatic tuning mode.  
Non-automatic mode (pwm_autoscale=0) should be taken into account only with well-known motor  
and operating conditions. In this case, programming via the UART interface is required. The operating  
parameters PWM_GRAD and PWM_OFS can be determined in automatic tuning mode initially.  
Hint: In non-automatic mode the power supply current directly reflects mechanical load on the motor.  
The stealthChop PWM frequency can be chosen in four steps in order to adapt the frequency divider  
to the frequency of the clock source. A setting in the range of 20-50kHz is good for most applications.  
It balances low current ripple and good higher velocity performance vs. dynamic power dissipation.  
CHOICE OF PWM FREQUENCY FOR STEALTHCHOP  
Clock frequency  
fCLK  
PWM_FREQ=%00  
fPWM=2/1024 fCLK  
PWM_FREQ=%01  
fPWM=2/683 fCLK  
(default)  
52.7kHz  
46.9kHz  
35.1kHz  
29.3kHz  
23.4kHz  
PWM_FREQ=%10  
fPWM=2/512 fCLK  
(OTP option)  
70.3kHz  
62.5kHz  
46.9kHz  
PWM_FREQ=%11  
fPWM=2/410 fCLK  
18MHz  
16MHz  
12MHz (internal)  
10MHz  
8MHz  
35.2kHz  
31.3kHz  
23.4kHz  
19.5kHz  
15.6kHz  
87.8kHz  
78.0kHz  
58.5kHz  
48.8kHz  
39.0kHz  
39.1kHz  
31.2kHz  
Table 6.1 Choice of PWM frequency green / light green: recommended  
6.3 stealthChop Current Regulator  
In stealthChop voltage PWM mode, the autoscaling function (pwm_autoscale = 1, pwm_auto_grad = 1)  
regulates the motor current to the desired current setting. Automatic scaling is used as part of the  
automatic tuning process (AT), and for subsequent tracking of changes within the motor parameters.  
The driver measures the motor current during the chopper on time and uses a proportional regulator  
to regulate PWM_SCALE_AUTO in order match the motor current to the target current. PWM_REG is the  
proportionality coefficient for this regulator. Basically, the proportionality coefficient should be as  
small as possible in order to get a stable and soft regulation behavior, but it must be large enough to  
allow the driver to quickly react to changes caused by variation of the motor target current (e.g.  
change of VREF). During initial tuning step AT#2, PWM_REG also compensates for the change of motor  
velocity. Therefore, a high acceleration during AT#2 will require a higher setting of PWM_REG. With  
careful selection of homing velocity and acceleration, a minimum setting of the regulation gradient  
often is sufficient (PWM_REG=1). PWM_REG setting should be optimized for the fastest required  
acceleration and deceleration ramp (compare Figure 6.3 and Figure 6.4). The quality of the setting  
PWM_REG in phase AT#2 and the finished automatic tuning procedure (or non-automatic settings for  
PWM_OFS and PWM_GRAD) can be examined when monitoring motor current during an acceleration  
phase Figure 6.5.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
40  
Figure 6.3 Scope shot: good setting for PWM_REG  
Figure 6.4 Scope shot: too small setting for PWM_REG during AT#2  
Motor Current  
PWM scale  
Motor Velocity  
PWM reaches max. amplitude  
255  
P
)
k
W
k
o
RMS current constant  
o
M
2
)
_
#
(IRUN)  
O
G
T
Nominal Current  
(sine wave RMS)  
T
R
A
U
E
A
g
A
D
_
n
(
i
(
r
_
D
u
A
A
d
U
R
Current may drop due  
to high velocity  
T
G
G
O
_
)
R
M
IHOLD  
_
o
W
M
W
k
P
Stand still  
PWM scale  
PWM_OFS_(AUTO)(Pok  
PWM_OFS_(AUTO) ok  
0
0
Time  
Figure 6.5 Successfully determined PWM_GRAD(_AUTO) and PWM_OFS(_AUTO)  
www.trinamic.com  
 
 
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
41  
Quick Start  
For a quick start, see the Quick Configuration Guide in chapter 14.  
6.3.1 Lower Current Limit  
The stealthChop current regulator imposes a lower limit for motor current regulation. As the coil  
current can be measured in the shunt resistor during chopper on phase only, a minimum chopper  
duty cycle allowing coil current regulation is given by the blank time as set by TBL and by the  
chopper frequency setting. Therefore, the motor specific minimum coil current in stealthChop  
autoscaling mode rises with the supply voltage and with the chopper frequency. A lower blanking  
time allows a lower current limit. It is important for the correct determination of PWM_OFS_AUTO,  
that in AT#1 the run current set by the sense resistor, VREF and IRUN is well within the regulation  
range. Lower currents (e.g. for standstill power down) are automatically realized based on  
PWM_OFS_AUTO and PWM_GRAD_AUTO respectively based on PWM_OFS and PWM_GRAD with non-  
automatic current scaling. The freewheeling option allows going to zero motor current.  
Lower motor coil current limit for stealthChop2 automatic tuning:  
푀  
퐿표푤푒푟 퐿푖푚푖푡 = ꢀ퐵퐿퐴푁퐾 ∗ 푓  
푃푊푀  
ꢁ푂ꢂ퐿  
With VM the motor supply voltage and RCOIL the motor coil resistance.  
ILower Limit can be treated as a thumb value for the minimum nominal IRUN motor current setting.  
EXAMPLE:  
A motor has a coil resistance of 5Ω, the supply voltage is 24V. With TBL=%01 and PWM_FREQ=%00,  
tBLANK is 24 clock cycles, fPWM is 2/(1024 clock cycles):  
ꢃ4푉  
ꢃ4 ꢃ4푉  
∗ = ꢃꢃ5ꢆꢇ  
퐿표푤푒푟 퐿푖푚푖푡 = ꢃ4 ꢀꢁ퐿퐾  
=
ꢄꢅꢃ4 ꢀꢁ퐿퐾 5Ω  
5ꢄꢃ 5Ω  
This means, the motor target current for automatic tuning must be 225mA or more, taking into  
account all relevant settings. This lower current limit also applies for modification of the motor  
current via the analog input VREF.  
Attention  
For automatic tuning, a lower coil current limit applies. The motor current in automatic tuning phase  
AT#1 must exceed this lower limit. ILOWER  
can be calculated or measured using a current probe.  
LIMIT  
Setting the motor run-current or hold-current below the lower current limit during operation by  
modifying IRUN and IHOLD is possible after successful automatic tuning.  
The lower current limit also limits the capability of the driver to respond to changes of VREF.  
UART  
6.4 Velocity Based Scaling  
Velocity based scaling scales the stealthChop amplitude based on the time between each two steps,  
i.e. based on TSTEP, measured in clock cycles. This concept basically does not require a current  
measurement, because no regulation loop is necessary. A pure velocity based scaling is available via  
UART programming, only, when setting pwm_autoscale = 0. The basic idea is to have a linear  
approximation of the voltage required to drive the target current into the motor. The stepper motor  
has a certain coil resistance and thus needs a certain voltage amplitude to yield a target current  
based on the basic formula I=U/R. With R being the coil resistance, U the supply voltage scaled by the  
PWM value, the current I results. The initial value for PWM_AMPL can be calculated:  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
42  
374 ∗ 푅ꢁ푂ꢂ퐿 ∗ 퐼ꢁ푂ꢂ퐿  
ꢈꢉꢊ_ꢇꢊꢈꢋ =  
푀  
With VM the motor supply voltage and ICOIL the target RMS current  
The effective PWM voltage UPWM (1/SQRT(2) x peak value) results considering the 8 bit resolution and  
248 sine wave peak for the actual PWM amplitude shown as PWM_SCALE:  
ꢈꢉꢊ_푆퐶ꢇꢋ퐸 ꢃ4ꢌ  
ꢈꢉꢊ_푆퐶ꢇꢋ퐸  
374  
푃푊푀 = ∗  
= ∗  
ꢃ56  
ꢃ56  
With rising motor velocity, the motor generates an increasing back EMF voltage. The back EMF voltage  
is proportional to the motor velocity. It reduces the PWM voltage effective at the coil resistance and  
thus current decreases. The TMC22xx provides a second velocity dependent factor (PWM_GRAD) to  
compensate for this. The overall effective PWM amplitude (PWM_SCALE_SUM) in this mode  
automatically is calculated in dependence of the microstep frequency as:  
ꢎ푇ꢏ푃  
ꢈꢉꢊ_푆퐶ꢇꢋ퐸_푆푈ꢊ = ꢈꢉꢊ_ꢍ퐹푆 + ꢈꢉꢊ_퐺푅ꢇ퐷 ∗ ꢃ56 ∗  
ꢁ퐿퐾  
With fSTEP being the microstep frequency for 256 microstep resolution equivalent  
and fCLK the clock frequency supplied to the driver or the actual internal frequency  
As a first approximation, the back EMF subtracts from the supply voltage and thus the effective current  
amplitude decreases. This way, a first approximation for PWM_GRAD setting can be calculated:  
∗ ꢄ.46  
ꢁ퐿퐾  
ꢈꢉꢊ_퐺푅ꢇ퐷 = 퐶퐵ꢏ푀ꢐ  
[
] ∗ ꢃ휋 ∗  
ꢑ푎푑  
∗ ꢊ푆ꢈ푅  
CBEMF is the back EMF constant of the motor in Volts per radian/second.  
MSPR is the number of microsteps per rotation, e.g. 51200 = 256µsteps multiplied by 200 fullsteps for  
a 1.8° motor.  
Motor current  
PWM scaling  
PWM reaches  
(PWM_SCALE_SUM)  
max. amplitude  
255  
D
A
R
G
Constant motor  
RMS current  
_
M
W
P
Nominal current  
(e.g. sine wave RMS)  
PWM_OFS  
0
0
VPWMMAX  
Velocity  
Figure 6.6 Velocity based PWM scaling (pwm_autoscale=0)  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
43  
Hint  
The values for PWM_OFS and PWM_GRAD can easily be optimized by tracing the motor current with a  
current probe on the oscilloscope. Alternatively, automatic tuning determines these values and they  
can be read out from PWM_OFS_AUTO and PWM_GRAD_AUTO.  
UNDERSTANDING THE BACK EMF CONSTANT OF A MOTOR  
The back EMF constant is the voltage a motor generates when turned with a certain velocity. Often  
motor datasheets do not specify this value, as it can be deducted from motor torque and coil current  
rating. Within SI units, the numeric value of the back EMF constant CBEMF has the same numeric value  
as the numeric value of the torque constant. For example, a motor with a torque constant of 1 Nm/A  
would have a CBEMF of 1V/rad/s. Turning such a motor with 1 rps (1 rps = 1 revolution per second =  
6.28 rad/s) generates a back EMF voltage of 6.28V. Thus, the back EMF constant can be calculated as:  
퐻ꢔ푙푑ꢕ푛푔ꢖꢔꢑ푞푢ꢗ ꢙꢆ  
퐵ꢏ푀ꢐ  
ꢓ =  
ꢑ푎푑/푠  
ꢃ ∗ 퐼ꢁ푂ꢂ퐿푁푂ꢘꢇꢚ  
ICOILNOM is the motor’s rated phase current for the specified holding torque  
HoldingTorque is the motor specific holding torque, i.e. the torque reached at ICOILNOM on both coils.  
The torque unit is [Nm] where 1Nm = 100Ncm = 1000mNm.  
The voltage is valid as RMS voltage per coil, thus the nominal current is multiplied by 2 in this  
formula, since the nominal current assumes a full step position, with two coils operating.  
UART  
OTP  
6.5 Combining stealthChop and spreadCycle  
For applications requiring high velocity motion, spreadCycle may bring more stable operation in the  
upper velocity range. To combine no-noise operation with highest dynamic performance, the TMC22xx  
allows combining stealthChop and spreadCycle based on a velocity threshold (Figure 6.7). A velocity  
threshold (TPWMTHRS) can be preprogrammed to OTP to support this mode even in standalone  
operation. With this, stealthChop is only active at low velocities.  
Chopper mode  
stealthChop  
spreadCycle  
option  
option  
v
TSTEP < TPWMTHRS*16/16  
TSTEP > TPWMTHRS  
0
t
current  
I_RUN  
I_HOLD  
VACTUAL  
~1/TSTEP  
RMS current  
TRINAMIC, B. Dwersteg, 14.3.14  
Figure 6.7 TPWMTHRS for optional switching to spreadCycle  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
44  
As a first step, both chopper principles should be parameterized and optimized individually  
(spreadCycle settings may be programmed to OTP memory). In a next step, a transfer velocity has to  
be fixed. For example, stealthChop operation is used for precise low speed positioning, while  
spreadCycle shall be used for highly dynamic motion. TPWMTHRS determines the transition velocity.  
Read out TSTEP when moving at the desired velocity and program the resulting value to TPWMTHRS.  
Use a low transfer velocity to avoid a jerk at the switching point.  
A jerk occurs when switching at higher velocities, because the back-EMF of the motor (which rises  
with the velocity) causes a phase shift of up to 90° between motor voltage and motor current. So  
when switching at higher velocities between voltage PWM and current PWM mode, this jerk will occur  
with increased intensity. A high jerk may even produce a temporary overcurrent condition (depending  
on the motor coil resistance). At low velocities (e.g. 1 to a few 10 RPM), it can be completely  
neglected for most motors. Therefore, consider the switching jerk when choosing TPWMTHRS. Set  
TPWMTHRS zero if you want to work with stealthChop only.  
When enabling the stealthChop mode the first time using automatic current regulation, the motor  
must be at stand still in order to allow a proper current regulation. When the drive switches to  
stealthChop at a higher velocity, stealthChop logic stores the last current regulation setting until the  
motor returns to a lower velocity again. This way, the regulation has a known starting point when  
returning to a lower velocity, where stealthChop becomes re-enabled. Therefore, neither the velocity  
threshold nor the supply voltage must be considerably changed during the phase while the chopper  
is switched to a different mode, because otherwise the motor might lose steps or the instantaneous  
current might be too high or too low.  
A motor stall or a sudden change in the motor velocity may lead to the driver detecting a short  
circuit or to a state of automatic current regulation, from which it cannot recover. Clear the error flags  
and restart the motor from zero velocity to recover from this situation.  
Hint  
Start the motor from standstill when switching on stealthChop the first time and keep it stopped for  
at least 128 chopper periods to allow stealthChop to do initial standstill current control.  
UART  
6.6 Flags in stealthChop  
As stealthChop uses voltage mode driving, status flags based on current measurement respond  
slower, respectively the driver reacts delayed to sudden changes of back EMF, like on a motor stall.  
A motor stall can lead to an overcurrent condition. Depending on the previous motor velocity, and on  
the coil resistance of the motor, it may trigger the overcurrent detection. With low velocities, where  
the back EMF is just a fraction of the supply voltage, there is no danger of triggering the short  
detection.  
6.6.1 Open Load Flags  
In stealthChop mode, status information is different from the cycle-by-cycle regulated spreadCycle  
mode. OLA and OLB show if the current regulation sees that the nominal current can be reached on  
both coils.  
-
A flickering OLA or OLB can result from asymmetries in the sense resistors or in the motor  
coils.  
-
-
An interrupted motor coil leads to a continuously active open load flag for the coil.  
One or both flags are active, if the current regulation did not succeed in scaling up to the full  
target current within the last few fullsteps (because no motor is attached or a high velocity  
exceeds the PWM limit).  
If desired, do an on-demand open load test using the spreadCycle chopper, as it delivers the safest  
result. With stealthChop, PWM_SCALE_SUM can be checked to detect the correct coil resistance.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
45  
6.6.2 PWM_SCALE_SUM Informs about the Motor State  
Information about the motor state is available with automatic scaling by reading out  
PWM_SCALE_SUM. As this parameter reflects the actual voltage required to drive the target current into  
the motor, it depends on several factors: motor load, coil resistance, supply voltage, and current  
setting. Therefore, an evaluation of the PWM_SCALE_SUM value allows checking the motor operation  
point. When reaching the limit (255), the current regulator cannot sustain the full motor current, e.g.  
due to a drop in supply volage.  
UART  
6.7 Freewheeling and Passive Braking  
stealthChop provides different options for motor standstill. These options can be enabled by setting  
the standstill current IHOLD to zero and choosing the desired option using the FREEWHEEL setting.  
The desired option becomes enabled after a time period specified by TPOWERDOWN and  
IHOLD_DELAY. Current regulation becomes frozen once the motor target current is at zero current in  
order to ensure a quick startup. With the freewheeling options, both freewheeling and passive  
braking can be realized. Passive braking is an effective eddy current motor braking, which consumes a  
minimum of energy, because no active current is driven into the coils. However, passive braking will  
allow slow turning of the motor when a continuous torque is applied.  
Hint  
Operate the motor within your application when exploring stealthChop. Motor performance often is  
better with a mechanical load, because it prevents the motor from stalling due mechanical oscillations  
which can occur without load.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
46  
PARAMETERS RELATED TO STEALTHCHOP  
Parameter  
en_spread_ General disable for use of stealthChop (register 1  
cycle GCONF). The input SPREAD is XORed to this flag.  
TPWMTHRS Specifies the upper velocity for operation in 0 …  
Description  
Setting Comment  
Do not use stealthChop  
stealthChop enabled  
0
stealthChop is disabled if  
stealthChop. Entry the TSTEP reading (time 1048575 TSTEP falls TPWMTHRS  
between two microsteps) when operating at the  
desired threshold velocity.  
PWM_LIM  
Limiting value for limiting the current jerk when 0 … 15  
switching from spreadCycle to stealthChop. Reduce  
the value to yield a lower current jerk.  
Upper four bits of 8 bit  
amplitude limit  
(Default=12)  
pwm_  
autoscale  
Enable automatic current scaling using current 0  
Forward controlled mode  
Automatic scaling with  
current regulator  
disable, use PWM_GRAD  
from register instead  
enable  
measurement or use forward controlled velocity  
1
0
1
based mode.  
pwm_  
autograd  
Enable automatic tuning of PWM_GRAD_AUTO  
PWM_FREQ PWM frequency selection. Use the lowest setting 0  
fPWM=2/1024 fCLK  
fPWM=2/683 fCLK  
fPWM=2/512 fCLK  
fPWM=2/410 fCLK  
giving good results. The frequency measured at  
1
2
3
each of the chopper outputs is half of the  
effective chopper frequency fPWM  
.
PWM_REG  
PWM_OFS  
User defined PWM amplitude (gradient) for 1 … 15  
velocity based scaling or regulation loop gradient  
when pwm_autoscale=1.  
Results in 0.5 to 7.5 steps  
for PWM_SCALE_AUTO  
regulator per fullstep  
User defined PWM amplitude (offset) for velocity 0 … 255 PWM_OFS=0 disables  
based scaling and initialization value for automatic  
tuning of PWM_OFFS_AUTO.  
linear current scaling  
based on current setting  
PWM_GRAD User defined PWM amplitude (gradient) for 0 … 255 Reset value can be pre-  
velocity based scaling and initialization value for  
programmed by OTP  
automatic tuning of PWM_GRAD_AUTO.  
FREEWHEEL Stand still option when motor current setting is 0  
Normal operation  
zero (I_HOLD=0). Only available with stealthChop  
enabled. The freewheeling option makes the  
motor easy movable, while both coil short options  
realize a passive brake.  
1
2
3
Freewheeling  
Coil short via LS drivers  
Coil short cia HS drivers  
PWM_SCALE Read back of the actual stealthChop voltage PWM -255 …  
(read only) Scaling value  
becomes frozen when  
operating in spreadCycle  
_AUTO  
scaling correction as determined by the current 255  
regulator.  
PWM_SCALE Allow monitoring of the automatic tuning and 0 … 255 (read only)  
_AUTO  
PWM_OFS  
_AUTO  
TOFF  
determination of initial values for PWM_OFS and  
PWM_GRAD.  
General enable for the motor driver, the actual 0  
value does not influence stealthChop  
Comparator blank time. This time needs to safely 0  
Driver off  
Driver enabled  
16 tCLK  
1 … 15  
TBL  
cover the switching event and the duration of the  
ringing on the sense resistor. Choose a setting of  
1 or 2 for typical applications. For higher  
capacitive loads, 3 may be required. Lower  
settings allow stealthChop to regulate down to  
lower coil current values.  
1
2
3
24 tCLK  
32 tCLK  
40 tCLK  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
47  
7 spreadCycle Chopper  
While stealthChop is a voltage mode PWM controlled chopper, spreadCycle is a cycle-by-cycle current  
control. Therefore, it can react extremely fast to changes in motor velocity or motor load. spreadCycle  
will give better performance in medium to high velocity range for motors and applications which  
tend to resonance. The currents through both motor coils are controlled using choppers. The choppers  
work independently of each other. In Figure 7.1 the different chopper phases are shown.  
+VM  
+VM  
+VM  
ICOIL  
ICOIL  
ICOIL  
RSENSE  
RSENSE  
RSENSE  
On Phase:  
Fast Decay Phase:  
current flows in  
opposite direction  
of target current  
Slow Decay Phase:  
current re-circulation  
current flows in  
direction of target  
current  
Figure 7.1 Chopper phases  
Although the current could be regulated using only on phases and fast decay phases, insertion of the  
slow decay phase is important to reduce electrical losses and current ripple in the motor. The  
duration of the slow decay phase is specified in a control parameter and sets an upper limit on the  
chopper frequency. The current comparator can measure coil current during phases when the current  
flows through the sense resistor, but not during the slow decay phase, so the slow decay phase is  
terminated by a timer. The on phase is terminated by the comparator when the current through the  
coil reaches the target current. The fast decay phase may be terminated by either the comparator or  
another timer.  
When the coil current is switched, spikes at the sense resistors occur due to charging and discharging  
parasitic capacitances. During this time, typically one or two microseconds, the current cannot be  
measured. Blanking is the time when the input to the comparator is masked to block these spikes.  
The spreadCycle chopper mode cycles through four phases: on, slow decay, fast decay, and a second  
slow decay.  
The chopper frequency is an important parameter for a chopped motor driver. A too low frequency  
might generate audible noise. A higher frequency reduces current ripple in the motor, but with a too  
high frequency magnetic losses may rise. Also power dissipation in the driver rises with increasing  
frequency due to the increased influence of switching slopes causing dynamic dissipation. Therefore, a  
compromise needs to be found. Most motors are optimally working in a frequency range of 16 kHz to  
30 kHz. The chopper frequency is influenced by a number of parameter settings as well as by the  
motor inductivity and supply voltage.  
Hint  
A chopper frequency in the range of 16 kHz to 30 kHz gives a good result for most motors when  
using spreadCycle. A higher frequency leads to increased switching losses.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
48  
UART  
OTP  
7.1 spreadCycle Settings  
The spreadCycle (patented) chopper algorithm is a precise and simple to use chopper mode which  
automatically determines the optimum length for the fast-decay phase. The spreadCycle will provide  
superior microstepping quality even with default settings. Several parameters are available to  
optimize the chopper to the application.  
Each chopper cycle is comprised of an on phase, a slow decay phase, a fast decay phase and a  
second slow decay phase (see Figure 7.3). The two slow decay phases and the two blank times per  
chopper cycle put an upper limit to the chopper frequency. The slow decay phases typically make up  
for about 30%-70% of the chopper cycle in standstill and are important for low motor and driver  
power dissipation.  
Calculation of a starting value for the slow decay time TOFF:  
EXAMPLE:  
Target Chopper frequency: 25kHz.  
Assumption: Two slow decay cycles make up for 50% of overall chopper cycle time  
5ꢅ  
푂ꢐꢐ  
=
= ꢄꢅµ푠  
ꢃ5푘퐻푧 ꢄꢅꢅ  
For the TOFF setting this means:  
ꢖꢍ퐹퐹 = (ꢀ푂ꢐꢐ ∗ 푓 − ꢄꢃ)/3ꢃ  
ꢁ퐿퐾  
With 12 MHz clock this gives a setting of TOFF=3.4, i.e. 3 or 4.  
With 16 MHz clock this gives a setting of TOFF=4.6, i.e. 4 or 5.  
The hysteresis start setting forces the driver to introduce a minimum amount of current ripple into  
the motor coils. The current ripple must be higher than the current ripple which is caused by resistive  
losses in the motor in order to give best microstepping results. This will allow the chopper to  
precisely regulate the current both for rising and for falling target current. The time required to  
introduce the current ripple into the motor coil also reduces the chopper frequency. Therefore, a  
higher hysteresis setting will lead to a lower chopper frequency. The motor inductance limits the  
ability of the chopper to follow a changing motor current. Further the duration of the on phase and  
the fast decay must be longer than the blanking time, because the current comparator is disabled  
during blanking.  
It is easiest to find the best setting by starting from a low hysteresis setting (e.g. HSTRT=0, HEND=0)  
and increasing HSTRT, until the motor runs smoothly at low velocity settings. This can best be  
checked when measuring the motor current either with a current probe or by probing the sense  
resistor voltages (see Figure 7.2). Checking the sine wave shape near zero transition will show a small  
ledge between both half waves in case the hysteresis setting is too small. At medium velocities (i.e.  
100 to 400 fullsteps per second), a too low hysteresis setting will lead to increased humming and  
vibration of the motor.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
49  
Figure 7.2 No ledges in current wave with sufficient hysteresis (magenta: current A, yellow &  
blue: sense resistor voltages A and B)  
A too high hysteresis setting will lead to reduced chopper frequency and increased chopper noise but  
will not yield any benefit for the wave shape.  
Quick Start  
For a quick start, see the Quick Configuration Guide in chapter 14.  
For detail procedure see Application Note AN001 - Parameterization of spreadCycle  
As experiments show, the setting is quite independent of the motor, because higher current motors  
typically also have a lower coil resistance. Therefore choosing a low to medium default value for the  
hysteresis (for example, effective hysteresis = 4) normally fits most applications. The setting can be  
optimized by experimenting with the motor: A too low setting will result in reduced microstep  
accuracy, while a too high setting will lead to more chopper noise and motor power dissipation.  
When measuring the sense resistor voltage in motor standstill at a medium coil current with an  
oscilloscope, a too low setting shows a fast decay phase not longer than the blanking time. When  
the fast decay time becomes slightly longer than the blanking time, the setting is optimum. You can  
reduce the off-time setting, if this is hard to reach.  
The hysteresis principle could in some cases lead to the chopper frequency becoming too low, e.g.  
when the coil resistance is high when compared to the supply voltage. This is avoided by splitting  
the hysteresis setting into a start setting (HSTRT+HEND) and an end setting (HEND). An automatic  
hysteresis decrementer (HDEC) interpolates between both settings, by decrementing the hysteresis  
value stepwise each 16 system clocks. At the beginning of each chopper cycle, the hysteresis begins  
with a value which is the sum of the start and the end values (HSTRT+HEND), and decrements during  
the cycle, until either the chopper cycle ends or the hysteresis end value (HEND) is reached. This way,  
the chopper frequency is stabilized at high amplitudes and low supply voltage situations, if the  
frequency gets too low. This avoids the frequency reaching the audible range.  
Hint  
Highest motor velocities sometimes benefit from setting TOFF to 1 or 2 and a short TBL of 1 or 0.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
50  
I
H
D
E
C
target current + hysteresis start  
target current + hysteresis end  
target current  
target current - hysteresis end  
target current - hysteresis start  
on  
sd  
fd  
sd  
t
Figure 7.3 spreadCycle chopper scheme showing coil current during a chopper cycle  
These parameters control spreadCycle mode:  
Parameter  
Description  
Setting Comment  
Sets the slow decay time (off time). This setting also  
limits the maximum chopper frequency.  
For operation with stealthChop, this parameter is not  
used, but it is required to enable the motor. In case  
of operation with stealthChop only, any setting is  
OK.  
TOFF  
0
chopper off  
off time setting NCLK= 12 +  
32*TOFF  
(1 will work with minimum  
blank time of 24 clocks)  
1…15  
Setting this parameter to zero completely disables all  
driver transistors and the motor can free-wheel.  
TBL  
Comparator blank time. This time needs to safely 0  
16 tCLK  
24 tCLK  
32 tCLK  
40 tCLK  
cover the switching event and the duration of the  
ringing on the sense resistor. For most  
applications, a setting of 1 or 2 is good. For highly  
1
2
capacitive loads, a setting of 2 or 3 will be  
required.  
3
Hysteresis start setting. This value is an offset from  
the hysteresis end value HEND.  
HSTRT  
HEND  
0…7  
HSTRT=1…8  
This value adds to HEND.  
-3…-1: negative HEND  
0: zero HEND  
Hysteresis end setting. Sets the hysteresis end value  
after a number of decrements. The sum HSTRT+HEND  
must be 16. At a current setting of max. 30  
(amplitude reduced to 240), the sum is not limited.  
0…2  
3
4…15  
1…12: positive HEND  
Even at HSTRT=0 and HEND=0, the TMC22xx sets a minimum hysteresis via analog circuitry.  
EXAMPLE:  
A hysteresis of 4 has been chosen. You might decide to not use hysteresis decrement. In this case  
set:  
HEND=6  
HSTRT=0  
(sets an effective end value of 6-3=3)  
(sets minimum hysteresis, i.e. 1: 3+1=4)  
In order to take advantage of the variable hysteresis, we can set most of the value to the HSTRT, i.e.  
4, and the remaining 1 to hysteresis end. The resulting configuration register values are as follows:  
HEND=0  
HSTRT=6  
(sets an effective end value of -3)  
(sets an effective start value of hysteresis end +7: 7-3=4)  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
51  
8 Selecting Sense Resistors  
Set the desired maximum motor current by selecting an appropriate value for the sense resistor. The  
following table shows the RMS current values which can be reached using standard resistors and  
motor types fitting without additional motor current scaling.  
CHOICE OF RSENSE AND RESULTING MAX. MOTOR CURRENT  
RSENSE [Ω]  
RMS current [A]  
Fitting motor type  
VREF=2.5V (or open),  
(examples)  
IRUN=31,  
vsense=0 (standard)  
1.00  
0.82  
0.75  
0.68  
0.23  
0.27  
0.30  
0.33  
0.44  
0.47  
0.56  
0.66  
0.79  
0.96  
1.15  
1.35  
1.64*)  
1.92*)  
300mA motor  
400mA motor  
0.50  
470m  
390m  
330m  
270m  
220m  
180m  
150m  
120m  
100m  
500mA motor  
600mA motor  
700mA motor  
800mA motor  
1A motor  
1.2A motor  
1.5A motor  
*) Value exceeds upper current rating, scaling down required, e.g. by reduced VREF.  
Sense resistors should be carefully selected. The full motor current flows through the sense resistors.  
Due to chopper operation the sense resistors see pulsed current from the MOSFET bridges. Therefore,  
a low-inductance type such as film or composition resistors is required to prevent voltage spikes  
causing ringing on the sense voltage inputs leading to unstable measurement results. Also, a low-  
inductance, low-resistance PCB layout is essential. Any common GND path for the two sense resistors  
must be avoided, because this would lead to coupling between the two current sense signals. A  
massive ground plane is best. Please also refer to layout considerations in chapter 19.  
The sense resistor needs to be able to conduct the peak motor coil current in motor standstill  
conditions, unless standby power is reduced. Under normal conditions, the sense resistor conducts  
less than the coil RMS current, because no current flows through the sense resistor during the slow  
decay phases. A 0.5W type is sufficient for most applications up to 1.2A RMS current.  
Attention  
Be sure to use a symmetrical sense resistor layout and short and straight sense resistor traces of  
identical length. Well matching sense resistors ensure best performance.  
A compact layout with massive ground plane is best to avoid parasitic resistance effects.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
52  
9 Motor Current Control  
The basic motor current is set by the resistance of the sense resistors. Several possibilities allow  
scaling down motor current, e.g. to adapt for different motors, or to reduce motor current in standstill  
or low load situations.  
METHODS FOR SCALING MOTOR CURRENT  
Method  
Pin VREF  
voltage  
Parameters  
VREF input scales 2.5V: 100% …  
IRUN and IHOLD. 0.5V: 20%  
Can be disabled by >2.5V or open: 100%  
Range  
Primary Use  
- Fine tuning of motor current  
to fit the motor type  
(chapter 9.1)  
- Manual tuning via poti  
GCONF.i_scale_analog <0.5V: not recommended - Delayed or soft power-up  
- Standstill current reduction  
(preferred  
spreadCycle)  
- Disable  
only  
to  
with  
Pin ENN  
Disable  
driver stage  
/
enable 0: Motor enable  
1: Motor disable  
motor  
allow  
freewheeling  
Pin PDN_UART Disable  
standstill  
/
enable 0: Standstill current  
current reduction enabled.  
- Enable current reduction to  
reduce heat up in stand still  
reduction to IHOLD  
1: Disable  
OTP memory  
OTP_IHOLD,  
OTP_IHOLDDELAY  
9% to 78% standby  
current.  
Reduction in about  
- Program current reduction to  
fit application for highest  
efficiency and lowest heat up  
300ms to 2.5s  
OTP memory  
otp_internalRsense  
0: Use sense resistors  
1: Internal resistors  
- Save two sense resistors on  
BOM, set current by single  
inexpensive 0603 resistor.  
UART interface IHOLD_IRUN  
IRUN, IHOLD:  
1/32 to 32/32 of full  
scale current.  
- Fine programming of run and  
hold (stand still) current  
- Change IRUN for situation  
TPOWERDOWN  
OTP  
specific motor current  
- Set OTP options  
UART interface CHOPCONF.vsense  
0: Normal, most robust  
1: Reduced voltage level  
- Set vsense for half power  
dissipation in sense resistor to  
use smaller 0.25W resistors.  
flag  
Select the sense resistor to deliver enough current for the motor at full current scale (VREF=2.5V). This  
is the default current scaling (IRUN = 31).  
STANDALONE MODE RMS RUN CURRENT CALCULATION:  
3ꢃ5ꢆ푉  
ꢜꢛꢏꢐ  
ꢃ.5푉  
ꢛ푀ꢎ  
=
ꢎꢏ푁ꢎꢏ + ꢃꢅꢆΩ  
IRUN and IHOLD allow for scaling of the actual current scale (CS) from 1/32 to 32/32 when using UART  
interface, or via automatic standstill current reduction:  
RMS CURRENT CALCULATION WITH UART CONTROL OPTIONS OR HOLD CURRENT SETTING:  
퐶푆 + ꢄ  
3ꢃ  
ꢐꢎ  
ꢛ푀ꢎ  
=
ꢎꢏ푁ꢎꢏ + ꢃꢅꢆΩ  
CS is the current scale setting as set by the IHOLD and IRUN.  
VFS is the full scale voltage as determined by vsense control bit (please refer to electrical  
characteristics, VSRTL and VSRTH). Default is 325mV.  
With analog scaling of VFS (I_scale_analog=1, default), the resulting voltage VFS‘ is calculated by:  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
53  
ꢜꢛꢏꢐ  
ꢃ.5푉  
= 푉  
ꢐꢎ  
ꢐꢎ  
with VVREF the voltage on pin VREF in the range 0V to V5VOUT/2  
Hint  
For best precision of current setting, measure and fine tune the current in the application.  
PARAMETERS FOR MOTOR CURRENT CONTROL  
Parameter  
Description  
Setting Comment  
IRUN  
Current scale when motor is running. Scales coil 0 … 31  
current values as taken from the internal sine  
wave table. For high precision motor operation,  
work with a current scaling factor in the range 16  
to 31, because scaling down the current values  
reduces the effective microstep resolution by  
making microsteps coarser.  
scaling factor  
1/32, 2/32, … 32/32  
IRUN is full scale (setting  
31) in standalone mode.  
IHOLD  
IHOLD  
DELAY  
Identical to IRUN, but for motor in stand still.  
Allows smooth current reduction from run current 0  
to hold current. IHOLDDELAY controls the number  
of clock cycles for motor power down after  
TPOWERDOWN in increments of 2^18 clocks:  
0=instant power down, 1..15: Current reduction  
delay per current step in multiple of 2^18 clocks.  
instant IHOLD  
1 … 15 1*218 … 15*218  
clocks per current  
decrement  
Example: When using IRUN=31 and IHOLD=16, 15  
current steps are required for hold current  
reduction. A IHOLDDELAY setting of 4 thus results  
in a power down time of 4*15*2^18 clock cycles,  
i.e. roughly one second at 16MHz clock frequency.  
TPOWER  
DOWN  
Sets the delay time from stand still (stst) detection 0 … 255 0…((2^8)-1) * 2^18 tCLK  
to motor current power down. Time range is  
about 0 to 5.6 seconds.  
A minimum setting of 2  
is required to allow  
automatic  
tuning  
of  
PWM_OFFS_AUTO  
vsense  
Allows control of the sense resistor voltage range 0  
VFS = 0.32V  
for full scale current. The low voltage range  
1
VFS = 0.18V  
allows a reduction of sense resistor power  
dissipation.  
9.1 Analog Current Scaling VREF  
When a high flexibility of the output current scaling is desired, the analog input of the driver can be  
used for current control, rather than choosing a different set of sense resistors or scaling down the  
run current via the interface using IRUN or IHOLD parameters. This way, a simple voltage divider  
adapts a board to different motors.  
VREF SCALES THE MOTOR CURRENT  
The TMC22xx provides an internal reference voltage for current control, directly derived from the  
5VOUT supply output. Alternatively, an external reference voltage can be used. This reference voltage  
becomes scaled down for the chopper comparators. The chopper comparators compare the voltages  
on BRA and BRB to the scaled reference voltage for current regulation. When I_scale_analog in GCONF  
is enabled (default), the external voltage on VREF is amplified and filtered and becomes used as  
reference voltage. A voltage of 2.5V (or any voltage between 2.5V and 5V) gives the same current  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
54  
scaling as the internal reference voltage. A voltage between 0V and 2.5V linearly scales the current  
between 0 and the current scaling defined by the sense resistor setting. It is not advised to work  
with reference voltages below about 0.5V to 1V for full scale, because relative analog noise caused by  
digital circuitry and power supply ripple has an increased impact on the chopper precision at low  
VREF voltages. For best precision, choose the sense resistors in a way that the desired maximum  
current is reached with VREF in the range 2V to 2.4V. Be sure to optimize the chopper settings for the  
normal run current of the motor.  
DRIVING VREF  
The easiest way to provide a voltage to VREF is to use a voltage divider from a stable supply voltage  
or a microcontroller’s DAC output. A PWM signal also allows current control. The PWM becomes  
transformed to an analog voltage using an additional R/C low-pass at the VREF pin. The PWM duty  
cycle controls the analog voltage. Choose the R and C values to form a low pass with a corner  
frequency of several milliseconds while using PWM frequencies well above 10 kHz. VREF additionally  
provides an internal low-pass filter with 3.5kHz bandwidth.  
Hint  
Using a low reference voltage (e.g. below 1V), for adaptation of a high current driver to a low current  
motor will lead to reduced analog performance. Adapt the sense resistors to fit the desired motor  
current for the best result.  
2.5V  
precision  
reference  
1-2.4V for fixed  
current scaling  
0-2.4V for  
current scaling  
0-2.4V for  
current scaling  
Digital  
current  
control  
PWM output  
of µC with  
>20kHz  
5VOUT or precise  
reference voltage  
8 Bit DAC  
R1  
22k  
R2  
R3  
1µ  
R1+R2»10K  
Optional  
digital  
control  
BC847  
100k  
Analog Scaling  
Analog Scaling  
Analog Scaling  
Fixed resistor divider to set current scale  
(use external reference for enhanced precision)  
Precision current scaler  
Simple PWM based current scaler  
Figure 9.1 Scaling the motor current using the analog input  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
55  
UART  
OTP  
10 Internal Sense Resistors  
The TMC22xx provides the option to eliminate external sense resistors. In this mode the external  
sense resistors become omitted (shorted) and the internal on-resistance of the power MOSFETs is  
used for current measurement (see chapter 3.2). As MOSFETs are both, temperature dependent and  
subject to production stray, a tiny external resistor connected from +5VOUT to VREF provides a precise  
absolute current reference. This resistor converts the 5V voltage into a reference current. Be sure to  
directly attach BRA and BRB pins to GND in this mode near the IC package. The mode is enabled by  
setting internal_Rsense in GCONF (OTP option).  
COMPARING INTERNAL SENSE RESISTORS VS. SENSE RESISTORS  
Item  
Ease of use  
Cost  
Current precision  
Current Range  
Recommended  
Recommended  
chopper  
Internal Sense Resistors  
Need to set OTP parameter first  
(+) Save cost for sense resistors  
Slightly reduced  
External Sense Resistors  
(+) Default  
(+) Good  
50mA to 1.4A RMS  
200mA RMS to 1.2A RMS  
stealthChop,  
spreadCycle shows slightly  
reduced performance at >1A  
stealthChop or spreadCycle  
While the RDSon based measurements bring benefits concerning cost and size of the driver, it gives  
slightly less precise coil current regulation when compared to external sense resistors. The internal  
sense resistors have a certain temperature dependence, which is automatically compensated by the  
driver IC. However, for high current motors, a temperature gradient between the ICs internal sense  
resistors and the compensation circuit will lead to an initial current overshoot of some 10% during  
driver IC heat up. While this phenomenon shows for roughly a second, it might even be beneficial to  
enable increased torque during initial motor acceleration.  
PRINCIPLE OF OPERATION  
A reference current into the VREF pin is used as reference for the motor current. In order to realize a  
certain current, a single resistor (RREF) can be connected between 5VOUT and VREF (pls. refer the table  
for the choice of the resistor). VREF input resistance is about 1kOhm. The resulting current into VREF  
is amplified 3000 times. Thus, a current of 0.5mA yields a motor current of 1.5A peak. For calculation  
of the reference resistor, the internal resistance of VREF needs to be considered additionally.  
CHOICE OF RREF FOR OPERATION WITHOUT SENSE RESISTORS  
RREF [Ω]  
Peak current [A]  
RMS current [A]  
(CS=31, vsense=0)  
(CS=31, vsense=0)  
6k8  
7k5  
8k2  
9k1  
10k  
12k  
15k  
18k  
22k  
27k  
33k  
1.92  
1.76  
1.63  
1.49  
1.36  
1.15  
0.94  
0.79  
0.65  
0.60  
0.54  
1.35  
1.24  
1.15  
1.05  
0.96  
0.81  
0.66  
0.55  
0.45  
0.42  
0.38  
vsense=1 allows a lower peak current setting of about 55% of the value yielded with vsense=0 (as  
specified by VSRTH / VSRTL).  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
56  
In RDSon measurement mode, connect the BRA and BRB pins to GND using the shortest possible path  
(i.e. lowest possible PCB resistance). RDSon based measurement gives best results when combined  
with stealthChop. When using spreadCycle with RDSon based current measurement, slightly  
asymmetric current measurement for positive currents (on phase) and negative currents (fast decay  
phase) may result in chopper noise. This especially occurs at high die temperature and increased  
motor current.  
Note  
The absolute current levels achieved with RDSon based current sensing may depend on PCB layout  
exactly like with external sense resistors, because trace resistance on BR pins will add to the effective  
sense resistance. Therefore we recommend to measure and calibrate the current setting within the  
application.  
Thumb rule  
RDSon based current sensing works best for motors with up to 1A RMS current. The best results are  
yielded with stealthChop operation in combination with RDSon based current sensing.  
For most precise current control and for best results with spreadCycle, it is recommended to use  
external 1% sense resistors rather than RDSon based current control.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
57  
11 STEP/DIR Interface  
The STEP and DIR inputs provide a simple, standard interface compatible with many existing motion  
controllers. The microPlyer step pulse interpolator brings the smooth motor operation of high-  
resolution microstepping to applications originally designed for coarser stepping.  
11.1 Timing  
Figure 11.1 shows the timing parameters for the STEP and DIR signals, and the table below gives  
their specifications. Only rising edges are active. STEP and DIR are sampled and synchronized to the  
system clock. An internal analog filter removes glitches on the signals, such as those caused by long  
PCB traces. If the signal source is far from the chip, and especially if the signals are carried on cables,  
the signals should be filtered or differentially transmitted.  
+VCC_IO  
DIR  
SchmittTrigger  
tSH  
tSL  
tDSH  
tDSU  
STEP  
or DIR  
Input  
83k  
0.56 VCC_IO  
0.44 VCC_IO  
STEP  
Internal  
Signal  
C
Input filter  
R*C = 20ns +-30%  
Figure 11.1 STEP and DIR timing, Input pin filter  
STEP and DIR interface timing  
Parameter  
AC-Characteristics  
clock period is tCLK  
Symbol Conditions  
Min  
Typ  
Max  
Unit  
step frequency (at maximum  
microstep resolution)  
fSTEP  
½ fCLK  
fullstep frequency  
STEP input minimum low time  
fFS  
tSL  
fCLK/512  
max(tFILTSD  
tCLK+20)  
max(tFILTSD  
tCLK+20)  
,
,
100  
100  
ns  
ns  
STEP input minimum high time  
tSH  
DIR to STEP setup time  
DIR after STEP hold time  
STEP and DIR spike filtering time  
*)  
tDSU  
tDSH  
tFILTSD  
20  
20  
13  
ns  
ns  
ns  
rising and falling  
edge  
20  
30  
STEP and DIR sampling relative  
to rising CLK input  
tSDCLKHI  
before rising edge  
of CLK input  
tFILTSD  
ns  
*) These values are valid with full input logic level swing, only. Asymmetric logic levels will increase  
filtering delay tFILTSD, due to an internal input RC filter.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
58  
11.2 Changing Resolution  
The TMC22xx includes an internal microstep table with 1024 sine wave entries to generate sinusoidal  
motor coil currents. These 1024 entries correspond to one electrical revolution or four fullsteps. The  
microstep resolution setting determines the step width taken within the table. Depending on the DIR  
input, the microstep counter is increased (DIR=0) or decreased (DIR=1) with each STEP pulse by the  
step width. The microstep resolution determines the increment respectively the decrement. At  
maximum resolution, the sequencer advances one step for each step pulse. At half resolution, it  
advances two steps. Increment is up to 256 steps for fullstepping. The sequencer has special  
provision to allow seamless switching between different microstep rates at any time. When switching  
to a lower microstep resolution, it calculates the nearest step within the target resolution and reads  
the current vector at that position. This behavior especially is important for low resolutions like  
fullstep and halfstep, because any failure in the step sequence would lead to asymmetrical run when  
comparing a motor running clockwise and counterclockwise.  
EXAMPLES:  
Fullstep:  
Cycles through table positions: 128, 384, 640 and 896 (45°, 135°, 225° and 315° electrical  
position, both coils on at identical current). The coil current in each position  
corresponds to the RMS-Value (0.71 * amplitude). Step size is 256 (90° electrical)  
Half step:  
The first table position is 64 (22.5° electrical), Step size is 128 (45° steps)  
Quarter step: The first table position is 32 (90°/8=11.25° electrical), Step size is 64 (22.5° steps)  
This way equidistant steps result and they are identical in both rotation directions. Some older drivers  
also use zero current (table entry 0, 0°) as well as full current (90°) within the step tables. This kind of  
stepping is avoided because it provides less torque and has a worse power dissipation in driver and  
motor.  
Step position  
table position  
64  
current coil A  
38.3%  
current coil B  
92.4%  
Half step 0  
Full step 0  
Half step 1  
Half step 2  
Full step 1  
Half step 3  
Half step 4  
Full step 2  
Half step 5  
Half step 6  
Full step 3  
Half step 7  
128  
192  
320  
384  
448  
576  
640  
704  
832  
896  
960  
70.7%  
92.4%  
92.4%  
70.7%  
38.3%  
-38.3%  
-70.7%  
-92.4%  
-92.4%  
-70.7%  
-38.3%  
70.7%  
38.3%  
-38.3%  
-70.7%  
-92.4%  
-92.4%  
-70.7%  
-38.3%  
38.3%  
70.7%  
92.4%  
See chapter 3.4 for resolution settings available in stand-alone mode.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
59  
11.3 microPlyer Step Interpolator and Stand Still Detection  
For each active edge on STEP, microPlyer produces microsteps at 256x resolution, as shown in Figure  
11.2. It interpolates the time in between of two step impulses at the step input based on the last  
step interval. This way, from 2 microsteps (128 microstep to 256 microstep interpolation) up to 256  
microsteps (full step input to 256 microsteps) are driven for a single step pulse.  
The step rate for the interpolated 2 to 256 microsteps is determined by measuring the time interval of  
the previous step period and dividing it into up to 256 equal parts. The maximum time between two  
microsteps corresponds to 220 (roughly one million system clock cycles), for an even distribution of  
256 microsteps. At 12MHz system clock frequency, this results in a minimum step input frequency of  
roughly 12Hz for microPlyer operation. A lower step rate causes a standstill event to be detected. At  
that frequency, microsteps occur at a rate of (system clock frequency)/216 ~ 256Hz. When a stand still is  
detected, the driver automatically begins standby current reduction if selected by pin PDN.  
Attention  
microPlyer only works perfectly with a stable STEP frequency.  
STEP  
Interpolated  
0
1
2
3
4
5
6
7
8
9
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66  
microstep  
Motor  
angle  
2^20 tCLK  
STANDSTILL  
(stst) active  
Figure 11.2 microPlyer microstep interpolation with rising STEP frequency (Example: 16 to 256)  
In Figure 11.2, the first STEP cycle is long enough to set the stst bit standstill. Detection of standstill  
will enable the standby current reduction. This bit is cleared on the next STEP active edge. Then, the  
external STEP frequency increases. After one cycle at the higher rate microPlyer adapts the  
interpolated microstep rate to the higher frequency. During the last cycle at the slower rate,  
microPlyer did not generate all 16 microsteps, so there is a small jump in motor angle between the  
first and second cycles at the higher rate.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
60  
11.4 Index Output  
An active INDEX output signals that the sine curve of motor coil A is at its positive zero transition.  
This correlates to the zero point of the microstep sequence. Usually, the cosine curve of coil B is at its  
maximum at the same time. Thus the index signal is active once within each electrical period, and  
corresponds to a defined position of the motor within a sequence of four fullsteps. The INDEX output  
this way allows the detection of a certain microstep pattern, and thus helps to detect a position with  
more precision than a stop switch can do.  
Current  
COIL A  
COIL B  
0
Time  
INDEX  
STEPS  
Current  
Time  
Time  
Figure 11.3 Index signal at positive zero transition of the coil A sine curve  
Hint  
The index output allows precise detection of the microstep position within one electrical wave, i.e.  
within a range of four fullsteps. With this, homing accuracy and reproducibility can be enhanced to  
microstep accuracy, even when using an inexpensive home switch.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
61  
UART  
12 Internal Step Pulse Generator  
The TMC22xx family integrates a high resolution step pulse generator, allowing motor motion via the  
UART interface. However, no velocity ramping is provided. Ramping is not required, if the target  
motion velocity is smaller than the start & stop frequency of the motor. For higher velocities, ramp up  
the frequency in small steps to accelerate the motor, and ramp down again to decelerate the motor.  
Figure 12.1 shows an example motion profile ramping up the motion velocity in discrete steps.  
Choose the ramp velocity steps considerably smaller than the maximum start velocity of the motor,  
because motor torque drops at higher velocity, and motor load at higher velocity typically increases.  
motor  
stop  
v
acceleration  
constant velocity  
deceleration  
Target Velocity  
e
l
i
f
o
r
p
l
a
c
i
t
e
r
o
e
h
T
Stop velocity  
Start velocity  
0
t
VACTUAL  
Figure 12.1 Software generated motion profile  
PARAMETER VS. UNITS  
Parameter / Symbol  
Unit  
calculation / description / comment  
fCLK[Hz]  
[Hz]  
clock frequency of the TMC22xx in [Hz]  
v[Hz] = VACTUAL[22xx] * ( fCLK[Hz]/2 / 2^23 )  
With internal oscillator:  
µstep velocity v[Hz]  
µsteps / s  
v[Hz] = VACTUAL[22xx] * 0.715Hz  
microstep resolution in number of microsteps  
(i.e. the number of microsteps between two  
fullsteps normally 256)  
USC microstep count  
counts  
v[rps] = v[Hz] / USC / FSC  
FSC: motor fullsteps per rotation, e.g. 200  
rotations per second v[rps]  
rotations / s  
TSTEP = fCLK / fSTEP  
The time reference for velocity threshold is  
referred to the actual microstep frequency of  
the step input respectively velocity v[Hz].  
VACTUAL[22xx] = ( fCLK[Hz]/2 / 2^23 ) / v[Hz]  
With internal oscillator:  
TSTEP, TPWMTHRS  
-
Two’s complement  
signed internal  
velocity  
VACTUAL  
VACTUAL[22xx] = 0.715Hz / v[Hz]  
Hint  
To monitor internal step pulse execution, program the INDEX output to provide step pulses  
(GCONF.index_step). It toggles upon each step. Use a timer input on your CPU to count pulses.  
Alternatively, regularly poll MSCNT to grasp steps done in the previous polling interval. It wraps  
around from 1023 to 0.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
62  
13 Driver Diagnostic Flags  
The TMC22xx drivers supply a complete set of diagnostic and protection capabilities, like short to GND  
protection, short to VS protection and undervoltage detection. A detection of an open load condition  
allows testing if a motor coil connection is interrupted. See the DRV_STATUS table for details.  
13.1 Temperature Measurement  
The driver integrates a four level temperature sensor (pre-warning and thermal shutdown) for  
diagnostics and for protection of the IC against excess heat. The thresholds can be adapted by UART  
or OTP programming. Heat is mainly generated by the motor driver stages, and, at increased voltage,  
by the internal voltage regulator. Most critical situations, where the driver MOSFETs could be  
overheated, are avoided by the short to GND protection. For many applications, the overtemperature  
pre-warning will indicate an abnormal operation situation and can be used to initiate user warning or  
power reduction measures like motor current reduction. The thermal shutdown is just an emergency  
measure and temperature rising to the shutdown level should be prevented by design.  
TEMPERATURE THRESHOLDS  
Overtemperature Comment  
Setting  
143°C  
(OTPW: 120°C)  
Default setting. This setting is safest to switch off the driver stage before the IC  
can be destroyed by overheating. On a large PCB, the power MOSFETs reach  
roughly 150°C peak temperature when the temperature detector is triggered with  
this setting. This is a trip typical point for overtemperature shut down. The  
overtemperature pre-warning threshold of 120°C gives lots of headroom to react  
to high driver temperature, e.g. by reducing motor current.  
150°C  
(OTPW:  
120°C or 143°C)  
Optional setting (OTP or UART). For small PCBs with high thermal resistance  
between PCB and environment, this setting provides some additional headroom.  
The small PCB shows less temperature difference between the MOSFETs and the  
sensor.  
157°C  
(OTPW: 143°C)  
Optional setting (UART). For applications, where a stop of the motor cannot be  
tolerated, this setting provides highest headroom, e.g. at high environment  
temperature ratings. Using the 143°C overtemperature pre-warning to reduce  
motor current ensures that the motor is not switched off by the thermal  
threshold.  
Attention  
Overtemperature protection cannot in all cases avoid thermal destruction of the IC. In case the rated  
motor current is exceed, e.g. by operating a motor in stealthChop with wrong parameters, or with  
automatic tuning parameters not fitting the operating conditions, excess heat generation can quickly  
heat up the driver before the overtemperature sensor can react. This is due to a delay in heat  
conduction over the IC die.  
After triggering the overtemperature sensor (ot flag), the driver remains switched off until the system  
temperature falls below the pre-warning level (otpw) to avoid continuous heating to the shutdown  
level.  
13.2 Short Protection  
The TMC22xx power stages are protected against a short circuit condition by an additional measure-  
ment of the current flowing through each of the power stage MOSFETs. This is important, as most  
short circuit conditions result from a motor cable insulation defect, e.g. when touching the conducting  
parts connected to the system ground. The short detection is protected against spurious triggering,  
e.g. by ESD discharges, by retrying three times before switching off the motor.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
63  
Once a short condition is safely detected, the corresponding driver bridge (A or B) becomes switched  
off, and the s2ga or s2gb flag, respectively s2vsa or s2vsb becomes set. In order to restart the motor,  
disable and re-enable the driver. Note, that short protection cannot protect the system and the power  
stages for all possible short events, as a short event is rather undefined and a complex network of  
external components may be involved. Therefore, short circuits should basically be avoided.  
UART  
13.3 Open Load Diagnostics  
Interrupted cables are a common cause for systems failing, e.g. when connectors are not firmly  
plugged. The TMC22xx detects open load conditions by checking, if it can reach the desired motor coil  
current. This way, also undervoltage conditions, high motor velocity settings or short and  
overtemperature conditions may cause triggering of the open load flag, and inform the user, that  
motor torque may suffer. In motor stand still, open load cannot always be measured, as the coils  
might eventually have zero current.  
Open load detection is provided for system debugging.  
In order to safely detect an interrupted coil connection, read out the open load flags at low or  
nominal motor velocity operation, only. If possible, use spreadCycle for testing, as it provides the  
most accurate test. However, the ola and olb flags have just informative character and do not cause  
any action of the driver.  
13.4 Diagnostic Output  
The diagnostic output DIAG and the index output INDEX provide important status information. An  
active DIAG output shows that the driver cannot work normally. The INDEX output signals the  
microstep counter zero position, to allow referencing (homing) a drive to a certain current pattern.  
The function set of the INDEX output can be modified by UART. Figure 13.1 shows the available  
signals and control bits.  
Power-on reset  
DIAG  
Charge pump undervoltage (uv_cp)  
drv_err  
Overtemperature (ot)  
TMC220x, only  
Short circuit (s2vs, s2g) over temperature (ot)  
Q
S
R
Power stage disable (e.g. pin ENN)  
Index pulse  
INDEX  
Overtemperature prewarning (otpw)  
Toggle upon each step  
GCONF.index_otpw  
GCONF.index_step  
Figure 13.1 DIAG and INDEX outputs  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
64  
UART  
OTP  
14 Quick Configuration Guide  
This guide is meant as a practical tool to come to a first configuration. Do a minimum set of  
measurements and decisions for tuning the driver to determine UART settings or OTP parameters. The  
flow-charts concentrate on the basic function set to make a motor run smoothly. Once the motor  
runs, you may decide to explore additional features, e.g. freewheeling in more detail. A current probe  
on one motor coil is a good aid to find the best settings, but it is not a must.  
stealthChop  
Current Setting  
Configuration  
Check hardware  
setup and motor  
RMS current  
GCONF  
clear en_spreadCycle  
(default)  
GCONF  
PWMCONF  
set pwm_autoscale,  
set pwm_autograd  
Sense Resistors  
used?  
set internal_Rsense  
Store to OTP 0.6  
recommended  
N
Y
Y
PWMCONF  
select PWM_FREQ with  
regard to fCLK for 20-  
40kHz PWM frequency  
GCONF  
set I_scale_analog  
(this is default)  
Analog Scaling?  
Set VREF as desired  
CHOPCONF  
N
Enable chopper using basic  
config., e.g.: TOFF=5, TBL=2,  
HSTART=4, HEND=0  
CHOPCONF  
set vsense for max.  
180mV at sense resistor  
(0R15: 1.1A peak)  
Low Current range?  
N
Y
Execute  
automatic  
tuning  
procedure AT  
Set I_RUN as desired up  
to 31, I_HOLD 70% of  
I_RUN or lower  
Set I_HOLD_DELAY to 1  
to 15 for smooth  
standstill current decay  
Move the motor by  
slowly accelerating  
from 0 to VMAX  
operation velocity  
Set TPOWERDOWN up  
to 255 for delayed  
standstill current  
reduction  
Select a velocity  
threshold for switching  
to spreadCycle chopper  
and set TPWMTHRS  
Is performance  
good up to VMAX?  
N
Y
Configure Chopper to  
test current settings  
SC2  
Figure 14.1 Current Setting and first steps with stealthChop  
Hint  
Use the evaluation board to explore settings and to generate the required configuration datagrams.  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
65  
spreadCycle  
Configuration  
SC2  
Try motion above  
TPWMTRHRS, if  
used  
GCONF  
set en_spreadCycle  
CHOPCONF  
Coil current  
overshoot upon  
deceleration?  
PWMCONF  
decrease PWM_LIM (do  
not go below about 5)  
Enable chopper using basic  
config.: TOFF=5, TBL=2,  
HSTART=0, HEND=0  
Y
N
Move the motor by  
slowly accelerating  
from 0 to VMAX  
Go to motor stand  
still and check  
motor current at  
IHOLD=IRUN  
operation velocity  
Monitor sine wave motor  
coil currents with current  
probe at low velocity  
CHOPCONF, PWMCONF  
decrease TBL or PWM  
frequency and check  
Stand still current  
too high?  
Y
impact on motor motion  
N
Current zero  
crossing smooth?  
CHOPCONF  
increase HEND (max. 15)  
N
Optimize spreadCycle  
configuration if TPWMTHRS  
used  
Y
Move motor very slowly or  
try at stand still  
CHOPCONF  
Audible Chopper  
noise?  
decrease TOFF (min. 2),  
try lower / higher TBL or  
reduce motor current  
Y
N
Move motor at medium  
velocity or up to max.  
velocity  
CHOPCONF  
decrease HEND and  
increase HSTART (max.  
7)  
Audible Chopper  
noise?  
Y
Finished  
Figure 14.2 Tuning stealthChop and spreadCycle  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
66  
OTP programming  
Determine stand still current  
settings (IHOLD, IHOLDDELAY) and  
sense resistor type (internal_Rsense)  
Determine chopper settings  
(CHOPCONF and PWMCONF)  
spreadCycle only  
mode?  
Go for  
otp_en_spreadCycle=1  
Y
Y
N
Find nearest value fitting  
for TPWMTHRS from  
table OTP_TPWMTHRS  
Mix spreadCylce  
and stealthChop?  
N
Find nearest value fitting for  
PWM_GRAD initialization from  
table OTP_PWM_GRAD  
Note all OTP bits to be set  
to 1.  
Choose a bit to be programmed and write  
OTP byte and bit address to OTP_PROG  
including magic code 0xbd  
Wait for 10ms or longer  
N
Are all OTP bits  
programmed?  
Y
All bits set in  
N
Re-Program missing bits  
using 100ms delay time  
OTP_READ?  
Y
Finished  
Figure 14.3 OTP programming  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
67  
15 External Reset  
The chip is loaded with default values during power on via its internal power-on reset. Some of the  
registers are initialized from the OTP at power up. In order to reset the chip to power on defaults,  
any of the supply voltages monitored by internal reset circuitry (VS, +5VOUT or VCC_IO) must be  
cycled. As +5VOUT is the output of the internal voltage regulator, it cannot be cycled via an external  
source except by cycling VS. It is easiest and safest to cycle VCC_IO in order to completely reset the  
chip. Also, current consumed from VCC_IO is low and therefore it has simple driving requirements.  
Due to the input protection diodes not allowing the digital inputs to rise above VCC_IO level, all  
inputs must be driven low during this reset operation. When this is not possible, an input protection  
resistor may be used to limit current flowing into the related inputs.  
16 Clock Oscillator and Input  
The clock is the timing reference for all functions: the chopper frequency, the blank time, the standstill  
power down timing, and the internal step pulse generator etc. The on-chip clock oscillator is  
calibrated in order to provide timing precise enough for most operation cases.  
USING THE INTERNAL CLOCK  
Directly tie the CLK input to GND near to the IC if the internal clock oscillator is to be used. The  
internal clock frequency is factory-trimmed to 12MHz by OTP programming.  
USING AN EXTERNAL CLOCK  
When an external clock is available, any frequency of 8 to 18MHz can be used to clock the TMC22xx.  
The duty cycle of the clock signal is uncritical, as long as minimum high or low input time for the pin  
is satisfied (refer to electrical characteristics). Make sure, that the clock source supplies clean CMOS  
output logic levels and steep slopes when using a high clock frequency. The external clock input is  
enabled with the first positive polarity seen on the CLK input. Modifying the clock frequency is an  
easy way to adapt the stealthChop chopper frequency or to synchronize multiple drivers. Working  
with a very low clock frequency down to 4MHz can help reducing power consumption and  
electromagnetic emissions, but it will sacrifice some performance.  
Use an external clock source to synchronize multiple drivers, or to get precise motor operation with  
the internal pulse generator for motion. The external clock frequency selection also allows modifying  
the power down timing and the chopper frequency.  
Hint  
Switching off the external clock frequency would stop the chopper and could lead to an overcurrent  
condition. Therefore, TMC22xx has an internal timeout of 32 internal clocks. In case the external clock  
fails, it switches back to internal clock.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
68  
17 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.  
Parameter  
Symbol  
Min  
Max  
Unit  
Supply voltage operating with inductive load  
Supply and bridge voltage max. *)  
I/O supply voltage  
digital supply voltage (when using external supply)  
Logic input voltage  
VREF input voltage (Do not exceed both, VCC_IO and  
5VOUT by more than 10%, as this enables a test mode)  
Maximum current to / from digital pins  
and analog low voltage I/Os  
VVS  
-0.5  
39  
40  
5.5  
5.5  
VVIO+0.5  
6
V
V
V
V
V
V
VVMAX  
VVIO  
V5VOUT  
VI  
-0.5  
-0.5  
-0.5  
-0.5  
VVREF  
IIO  
+/-10  
mA  
5V regulator output current (internal plus external load)  
5V regulator continuous power dissipation (VVM-5V) * I5VOUT P5VOUT  
Power bridge repetitive output current  
Junction temperature  
Storage temperature  
I5VOUT  
25  
0.5  
2.5  
150  
150  
4
mA  
W
A
°C  
°C  
kV  
IOx  
TJ  
TSTG  
VESDAP  
-50  
-55  
ESD-Protection for interface pins (Human body model,  
HBM)  
ESD-Protection for handling (Human body model, HBM)  
VESD  
1
kV  
*) Stray inductivity of GND and VS connections will lead to ringing of the supply voltage when driving  
an inductive load. This ringing results from the fast switching slopes of the driver outputs in  
combination with reverse recovery of the body diodes of the output driver MOSFETs. Even small trace  
inductivities as well as stray inductivity of sense resistors can easily generate a few volts of ringing  
leading to temporary voltage overshoot. This should be considered when working near the maximum  
voltage.  
18 Electrical Characteristics  
18.1 Operational Range  
Parameter  
Symbol  
TJ  
VVS  
Min  
Max  
Unit  
Junction temperature  
-40  
5.5  
6
125  
36  
36  
°C  
V
V
Supply voltage (using internal +5V regulator)  
Supply voltage (using internal +5V regulator) for OTP  
programming  
VVS  
Supply voltage (internal +5V regulator bridged: V5VOUT=VVS)  
I/O supply voltage  
VCC voltage when using optional external source (supplies VVCC  
digital logic and charge pump)  
VVS  
VVIO  
4.7  
3.00  
4.6  
5.4  
5.25  
5.25  
V
V
V
RMS motor coil current per coil (value for design guideline) IRMS  
RMS motor coil current per coil with duty cycle limit, e.g. 1s IRMS  
on, 1s standby (value for design guideline)  
1.2  
1.4  
A
A
Peak output current per motor coil output (sine wave peak) IOx  
using external or internal current sensing  
2.0  
A
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
69  
18.2 DC and Timing Characteristics  
DC characteristics contain the spread of values guaranteed within the specified supply voltage range  
unless otherwise specified. Typical values represent the average value of all parts measured at +25°C.  
Temperature variation also causes stray to some values. A device with typical values will not leave  
Min/Max range within the full temperature range.  
Power supply current  
DC-Characteristics  
VVS = VVSA = 24.0V  
Parameter  
Symbol Conditions  
Min  
Typ  
Max Unit  
Total supply current, driver  
disabled IVS  
IS  
fCLK=12MHz  
7
10  
mA  
Total supply current, operating,  
IVS  
IS  
fCLK=12MHz, 35kHz  
chopper, no load  
fCLK variable,  
additional to IVS0  
fCLK=12MHz, 35kHz  
chopper  
no load on outputs,  
inputs at VIO or GND  
Excludes pullup /  
pull-down resistors  
7.5  
0.3  
4.5  
15  
mA  
mA/MHz  
Supply current, driver disabled,  
dependency on CLK frequency  
Internal current consumption  
from 5V supply on VCC pin  
IO supply current (typ. at 5V)  
IVS  
IVCC  
IVIO  
mA  
µA  
30  
Motor driver section  
DC- and Timing-Characteristics  
VVS = 24.0V  
Parameter  
Symbol Conditions  
Min  
Typ  
Max Unit  
RDSON lowside MOSFET  
RONL  
measure at 100mA,  
25°C, static state  
measure at 100mA,  
25°C, static state  
measured at 700mA  
load current  
(resistive load)  
measured at 700mA  
load current  
0.28  
0.38  
0.39  
160  
RDSON highside MOSFET  
slope, MOSFET turning on  
RONH  
tSLPON  
0.29  
80  
40  
40  
ns  
slope, MOSFET turning off  
tSLPOFF  
80  
160  
250  
ns  
(resistive load)  
OXX pulled to GND  
Current sourcing, driver off  
IOIDLE  
120  
180  
µA  
Charge pump  
DC-Characteristics  
Parameter  
Symbol Conditions  
Min  
Typ  
Max Unit  
Charge pump output voltage  
VVCP-VVS  
VVCP-VVS  
fCP  
operating, typical  
fchop<40kHz  
using internal 5V  
regulator voltage  
4.0  
VVCC  
0.3  
3.6  
-
VVCC  
V
Charge pump voltage threshold  
for undervoltage detection  
Charge pump frequency  
3.3  
4.0  
V
1/16  
fCLKOSC  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
70  
Linear regulator  
DC-Characteristics  
VVS = VVSA = 24.0V  
Parameter  
Symbol Conditions  
Min  
Typ  
Max Unit  
Output voltage  
V5VOUT  
I5VOUT = 0mA  
TJ = 25°C  
4.80  
5.0  
5.25  
V
Output resistance  
R5VOUT  
Static load  
1
Deviation of output voltage over V5VOUT(DEV) I5VOUT = 5mA  
the full temperature range  
+/-30  
+/-100  
+/-30  
mV  
TJ = full range  
Deviation of output voltage over V5VOUT(DEV) I5VOUT = 5mA  
+/-15  
mV /  
10V  
the full supply voltage range  
VVS = variable  
Clock oscillator and input  
Parameter  
Timing-Characteristics  
Symbol Conditions  
Min  
Typ  
Max Unit  
MHz  
Clock oscillator frequency  
(factory calibrated)  
fCLKOSC  
fCLKOSC  
fCLKOSC  
fCLK  
tJ=-50°C  
tJ= 25°C  
tJ=150°C  
11.7  
12.0  
12.1  
11.5  
4
12.5  
MHz  
MHz  
MHz  
External clock frequency  
(operating)  
10-16  
18  
External clock high / low level  
time  
External clock timeout detection xtimeout  
in cycles of internal fCLKOSC  
tCLK  
CLK driven to  
10  
32  
ns  
0.1 VVIO / 0.9 VVIO  
External clock stuck  
at low or high  
48  
cycles  
fCLKOSC  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
71  
Detector levels  
Parameter  
DC-Characteristics  
Symbol Conditions  
Min  
Typ  
Max Unit  
VVS undervoltage threshold for  
RESET  
VUV_VS  
VVS rising  
3.5  
4.2  
4.6  
V
V5VOUT undervoltage threshold for VUV_5VOUT  
RESET  
VVCC_IO undervoltage threshold for VUV_VIO  
RESET  
V5VOUT rising  
3.5  
2.55  
0.3  
2.5  
2
V
VVCC_IO rising (delay  
typ. 10µs)  
2.1  
3.0  
V
VVCC_IO undervoltage detector  
hysteresis  
VUV_VIOHYST  
V
Short to GND detector threshold VOS2G  
(VVS - VOx)  
2
3
2.3  
2
V
Short to VS detector threshold  
(VOx)  
VOS2G  
1.6  
0.8  
V
Short detector delay  
tS2G  
High side output  
clamped to VSP-3V  
1.3  
µs  
(high side / low side switch on  
to short detected)  
Overtemperature prewarning  
120°C  
Overtemperature shutdown or  
prewarning 143°C (appr. 153°C IC  
peak temp.)  
tOTPW  
tOT143  
Temperature rising  
Temperature rising  
100  
128  
120  
143  
140  
163  
°C  
°C  
Overtemperature shutdown  
150°C (appr. 160°C IC peak temp.)  
Overtemperature shutdown  
157°C (appr. 167°C IC peak temp.)  
Difference between temperature tOTDIFF  
detector and power stage  
tOT150  
tOT157  
Temperature rising  
Temperature rising  
135  
142  
150  
157  
10  
170  
177  
°C  
°C  
°C  
Power stage causing  
high temperature,  
normal 4 Layer PCB  
temperature, slow heat up  
Sense resistor voltage levels  
DC-Characteristics  
fCLK=16MHz  
Symbol Conditions  
Parameter  
Min  
Typ  
Max Unit  
mV  
Sense input peak threshold  
voltage (low sensitivity)  
VSRTL  
vsense=0  
325  
csactual=31  
CUR_A/B=248  
Hyst.=0; IBRxy=0  
vsense=1  
csactual=31  
CUR_A/B=248  
Hyst.=0; IBRxy=0  
I_scale_analog=0,  
vsense=0  
Sense input peak threshold  
voltage (high sensitivity)  
VSRTH  
180  
mV  
Sense input tolerance / motor  
current full scale tolerance  
-using internal reference  
ICOIL  
-5  
-2  
+5  
+2  
%
%
Sense input tolerance / motor  
current full scale tolerance  
-using external reference voltage  
ICOIL  
I_scale_analog=1,  
VAIN=2V, vsense=0  
Internal resistance from pin BRxy RBRxy  
to internal sense comparator  
30  
mΩ  
(additional to sense resistor)  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
72  
Digital pins  
DC-Characteristics  
Parameter  
Symbol Conditions  
Min  
-0.3  
Typ  
Max Unit  
Input voltage low level  
Input voltage high level  
Input Schmitt trigger hysteresis  
VINLO  
0.3 VVIO  
VVIO+0.3  
V
V
V
VINHI  
0.7 VVIO  
VINHYST  
0.12  
VVIO  
Output voltage low level  
Output voltage high level  
Input leakage current  
VOUTLO  
VOUTHI  
IILEAK  
RPU/RPD  
C
IOUTLO = 2mA  
IOUTHI = -2mA  
0.2  
V
VVIO-0.2  
-10  
V
10  
µA  
kΩ  
pF  
Pullup / pull-down resistors  
Digital pin capacitance  
132  
166  
3.5  
200  
AIN/IREF input  
Parameter  
DC-Characteristics  
Symbol Conditions  
Min  
Typ  
Max Unit  
400 kΩ  
AIN_IREF input resistance to 2.5V RAIN  
(=5VOUT/2)  
Measured to GND  
(internalRsense=0)  
260  
330  
AIN_IREF input voltage range for VAIN  
linear current scaling  
Measured to GND  
(IscaleAnalog=1)  
0
0.5-2.4 V5VOUT/2  
V5VOUT/2  
V
V
AIN_IREF open input voltage  
level  
VAINO  
Open circuit voltage  
(internalRsense=0)  
AIN_IREF input resistance to  
RIREF  
Measured to GND  
0.5  
0.7  
1.0  
kΩ  
GND for reference current input  
(internalRsense=1)  
AIN_IREF current amplification  
for reference current to coil  
current at maximum setting  
Motor current full scale tolerance ICOIL  
-using RDSon measurement  
IREFAMPL  
IIREF = 0.25mA  
3000  
Times  
%
Internal_Rsense=1,  
vsense=0,  
-10  
+10  
(value for design guideline to  
calculate reproduction of certain  
motor current & torque)  
IIREF = 0.25mA (after  
reaching thermal  
balance)  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
73  
18.3 Thermal Characteristics  
The following table shall give an idea on the thermal resistance of the package. The thermal  
resistance for a four layer board will provide a good idea on a typical application. Actual thermal  
characteristics will depend on the PCB layout, PCB type and PCB size. The thermal resistance will  
benefit from thicker CU (inner) layers for spreading heat horizontally within the PCB. Also, air flow will  
reduce thermal resistance.  
A thermal resistance of 30K/W for a typical board means, that the package is capable of continuously  
dissipating 3.3W at an ambient temperature of 25°C with the die temperature staying below 125°C.  
Note, that a thermally optimized layout is required.  
Parameter  
Symbol Conditions  
Typ  
Unit  
Typical power dissipation  
PD  
stealthChop or spreadCycle, 1A RMS in  
2.5  
W
two phase motor, sinewave, 40 or  
20kHz chopper, 24V, 110°C peak  
surface of package (motor QSH4218-  
035-10-027)  
Typical power dissipation  
PD  
stealthChop or spreadCycle, 0.7A RMS  
in two phase motor, sinewave, 40 or  
20kHz chopper, 24V, 68°C peak surface  
of package (motor QSH4218-035-10-  
027)  
1.36  
W
Thermal resistance junction to  
ambient on a multilayer board  
RTMJA  
Dual signal and two internal power  
plane board (2s2p) as defined in  
JEDEC EIA JESD51-5 and JESD51-7  
(FR4, 35µm CU, 70mm x 133mm,  
d=1.5mm)  
K/W  
K/W  
QFN28  
30  
24  
TQFP48-EP  
Thermal resistance junction to  
case  
RTJC  
Junction to heat slug of package  
6
Table 18.1 Thermal characteristics TMC22xx  
Note  
A spread-sheet for calculating TMC22xx power dissipation is available on www.trinamic.com.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
74  
19 Layout Considerations  
19.1 Exposed Die Pad  
The TMC22xx uses its die attach pad to dissipate heat from the drivers and the linear regulator to the  
board. For best electrical and thermal performance, use a reasonable amount of solid, thermally  
conducting vias between the die attach pad and the ground plane. The printed circuit board should  
have a solid ground plane spreading heat into the board and providing for a stable GND reference.  
19.2 Wiring GND  
All signals of the TMC22xx are referenced to their respective GND. Directly connect all GND pins under  
the device to a common ground area (GND and die attach pad). The GND plane right below the die  
attach pad should be treated as a virtual star point. For thermal reasons, the PCB top layer shall be  
connected to a large PCB GND plane spreading heat within the PCB.  
Attention  
Especially the sense resistors are susceptible to GND differences and GND ripple voltage, as the  
microstep current steps make up for voltages down to 0.5mV. No current other than the sense  
resistor current should flow on their connections to GND and to the TMC22xx. Optimally place them  
close to the IC, with one or more vias to the GND plane for each sense resistor. The two sense  
resistors for one coil should not share a common ground connection trace or vias, as also PCB traces  
have a certain resistance.  
19.3 Supply Filtering  
The 5VOUT output voltage ceramic filtering capacitor (2.2 to 4.7µF recommended) should be placed as  
close as possible to the 5VOUT pin, with its GND return going directly to the die pad or the nearest  
GND pin. This ground connection shall not be shared with other loads or additional vias to the GND  
plane. Use as short and as thick connections as possible.  
The motor supply pins VS should be decoupled with an electrolytic capacitor (47μF or larger is  
recommended) and a ceramic capacitor, placed close to the device.  
Take into account that the switching motor coil outputs have a high dV/dt. Thus capacitive stray into  
high resistive signals can occur, if the motor traces are near other traces over longer distances.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
75  
19.4 Layout Example TMC2208  
Schematic  
Placement (Excerpt)  
Top Layout (Excerpt, showing die pad vias)  
The complete schematics and layout data for all TMC22xx evaluation boards are available on the  
TRINAMIC website.  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
76  
20 Package Mechanical Data  
20.1 Dimensional Drawings QFN28  
Attention: Drawings not to scale.  
Figure 20.1 Dimensional drawings QFN28  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
77  
Parameter  
[mm] Ref  
Min  
0.8  
Nom  
Max  
0.9  
0.05  
total thickness  
stand off  
mold thickness  
lead frame thickness  
body size X  
A
A1  
A2  
A3  
D
0.85  
0.035  
0.65  
0.203  
5.0  
0
body size Y  
E
5.0  
lead pitch  
e
0.5  
exposed die pad size X  
exposed die pad size Y  
lead length  
package edge tolerance  
mold flatness  
coplanarity  
lead offset  
exposed pad offset  
J
K
L
aaa  
bbb  
ccc  
ddd  
eee  
3
3
0.5  
3.1  
3.1  
0.55  
3.2  
3.2  
0.6  
0.1  
0.1  
0.08  
0.1  
0.1  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
78  
20.2 Dimensional Drawings QFN32-WA  
Figure 20.2 Dimensional drawings QFN32-WA  
www.trinamic.com  
 
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
79  
Parameter  
[mm] Ref  
Min  
0.8  
Nom  
Max  
0.9  
0.05  
total thickness  
stand off  
mold thickness  
lead frame thickness  
lead width  
body size X  
A
A1  
A2  
A3  
b
D
0.85  
0.035  
0.65  
0.203  
0.25  
5.0  
0
0.2  
0.3  
body size Y  
E
5.0  
lead pitch  
e
0.5  
exposed die pad size X  
exposed die pad size Y  
lead length  
J
K
L
L1  
aaa  
bbb  
ccc  
ddd  
eee  
R
3.3  
3.3  
0.45  
0.4  
3.4  
3.4  
0.5  
0.5  
0.1  
0.1  
0.08  
0.1  
0.1  
3.5  
3.5  
0.55  
0.55  
lead length  
package edge tolerance  
mold flatness  
coplanarity  
lead offset  
exposed pad offset  
half-cut width  
half-cut depth  
0.075  
S
0.075  
20.3 Package Codes  
Type  
Package  
Temperature range  
-40°C ... +125°C  
-40°C ... +125°C  
-40°C ... +125°C  
Code & marking  
TMC2208-LA  
TMC2208-LA  
TMC2224-LA  
TMC2202-WA  
QFN28 (RoHS)  
QFN28 (RoHS)  
QFN32 (RoHS)  
TMC2224-LA  
TMC2202-WA  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
80  
21 Table of Figures  
FIGURE 1.1 TMC22XX BASIC APPLICATION BLOCK DIAGRAM......................................................................................................4  
FIGURE 1.2 STAND-ALONE DRIVER WITH PRE-CONFIGURATION....................................................................................................5  
FIGURE 1.3 AUTOMATIC MOTOR CURRENT POWER DOWN..........................................................................................................7  
FIGURE 2.1 TMC2208 PINNING TOP VIEW TYPE: QFN28, 5X5MM², 0.5MM PITCH ...............................................................8  
FIGURE 2.2 TMC2202 PINNING TOP VIEW TYPE: QFN32, 5X5MM², 0.5MM PITCH ...............................................................9  
FIGURE 2.3 TMC2224 PINNING TOP VIEW TYPE: QFN28, 5X5MM², 0.5MM PITCH .............................................................10  
FIGURE 2.4 TMC2225 PINNING TOP VIEW TYPE: HTSSOP28, 9.7X6.4MM² OVER PINS, 0.65MM PITCH.............................12  
FIGURE 2.5 TMC2220 PINNING TOP VIEW TYPE: TQFP-EP 48, 9X9MM² OVER PINS, 0.5MM PITCH ...................................13  
FIGURE 3.1 STANDARD APPLICATION CIRCUIT...........................................................................................................................15  
FIGURE 3.2 APPLICATION CIRCUIT USING RDSON BASED SENSING...........................................................................................16  
FIGURE 3.3 5V ONLY OPERATION..............................................................................................................................................16  
FIGURE 3.4 SIMPLE ESD ENHANCEMENT AND MORE ELABORATE MOTOR OUTPUT PROTECTION..................................................18  
FIGURE 4.1 ATTACHING THE TMC22XX TO A MICROCONTROLLER UART...................................................................................21  
FIGURE 4.2 ADDRESSING MULTIPLE TMC22XX VIA SINGLE WIRE INTERFACE USING ANALOG SWITCHES...................................22  
FIGURE 6.1 MOTOR COIL SINE WAVE CURRENT WITH STEALTHCHOP (MEASURED WITH CURRENT PROBE)..................................37  
FIGURE 6.2 STEALTHCHOP2 AUTOMATIC TUNING PROCEDURE....................................................................................................38  
FIGURE 6.3 SCOPE SHOT: GOOD SETTING FOR PWM_REG.......................................................................................................40  
FIGURE 6.4 SCOPE SHOT: TOO SMALL SETTING FOR PWM_REG DURING AT#2.......................................................................40  
FIGURE 6.5 SUCCESSFULLY DETERMINED PWM_GRAD(_AUTO) AND PWM_OFS(_AUTO)...................................................40  
FIGURE 6.6 VELOCITY BASED PWM SCALING (PWM_AUTOSCALE=0).........................................................................................42  
FIGURE 6.7 TPWMTHRS FOR OPTIONAL SWITCHING TO SPREADCYCLE...................................................................................43  
FIGURE 7.1 CHOPPER PHASES ...................................................................................................................................................47  
FIGURE 7.2 NO LEDGES IN CURRENT WAVE WITH SUFFICIENT HYSTERESIS (MAGENTA: CURRENT A, YELLOW & BLUE: SENSE  
RESISTOR VOLTAGES A AND B).........................................................................................................................................49  
FIGURE 7.3 SPREADCYCLE CHOPPER SCHEME SHOWING COIL CURRENT DURING A CHOPPER CYCLE ............................................50  
FIGURE 9.1 SCALING THE MOTOR CURRENT USING THE ANALOG INPUT......................................................................................54  
FIGURE 11.1 STEP AND DIR TIMING, INPUT PIN FILTER .........................................................................................................57  
FIGURE 11.2 MICROPLYER MICROSTEP INTERPOLATION WITH RISING STEP FREQUENCY (EXAMPLE: 16 TO 256)......................59  
FIGURE 11.3 INDEX SIGNAL AT POSITIVE ZERO TRANSITION OF THE COIL A SINE CURVE..........................................................60  
FIGURE 12.1 SOFTWARE GENERATED MOTION PROFILE .............................................................................................................61  
FIGURE 13.1 DIAG AND INDEX OUTPUTS...............................................................................................................................63  
FIGURE 14.1 CURRENT SETTING AND FIRST STEPS WITH STEALTHCHOP....................................................................................64  
FIGURE 14.2 TUNING STEALTHCHOP AND SPREADCYCLE...........................................................................................................65  
FIGURE 14.3 OTP PROGRAMMING ............................................................................................................................................66  
FIGURE 20.1 DIMENSIONAL DRAWINGS QFN28.......................................................................................................................76  
FIGURE 20.2 DIMENSIONAL DRAWINGS QFN32-WA...............................................................................................................78  
www.trinamic.com  
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16)  
81  
22 Revision History  
Version  
Date  
Author  
BD= Bernhard Dwersteg  
Description  
V0.25  
V0.28  
2016-09-02  
2016-09-21  
BD  
First complete datasheet  
Some detail wording, request for option packages, added CRC  
procedure  
BD  
BD  
V1.00  
2016-11-01  
Adapted min/max DC and Timing Characteristics (IS, VCP_UV,  
VUV_VS, 25°C for clock calibration frequency) to fit test limits  
Corrected wording in DRV_STATUS  
Added QFN-32  
V1.01  
V1.02  
2016-11-16  
2017-05-16  
BD  
BD  
Table 22.1 Document Revisions  
23 References  
[TMC22xx-EVAL] TMC22xx Evaluation board: Manuals, software and PCB data available on  
www.trinamic.com  
Trinamic Application Note 001 - Parameterization of spreadCycle™,  
[AN001]  
www.trinamic.com  
Calculation sheet TMC22xx_Calculations.xlsx www.trinamic.com  
www.trinamic.com  

相关型号:

TMC2208-LA

POWER DRIVER FOR STEPPER MOTORS
TRINAMIC

TMC22090R0C

CRT Character Display Controller, CMOS, PQCC84,
RAYTHEON

TMC22091

Digital Video Encoders/Layering Engine
FAIRCHILD

TMC22091

Digital Video Encoders/Layering Engine
CADEKA

TMC22091KHC

Digital Video Encoders/Layering Engine
FAIRCHILD

TMC22091KHC

Digital Video Encoders/Layering Engine
CADEKA

TMC22091R0C

Digital Video Encoders/Layering Engine
FAIRCHILD

TMC22091R0C

Digital Video Encoders/Layering Engine
CADEKA

TMC2210G8C

Multiplier Accumulator/Summer, CMOS, CPGA68,
RAYTHEON

TMC2210G8C1

Multiplier Accumulator/Summer, CMOS, CPGA68,
RAYTHEON

TMC2210G8C65

Multiplier Accumulator/Summer, 16-Bit, CMOS, CPGA68,
RAYTHEON

TMC2210G8C65

Multiplier Accumulator/Summer, CMOS, CPGA68
FAIRCHILD