TMC389 Data Sheet

TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
1
TMC389–DATASHEET
Energy saving high resolution microstepping
three phase stepper driver with step and
direction interface and external power stage
®
TRINAMIC Motion Control GmbH & Co. KG
Hamburg, GERMANY
www.trinamic.com
1 Features
The TMC389 is an energy efficient three phase stepper motor driver for high resolution microstepping
applications. It integrates a low resonance three phase chopper for quiet motor operation. Its step and
direction interface allows simple use. An SPI™ management interface allows for parameterization and
diagnostics. The TMC389 directly drives 3 external N/P channel dual MOSFETs for motor currents up
to 8A and up to 60V. Protection and diagnostic features further reduce system cost and increase
reliability.
Highlights
 Up to 171 microsteps (256 sine wave steps) using step/direction interface or 20 Bit SPI™ interface
 High precision sensorless motor load measurement stallGuard2
 Energy efficiency and coolness by automatic load dependant motor current regulation coolStep™:
Save up to 75% of energy!
 Internal microstep extrapolation allows 256 wave step smoothness with low frequency step input
 Dual edge step option allows half step frequency requirement, e.g. for opto-couplers
 Up to 8A Motor current using external N&P channel MOSFET pairs
 Synchronous rectification reduces transistor heating
 9V to 60V operating voltage (peak)
 3.3V or 5V interface
 QFN32 package for extremely small solution with superior thermal performance
 EMV optimized current controlled gate drivers – up to 45mA gate current
 Overcurrent, short to GND and overtemperature protection and diagnostics integrated
Applications
 Precision three phase stepper motor drives
 Stage lighting
 Medical applications
 Optical applications
 Robotics
Motor type
 3 phase Stepper
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
2
2 Table of contents
1
FEATURES .......................................................................................................................................... 1
2
TABLE OF CONTENTS ........................................................................................................................ 2
2.1
3
DISCLAIMER ................................................................................................................................... 3
PRINCIPLE OF OPERATION ............................................................................................................... 4
3.1
MOVING THE MOTOR ........................................................................................................................ 4
3.1.1
Step and direction control .................................................................................................. 4
3.1.2
SPI control .......................................................................................................................... 4
3.2
CHOPPED MOTOR COIL DRIVER............................................................................................................ 4
3.3
ENERGY EFFICIENT DRIVER WITH LOAD FEEDBACK.................................................................................... 4
4
PINNING ........................................................................................................................................... 5
4.1
TMC389-LA .................................................................................................................................. 5
4.2
PACKAGE CODES ............................................................................................................................. 5
4.3
DIMENSIONAL DRAWINGS ................................................................................................................. 6
4.3.1
QFN32 dimensions .............................................................................................................. 6
5
BLOCK DIAGRAM .............................................................................................................................. 8
5.1
6
PIN DESCRIPTION OF TMC389-LA ...................................................................................................... 9
SPI™ MODE SHIFT REGISTER ........................................................................................................ 10
6.1
OVERVIEW (WRITE)........................................................................................................................ 10
6.2
OVERVIEW (READ) ......................................................................................................................... 10
6.3
DRIVER CONTROL REGISTER BIT ASSIGNMENT ....................................................................................... 11
6.3.1
Driver control register bit assignment in SPI mode ......................................................... 11
6.3.2
Driver control register bit assignment in StepDir mode .................................................. 12
6.4
CONFIGURATION REGISTER BIT ASSIGNMENT ........................................................................................ 13
6.5
BIT ASSIGNMENT FOR READ ............................................................................................................. 16
6.6
SPI™ TIMING.............................................................................................................................. 17
7
STEP AND DIRECTION INTERFACE ................................................................................................. 18
7.1
7.2
7.3
7.4
8
TIMING ....................................................................................................................................... 18
INTERNAL MICROSTEP TABLE ............................................................................................................ 18
SWITCHING BETWEEN DIFFERENT MICROSTEP RESOLUTIONS ..................................................................... 19
STEP RATE MULTIPLIER AND STAND STILL DETECTION ............................................................................. 19
CURRENT SETTING .......................................................................................................................... 21
8.1
9
CONSIDERATIONS ON THE CURRENT SENSE RESISTORS AND LAYOUT ........................................................... 21
CHOPPER OPERATION OF THE MOTOR COILS ................................................................................ 23
9.1
10
10.1
10.2
10.3
10.4
11
11.1
11.2
11.3
11.4
SPREADCYCLE CHOPPER ................................................................................................................... 24
MOSFET DRIVER STAGE .............................................................................................................. 26
PRINCIPLE OF OPERATION ............................................................................................................ 26
BREAK-BEFORE-MAKE LOGIC.......................................................................................................... 26
ENN INPUT .............................................................................................................................. 26
SLOPE CONTROL IN TMC389 ....................................................................................................... 27
DIAGNOSTICS AND PROTECTION ............................................................................................... 28
SHORT TO GND DETECTION ......................................................................................................... 28
OPEN LOAD DETECTION ............................................................................................................... 28
TEMPERATURE MEASUREMENT ........................................................................................................ 29
UNDERVOLTAGE DETECTION .......................................................................................................... 30
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
12
STALLGUARD2™ SENSORLESS LOAD MEASUREMENT ................................................................. 31
12.1
12.1.1
12.1.2
12.2
12.3
12.4
13
3
TUNING THE STALLGUARD2™ THRESHOLD SGT ................................................................................ 31
Variable velocity operation............................................................................................... 31
Accuracy and reproducibility of stallGuard2™ measurement ........................................... 32
STALLGUARD2™ MEASUREMENT FREQUENCY AND FILTERING ................................................................ 32
DETECTING A MOTOR STALL.......................................................................................................... 32
LIMITS OF STALLGUARD2™ OPERATION .......................................................................................... 33
COOLSTEP™ SMART ENERGY OPERATION .................................................................................. 34
13.1
COOLSTEP™ SMART ENERGY CURRENT REGULATOR ............................................................................. 34
13.1.1
Adaptation to the load situation ..................................................................................... 34
13.1.2
Low velocity and standby operation ................................................................................ 34
13.2
USER BENEFITS, SAVE ENERGY, REDUCE POWER AND COOLING INFRASTRUCTURE ........................................ 36
14
POWER SUPPLY SEQUENCING..................................................................................................... 37
15
CLOCK OSCILLATOR AND CLOCK INPUT ..................................................................................... 38
15.1
CONSIDERATIONS ON THE FREQUENCY ............................................................................................ 38
16
ABSOLUTE MAXIMUM RATINGS .................................................................................................. 39
17
ELECTRICAL CHARACTERISTICS .................................................................................................. 39
17.1
17.2
17.3
17.4
OPERATIONAL RANGE ................................................................................................................. 39
DC CHARACTERISTICS AND TIMING CHARACTERISTICS ........................................................................ 40
ESD SENSITIVE DEVICE ............................................................................................................... 44
MOSFET EXAMPLES ................................................................................................................... 45
18
USING AN EXTERNAL POWER STAGE FOR HIGHER VOLTAGE OR CURRENT............................... 46
19
GETTING STARTED ...................................................................................................................... 47
19.1
19.2
INITIALIZATION OF THE DRIVER ..................................................................................................... 47
SENDING SPI DATA FROM A CPU ................................................................................................. 47
20
TABLE OF FIGURES ...................................................................................................................... 48
21
REVISION HISTORY .................................................................................................................... 48
21.1
2.1
DOCUMENTATION REVISION ......................................................................................................... 48
Disclaimer
TRINAMIC Motion Control GmbH & Co. KG does not authorize or warrant any of its products for use in life support systems, without the specific
written consent of TRINAMIC Motion Control GmbH & Co. KG. Life support systems are equipment intended to support or sustain life, and whose
failure to perform, when properly used in accordance with instructions provided, can be reasonably expected to result in personal injury or death.
Information given in this data sheet is believed to be accurate and reliable. However no responsibility is assumed for the consequences of its use
nor for any infringement of patents or other rights of third parties which may result from its use.
Specifications are subject to change without notice.
™: All trademarks used are property of their respective owners.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
4
3 Principle of operation
+VM
VHS
CLK
TMC389 / three phase
stepper driver IC
clock oscillator
15MHz
P-Gate
VM-10V
regulator
clock select
HS
spreadCycle
sine table
4*256 entry
DRIVER SECTION
x
Three phase
chopper logic
fast break
before
make
logic
HS
N
S
BM
gate off detection
3phase
stepper
LS-drive
temperature
measurement /
protection
+VM
1 of 3 shown
HS-drive
ENABLE
SPI configuration and diagnostic
interface / SPI drive interface
(20 Bit)
PHA, A0-7, PHB, B0-7
5VOUT
LS
short to
GND
detection
STEP
CSN
SCK
SDI
SDO
PFET power MOS
5V
linear
regulator
470n
step multiplier
step & direction
input
VS
clk
slope
control
DIR
220n
LS
SR
coolStep™
RS
Smart energy current
scaling
current
comparator
stallGuard2™
sensorless stall
detection
VCC_IO
DAC
NFET power MOS
MOSFET bridges are integrated into
IC package for TMC388
SG_TST
figure 1: Basic application block diagram
3.1
Moving the motor
3.1.1 Step and direction control
The TMC389 is a chopped stepper motor driver with integrated sequencer and SPI interface. It
provides two possibilities to control the motor: The motor can be controlled by applying pulses on the
step and direction interface, following an initialization phase which uses the SPI interface to
parameterize the driver for the application. Control and diagnostic registers give the flexibility to react
to changing operation conditions and to modify the behavior of the chip when it receives a step
impulse. An internal microstep table supplies sine and cosine values which control the motor current
for each step. Each step impulse advances the step pointer in the tables and hence leads to the IC
executing the next microstep.
3.1.2 SPI control
A second mode of operation uses the SPI interface, only. The motor coil currents can be controlled via
the SPI interface, while taking advantage of all other control and diagnostic functions. This mode is
more flexible, as the microstep waves can be specially adapted to the motor to give the best fit for
smoothest operation. It requires slightly more CPU overhead to look up the driver tables and to send
out new current values for both coils. The SPI update rate corresponds to the step rate at low
velocities. At highest velocities the update rate can be limited to a few 10kHz or some 100kHz,
depending on the processor power, or alternatively to an update rate corresponding to a fullstep.
3.2
Chopped motor coil driver
The driver use a cycle by cycle chopper mode: The motor current becomes regulated by comparing
the motor current to a set value for each chopper cycle. This constant off time chopper scheme allows
highest dynamic. The spreadCycle chopper scheme automatically integrates a fast decay cycle and
guarantees smooth zero crossing performance. In an optional operation mode, fast decay length per
cycle can be selected by the user. In this classic constant off time mode, zero crossing can be
optimized by setting a programmable current offset.
3.3
Energy efficient driver with load feedback
The TMC389 integrates a high resolution load measurement stallGuard2™, which allows sensing the
mechanical load on the motor. This gives more information on the drive allowing functions like
sensorless homing. Its coolStep™ feature uses load measurement information to reduce the motor
current to the minimum motor current required in the actual load situation. This saves lots of energy
and keeps components cool, making the drive an efficient and precise solution.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
5
4 Pinning
24
23
VS
22
TST_ANA
21
SG_TST
20
GNDP
25
6
19
VCC_IO
26
LW
7
18
DIR
27
-
17
STEP
28
BMW
SR
4
TMC 389-LA
5
14
15
16
CLK
SDI
13
ENN
SDO
12
CSN
11
GND
10
SCK
9
5VOUT
8
-
29
-
3
LV
30
-
BMV
LU
31
HW
HV
BMU
32
VHS
2
HU
1
GND
TMC389-LA
TST_MODE
4.1
Top view
figure 2: TMC389 pinning
4.2
Package codes
Type
Package
Temperature range
Code/marking
TMC389
QFN32 (ROHS)
-40°C ... +125°C
TMC389-LA
TMC389
eng.
sample
QFN32 (ROHS)
-40°C ... +125°C
TMC389-ES
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
4.3
6
Dimensional drawings
For drawings, see next page.
Attention: Drawings not to scale.
4.3.1
QFN32 dimensions
Parameter
Ref
Min
Nom
Max
total thickness
A
0.80
0.85
0.90
stand off
A1
0.00
0.035
0.05
mold thickness
A2
-
0.65
0.67
lead frame thickness
A3
lead width
b
body size X
D
5.0
body size Y
E
5.0
lead pitch
e
0.5
exposed die pad size X
J
3.2
3.3
3.4
exposed die pad size Y
K
3.2
3.3
3.4
lead length
L
0.35
0.4
0.45
package edge tolerance
aaa
0.1
mold flatness
bbb
0.1
coplanarity
ccc
0.08
lead offset
ddd
0.1
exposed pad offset
eee
0.1
0.203
0.2
0.25
0.3
All dimensions are in mm.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
figure 3: QFN32 5x5 dimensions
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
7
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
8
5 Block diagram
+VM 9-59V
220n
16V
VHS
+VCC
VCC_IO
3.3V or 5V
TMC389
D
VM-10V
linear
regulator
OSC
15MHz
100n
10-20MHz
STEP & DIR
(optional)
CLK
STEP
DIR
D
D
D
Clock
selector
CLK
5VOUT
5V supply
CSN
SCK
SDI
SDO
D
SIN
SIN120
SIN240
Digital
control
Phase polarities
M
U
X
D
D
HU
S
G
SPI interface
Break
before
make
G
S
P
G
D
P
D
BMW
Short to
GND
detectors
N
S
BMV
BMU
D
LU
DAC
LV
D
N
G
N-Gate
drivers
VREF
9
D
Chopper
logic
S
P
D
S
D
N
G
N
G
S
S
3phase
stepper
LW
D
coolStep
Energy
efficiency
SG_TST
HV
ENABLE
0.16V
0.30V
ENABLE
D
+VM
HW
P-Gate
drivers
VSENSE
TEST_SE
Provide sufficient filtering capacity
near bridge transistors (electrolyt
capacitors and ceramic capacitors)
slope HS VHS
Step &
Direction
interface
Sine wave
1024 entry
stallGuard
output
5V linear
regulator
470nF
Step multiply
16 to 256
SPI
100n
VS
D
slope LS +5V
stallGuard 3
BACK
EMF
Protection &
Diagnostics
SHORT
TO GND
SR
10R
optional input protection resistor
against inductive sparks upon
motor cable break
RSENSE
330m for
1A peak
Temperature
sensor
100°C, 150°C
DIE PAD
GND
TEST_ANA
figure 4: TMC389 block and application schematic
The application schematic shows the basic building blocks of the IC and the connections to the power
bridge transistors, as well as the power supply. The connection of the digital interface lines to the
microcontroller and / or a motion controller is specific to the system architecture and the microcontroller type. Do not leave any input floating over extended periods of time, as there are no pull up
or pull down resistors integrated. The choice of power MOSFETs for the TMC389 depends on the
desired motor current and supply voltage. Please refer chapter 17.4. For even higher motor current
capability, external MOSFET drivers can be added using full N channel bridges.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
5.1
9
Pin description of TMC389-LA
Pin
Number
GND
1, 13
HU
HV
HW
2,
3,
23
O (VS)
High side P-channel driver output. Becomes driven to VHS to switch
on MOSFET.
BMV
BMU
BMW
4
5
20
I (VS)
Sensing input for bridge outputs. Used for short to GND protection.
May be tied to VS if unused.
LU
LV
LW
6
7
19
O 5V
Low side MOSFET driver output. Becomes driven to 5VOUT to
switch on MOSFET.
SR
17
AI
Sense resistor input of chopper driver.
5VOUT
9
SDO
10
DO VIO Data output of SPI interface (Tristate)
SDI
11
DI VIO
Data input of SPI interface
(Scan test input in test mode)
SCK
12
DI VIO
Serial clock input of SPI interface
(Scan test shift enable input in test mode)
CSN
14
DI VIO
Chip select input of SPI interface
ENN
15
DI VIO
Enable not input for drivers. Switches off all MOSFETs.
CLK
16
DI VIO
Clock input for all internal operations. Tie low to use internal
oscillator. A high signal disables the internal oscillator until power
down.
VHS
24
High side supply voltage (motor supply voltage - 10V)
VS
25
Motor supply voltage
TST_ANA
26
AO VIO Analog mode test output. Leave open or tie to GND for normal
operation.
SG_TST
27
DO VIO stallGuard2™ output. Signals motor stall (high active).
GNDP
28
Power GND for MOSFET drivers. Connect directly to GND
VCC_IO
29
Input / output supply voltage VIO for all digital pins. Tie to digital
logic supply voltage. Allows operation in 3.3V and 5V systems.
DIR
30
DI VIO
Direction input. Is sampled upon detection of a step to determine
stepping direction. An internal glitch filter for 60ns is provided.
STEP
31
DI VIO
Step input. An internal glitch filter for 60ns is provided.
TST_MODE 32
DI VIO
Test mode input. Puts IC into test mode. Tie to GND for normal
operation.
Exposed
die pad
GND
Connect the exposed die pad to a GND plane. It is used for cooling
of the IC and may either be left open or be connected to GND.
-
Type
Function
Digital and analog low power GND
Output of internal 5V linear regulator. This voltage is used to supply
the low side drivers and internal analog circuitry. An external
capacitor to GND close to the pin is required. Place the capacitor
near to pin 9 and pin 13. 470nF ceramic are sufficient for most
applications, an additional tantalum capacitor (10µF or more)
improves performance with high gate charge MOSFETs.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
10
6 SPI™ mode shift register
The TMC389 requires a configuration via SPI prior to operation. Its SPI interface also allows for
reading back status flags. The SPI interface can operate up to the half clock frequency. The MSB (bit
19) is transmitted first. See chapter 6.6 and 19.2 for more details.
6.1
Overview (write)
Register/
Bit
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
6.2
DRVCTRL
(SDOFF=1)
DRVCTRL
(SDOFF=0)
CHOPCONF
SMARTEN
SGCSCONF
DRVCONF
0
0
PHU
CU7
CU6
CU5
CU4
CU3
CU2
CU1
CU0
PHV
CV7
CV6
CV5
CV4
CV3
CV2
CV1
CV0
0
0
INTPOL
DEDGE
MRES3
MRES2
MRES1
MRES0
1
0
0
TBL1
TBL0
RNDTF
CSYNC
CDIR
NOSD
HYST5
HYST4
HYST3
HYST2
HYST1
HYST0
TOFF3
TOFF2
TOFF1
TOFF0
1
0
1
0
SEIMIN
SEDN1
SEDN0
SEMAX3
SEMAX2
SEMAX1
SEMAX0
SEUP1
SEUP0
SEMIN3
SEMIN2
SEMIN1
SEMIN0
1
1
0
SFILT
SSPD
SGT6
SGT5
SGT4
SGT3
SGT2
SGT1
SGT0
CS4
CS3
CS2
CS1
CS0
1
1
1
TST
SLPH1
SLPH0
SLPL1
SLPL0
DISS2G
TS2G1
TS2G0
SDOFF
VSENSE
RDSEL1
RDSEL0
-
Overview (read)
Bit
RDSEL=00
RDSEL=01
RDSEL=10
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
MSTEP9
MSTEP8
MSTEP7
MSTEP6
MSTEP5
MSTEP4
MSTEP3
MSTEP2
MSTEP1
MSTEP0
STST
OL
S2G
OTPW
OT
SG
SG9
SG8
SG7
SG6
SG5
SG4
SG3
SG2
SG1
SG0
-
SG9
SG8
SG7
SG6
SG5
SE4
SE3
SE2
SE1
SE0
-
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
6.3
11
Driver control register bit assignment
The driver control register is used to operate the device in SPI mode by setting phase currents for
Phase U and Phase V. Phase W is automatically calculated from the formula CW=-(CU+CV). In
StepDir mode, it selects Step and Direction interface specific parameters. They need to be initialized
once upon power up, and whenever basic parameters are required to be changed. Only write access
is possible.
Notation of hexadecimal and binary numbers:
0x precedes a hexadecimal number, % precedes a multi-bit binary number
The meaning of register 0 depends on the mode selection between SPI mode and StepDir mode as
selected by SDOFF (configuration register 11, bit 7).
6.3.1
Driver control register bit assignment in SPI mode
DRVCTRL
write 0xxx, SDOFF=1
Bit
Name
Function
Comment
19
CFR
0: Operation mode dependent settings (see SDOFF)
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PHU
CU7
CU6
CU5
CU4
CU3
CU2
CU1
CU0
PHV
CV7
CV6
CV5
CV4
CV3
CV2
CV1
CV0
select configuration
register
reserved
Polarity U
Current U MSB
Current U LSB
Polarity V
Current V MSB
set to 0
0 to max. 248 due to hysteresis setting. Depending on
the hysteresis setting, the maximum value becomes
even lower. The resulting value is not allowed to
overflow 255.
0 to max. 248 due to hysteresis setting. Depending on
the hysteresis setting, the maximum value becomes
even lower. The resulting value is not allowed to
overflow 255.
Current V LSB
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
6.3.2
12
Driver control register bit assignment in StepDir mode
DRVCTRL
write 0xxx, SDOFF=0
Bit
Name
Function
Comment
19
CFR
0: Operation mode dependent settings (see SDOFF)
18
17
16
15
14
13
12
11
10
9
INTPOL
select configuration
register
reserved
reserved
reserved
reserved
reserved
reserved
reserved
reserved
reserved
enable step
interpolation
8
DEDGE
7
6
5
4
3
2
1
0
MRES3
MRES2
MRES1
MRES0
enable double edge
step pulses
reserved
reserved
reserved
reserved
micro step resolution
for step/direction mode
set to 0
set to 0
set to 0
set to 0
set to 0
set to 0
set to 0
set to 0
set to 0
1: Enable step impulse multiplication by 16. Only in
resolution 16x microsteps, the microstepping becomes
extrapolated to 256 microsteps. Interpolation is possible
starting below step distance of max. 2^20 CLK periods.
1: Enable step impulse at each step edge to reduce
step frequency requirement
set to 0
set to 0
set to 0
set to 0
%0000 … %1000
MRES
%0000
%0001
%0010
%0011
%0100
%0101
%0110
%0111
%1000
electrical
256
128
64
32
16
8
4
2
1
mechanical
170.66
85.33
42.66
21.33
10.66
5.33
2.66
1.33
0.66
The electrical values given describe the number of
steps taken per electrical quarter sine wave. The
resulting mechanical microstep resolution which
describes the number of microsteps between two motor
fullsteps is 2/3 of the corresponding value. Please take
into account, that the microstep position when switching
to a lower resolution determines the sequence of
patterns.
step width=2^MRES [electrical microsteps]
step width=2/3*2^MRES [motor microsteps]
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
6.4
13
Configuration register bit assignment
The configuration registers select the mode of operation and set all motor and application dependent
parameters. They need to be initialized once upon power up, and whenever basic parameters are
required to be changed. Only write access is possible.
CHOPCONF
write 100x: Chopper Configuration
Bit
Name
Function
Comment
19
CFR
1: Configuration register
18
17
16
15
14
CFRSEL1
CFRSEL0
TBL1
TBL0
CHM
select configuration
register
select configuration
register
blank time select
13
RNDTF
random TOFF time
12
CSYNC
chopper
synchronization
11
CDIR
chopper direction
10
NOSD
skip slow decay phase
9
8
7
6
5
4
HYST5
HYST4
HYST3
HYST2
HYST1
HYST0
hysteresis value
3
2
1
0
TOFF3
TOFF2
TOFF1
TOFF0
off time
and driver enable
chopper mode
%00: Chopper configuration register
%00 … %11:
Set comparator blank time to 16, 24, 36 or 54 clocks
0
Standard mode
1
unused
0
Chopper off time is fixed as set by bits tOFF
1
Random mode, tOFF is random modulated by
dNCLK= -12 … +3 clocks.
0
Chopper runs freely
1
Chopper becomes synchronized to step
frequency
0
Chopper direction is WVU with DIR input=0
Choose for turn left in SPI operation
1
Chopper direction is UVW with DIR input=0
Choose for turn right (UVW) in SPI
operation and for StepDir operation
0
Each chopper on cycle is followed by a slow
decay phase as set by TOFF
1
Slow decay phases are skipped between the
chopper phases, except directly following a
short to GND or chopper synchronization.
Minimum blank time then is 36 clocks.
DAC hysteresis setting:
%000000 … %111111: 0 … 63
(1/512 of this setting adds to coil current setting)
Attention:
Effective HYST/2 must be ≤ 255-sinewave peak (248 at
max. current setting) – Reduce current setting to 28 for
maximum hysteresis.
Do not work with too small setting (poor performance).
Off time setting for constant tOFF chopper
NCLK= 12 + 32*TOFF (Minimum is 64 clocks)
%0000: Driver disable, all bridges off
%0001: not allowed
%0010 … %1111: 2 … 15
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
14
SMARTEN
write 1010: Smart energy control coolStep™
Bit
Name
Function
Comment
19
CFR
1: configuration register
18
17
16
15
CFRSEL1
CFRSEL0
SEIMIN
14
13
SEDN1
SEDN0
select configuration
register
select configuration
register
reserved
minimum current for
smart current control
current down step
speed
12
11
10
9
8
7
6
5
4
3
2
1
0
SEMAX3
SEMAX2
SEMAX1
SEMAX0
SEUP1
SEUP0
SEMIN3
SEMIN2
SEMIN1
SEMIN0
reserved
stallGuard hysteresis
value for smart current
control
reserved
current up step width
reserved
minimum stallGuard
value for smart current
control and
smart current enable
%01: coolStep configuration register
set to 0
0: 1/2 of current setting (CS)
1: 1/4 of current setting (CS)
%00: for each 32 stallGuard values decrease by one
%01: for each 8 stallGuard values decrease by one
%10: for each 2 stallGuard values decrease by one
%11: for each stallGuard value decrease by one
set to 0
If the stallGuard result is equal to or above
(SEMIN+SEMAX+1)*32, the motor current becomes
decreased to save energy.
%0000 … %1111: 0 … 15
set to 0
Current steps per measured stallGuard value
%00 … %11: 1, 2, 4, 8
set to 0
If the stallGuard result falls below SEMIN*32, the motor
current becomes increased to reduce motor load angle.
%0000: coolStep current control off
%0001 … %1111: 1 … 15
SGCSCONF
write 110x: Load measurement stallGuard2 and Current Setting
Bit
Name
Function
Comment
19
CFR
1: Configuration register
18
17
16
CFRSEL1
CFRSEL0
SFILT
select configuration
register
select configuration
register
stallGuard filter enable
15
SSPD
stallGuard speed
0
1
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
SGT6
SGT5
SGT4
SGT3
SGT2
SGT1
SGT0
CS4
CS3
CS2
CS1
CS0
stallGuard threshold
value
This signed value controls stallGuard level for stall
output and sets the optimum measurement range for
readout. A lower value gives a higher sensitivity. Zero is
the starting value working with most motors.
-64 to +63: A higher value makes stallGuard less
sensitive and requires more torque to
indicate a stall.
reserved
reserved
reserved
current scale
(scales digital currents
A and B)
set to 0
set to 0
set to 0
Current scaling for SPI and step/direction operation
%00000 … %11111: 1/32, 2/32, 3/32, … 32/32
Attention: Maximum possible current scale setting might
be below 31, depending on hysteresis setting.
%10: stallGuard and current configuration register
0
1
Standard mode, high time resolution for stallGuard
Filtered mode, stallGuard signal updated for each
six fullsteps only to compensate for motor
tolerances
Standard mode, high time resolution for stallGuard
StallGuard uses more filtering, use for low motor
velocity only
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
DRVCONF
write 111x: Driver Configuration
Bit
Name
Function
Comment
19
CFR
1: Configuration register
18
17
16
CFRSEL1
CFRSEL0
TST
select configuration
register
select configuration
register
reserved TEST mode
15
14
SLPH1
SLPH0
Slope control high side
13
12
11
10
SLPL1
SLPL0
DISS2G
Slope control low side
9
8
TS2G1
TS2G0
reserved
short to GND protection
disable
short to GND detection
timer
7
SDOFF
Step Direction input off
6
VSENSE
sense resistor voltage
based current scaling
5
4
RDSEL1
RDSEL0
Select value for read
out (RD bits)
3
2
1
0
-
reserved
reserved
reserved
reserved
15
%11: Driver configuration register
Set to 0. When 1, SG_TST outputs digital test values,
and TEST_ANA outputs analog test values. Selection is
done by SGT0 and SGT1 (%00 … %10):
For TEST_ANA: anatest_2vth, anatest_dac_out,
anatest_vdd_half.
For SG_TST:
comp_A, comp_B, CLK
%00: min, %01: min + tc, %10: med + tc, %11: max
In temperature compensated mode (tc), the driver
strength is increased if the overtemperature prewarning
temperature is reached. This compensates for
temperature dependence of high side slope control.
00, 01: min, 10: med, 11: max
set to 0
0: Short to GND protection is on
1: Short to GND protection is disabled
%00: 3.2µs
%01: 1.6µs
%10: 1.2µs
%11: 0.8µs
0: Enable step/direction mode (StepDir)
1: Enable SPI mode
0: Full scale sense resistor voltage is 305mV
1: Full scale sense resistor voltage is 165mV
(refers to a current setting of 31 and DAC value 255)
%00 Microstep position read back
%01 stallGuard level read back
%10 stallGuard and smart current level read back
%11 Reserved, do not use
set to 0
set to 0
set to 0
set to 0
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
6.5
16
Bit assignment for read
Information can be read back from the driver on each access. Different information may be required,
depending on the application. This is selected by the bits RDSEL in the register DRVCONF.
DRVSTATUS
read status information – Partially selected by RDSEL in DRVCONF
Bit
Name
Function
Comment
19
18
17
16
15
14
13
12
11
10
9
8
7
RD9
RD8
RD7
RD6
RD5
RD4
RD3
RD2
RD1
RD0
0
0
STST
microstep position in
internal sine table for
phase U
or
stallGuard bits 7 to 0
or
stallGuard bits 7 to 5
and current control scale
RDSEL=%00
reserved
reserved
stand still step indicator
6
5
0
OL
reserved
open load indicator
4
3
0
S2G
reserved
short to GND detection
bits on high side
transistors
2
OTPW
1
0
OT
SG
Overtemperature prewarning
Overtemperature
stallGuard status
1: Indicates, that no step impulse occurred on the step
input during the last 2^20 clock cycles.
Flag becomes set, if no chopper event has happened
during the last period with constant coil polarity. Only a
current above 1/16 of maximum setting can reset this
flag!
1: Short condition is detected, driver is currently shut
down (clear short condition by disabling driver)
In a short circuit condition, the chopper cycle becomes
terminated. The short counter is increased by each short
circuit. It becomes decreased by one for each phase
polarity change. The driver becomes shut down when
the counter reaches 3, until the short condition becomes
reset by disabling and re-enabling the driver.
1: Warning threshold is exceeded
RDSEL=%01
RDSEL=%10
Actual microstep position in sine table
for phase U in step/direction operation
(MSTEP) (MSTEP9=PHA)
Bits 9 … 0 of stallGuard result (SG)
Bits 9 … 5 of stallGuard result (SG)
and actual current control scaling
Bits 4 … 0
for monitoring smart energy current
setting (SE)
1: Driver is shut down due to overtemperature
1: stallGuard threshold is reached, SG output high
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
6.6
17
SPI™ timing
The SPI interface uses the system clock to synchronize all input and output signals. This limits the SPI
clock frequency to at maximum half of the system clock frequency. For an asynchronous system using
the internal clock, some 10 percent of safety margin should be used, assuming the minimum internal
and maximum SPI master clock frequency, in order to ensure a reliable data transmission.
All SPI inputs as well as the ENN input are internally filtered to avoid triggering on short time glitches.
The minimum number of SCK clock pulses to be sent is 20. Additional clocks are possible – the
additional bits shifted in on SDI become shifted through to the SDO pin delayed by 20 clocks via the
internal shift register. The active CSN time (low) must span the whole data transmission. Upon CSN
going inactive (high), the shift register content becomes latched into the internal control register.
CSN
tCC
tCL
tCH
tCC
tCH
SCK
tDU
SDI
bit19
tDH
bit18
bit0
tDO
SDO
tZC
bit19
bit18
bit0
figure 5: SPI timing
SPI interface timing
Parameter
AC-Characteristics
clock period is tCLK
Symbol
SCK valid before or after change
of CSN
tCC
CSN high time
tCSH
SCK low time
Conditions
Min
Typ
Max
10
Unit
ns
*)
>2tCLK
+10
ns
*)
>tCLK+10
ns
*)
>tCLK+10
ns
*) Min time is for synchronous CLK with SCK
high one tCH before CSN
high only
tCLK
tCL
*) Min time is for synchronous CLK only
tCLK
SCK high time
tCH
*) Min time is for synchronous CLK only
tCLK
SCK frequency using internal
clock
fSCK
assumes minimum
OSC frequency
4
MHz
SCK frequency using external
16MHz clock
fSCK
assumes
synchronous CLK
8
MHz
SDI setup time before rising
edge of SCK
tDU
10
ns
SDI hold time after rising edge of
SCK
tDH
10
ns
Data out valid time after falling
SCK clock edge
tDO
no capacitive load
on SDO
SDI, SCK and CSN filter delay
time
tFILT
rising and falling
edge
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
12
20
tFILT+5
ns
30
ns
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
18
7 Step and direction interface
The step and direction interface allows easy movement of the motor and is a simple real time interface
for a motion controller. Its pulse rate multiplier allows smooth motor operation even with reduced pulse
bandwidth.
7.1
Timing
The step and direction interface pins are sampled synchronously with the clock signal. An internal
analog filter removes disturbances caused by glitches on the signals, e.g. caused by long PCB traces.
Despite this, the signals should be filtered and / or differentially transmitted, if the step source is far
from the TMC389 and especially if the step signals are interconnected via cables.
DIR
tSH
tDSU
tSL
tDSH
STEP
Active edge
(DEDGE=0)
Active edge
(DEDGE=0)
figure 6: STEP and DIR timing
STEP and DIR interface timing
Parameter
AC-Characteristics
clock period is tCLK
Symbol
Conditions
step frequency (at maximum
microstep resolution)
fSTEP
DEGDE=0
½ fCLK
DEDGE=1
¼ fCLK
(electrical) fullstep frequency
fFS
STEP input low time
tSL
max(tFILTSD,
tCLK+20)
ns
STEP input high time
tSH
max(tFILTSD,
tCLK+20)
ns
DIR to STEP setup time
tDSU
20
ns
DIR after STEP hold time
tDSH
20
ns
Typ
Max
Unit
fCLK/512
STEP and DIR spike filtering
time
tFILTSD
rising and falling
edge
STEP and DIR sampling relative
to rising CLK input
tSDCLKHI
before rising edge of
CLK input
7.2
Min
36
60
85
tFILTSD
Internal microstep table
The internal microstep table uses 1024 sine wave entries to generate the wave. Its amplitude is +/-248
rather than +/-255, leaving some headroom for hysteresis setting within an 8 bit amplitude range. The
step width depends on the microstep resolution setting. Depending on the DIR input, the microstep
counter is increased (DIR=0) or decreased (DIR=1) with each STEP pulse by the step width. Due to
the symmetry of the sine wave, only a quarter of the table needs to be stored. The phase V wave uses
a phase shift of 120°. The W wave is calculated as CW=-(CU+CV). Despite many entries in the last
quarter of the table being equal, the electrical angle continuously changes, because either sine wave
or cosine wave is in an area, where the current vector changes monotonously from position to
position.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
ns
ns
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
Entry
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0-31
1
2
4
5
7
8
10
11
13
14
16
17
19
21
22
24
25
27
28
30
31
33
34
36
37
39
40
42
43
45
46
48
32-63
49
51
52
54
55
57
58
60
61
62
64
65
67
68
70
71
73
74
76
77
79
80
81
83
84
86
87
89
90
91
93
94
64-95
96
97
98
100
101
103
104
105
107
108
109
111
112
114
115
116
118
119
120
122
123
124
126
127
128
129
131
132
133
135
136
137
96-127
138
140
141
142
143
145
146
147
148
150
151
152
153
154
156
157
158
159
160
161
163
164
165
166
167
168
169
170
172
173
174
175
19
128-159
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
201
202
203
204
205
206
160-191
207
207
208
209
210
211
212
212
213
214
215
215
216
217
218
218
219
220
220
221
222
223
223
224
225
225
226
226
227
228
228
229
192-223
229
230
231
231
232
232
233
233
234
234
235
235
236
236
237
237
238
238
238
239
239
240
240
240
241
241
241
242
242
242
243
243
224-255
243
244
244
244
244
245
245
245
245
246
246
246
246
246
247
247
247
247
247
247
247
247
248
248
248
248
248
248
248
248
248
248
figure 7: internal microstep table showing the first quarter of the sine wave
7.3
Switching between different microstep resolutions
In principle, the microstep resolution can be changed at any time. The microstep resolution determines
the increment respectively the decrement, the TMC389 uses for advancing in the microstep table. At
maximum resolution, it advances one step for each step pulse. At half resolution, it advances two
steps and so on. This way, a change of resolution is possible transparently at each time. However, you
may experience the motor behavior becoming direction dependant, when switching microstep
resolutions. This behavior results from table sampling points not evenly shifted inside the microstep
table with respect to the step width. To avoid this, always switch to a lower resolution, when the actual
microstep position is a multiple of the desired table step width. This is always satisfied at position zero
in the microstep table.
7.4
Step rate multiplier and stand still detection
The step rate multiplier can be enabled by setting the INTPOL bit. It supports a 16 microstep setting
and Step/Dir mode, only. In this setting, each step impulse at the input causes the execution of 16
times 1/256 microsteps. The step rate for the 16 microsteps is determined by measuring the time
interval of the previous step pulses and dividing it into 16 equal parts. This way, a smooth motor
movement like in 256 microstep resolution is achieved. The maximum time between two microsteps
corresponds to 2^20 i.e. roughly one million clock cycles, in order to reach evenly distributed 1/256
sine wave steps. At 16MHz clock frequency, this results in a minimum step input frequency of 16Hz for
step rate multiplier operation, i.e. one and a half motor fullsteps per second. A lower step rate causes
the stand still flag to become set as soon as the time is expired. Execution of microsteps will happen
with a frequency of 1/(2^16) clock frequency.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
20
Active edge
(DEDGE=0)
Active edge
(DEDGE=0)
Active edge
(DEDGE=0)
Active edge
(DEDGE=0)
Attention: The step rate multiplier will only give good results with a stable microstep frequency. Do
not use the DEDGE option, if the step input does not have a 50% duty cycle.
STEP
interpolated
microstep
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
motor
angle
2^20 tCLK
STANDSTILL
(STST) active
figure 8: Operation of the step multiplier in different situations
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
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
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
21
8 Current setting
The internal 5V supply voltage is used as a reference. To adapt the motor current, and to allow for
different values of sense resistors, the voltage divider for full scale can be chosen as VFS(HI) =1/16 VDD
or VFS(LO)=1/30 of VDD. With this, the peak sense resistor voltage at a digital DAC control level of 248
is roughly 0.16V or 0.31V.
Using the internal sine wave table, which has the amplitude of 248, the RMS motor coil current thus
can be calculated by:
√
The momentary motor current is calculated by:
CS is the current scale setting as set by the CS bits and smart current scaler.
VFS is the full scale voltage as determined by VSENSE control bit (please refer electrical
characteristics).
CURRENTA/B is the value set by the current setting in SPI mode, or, the actual value from the internal
sine wave table in Step/Dir mode.
Parameter
Description
Range
CS
Current scale. Scales both coil current values as
taken from the internal sine wave table or from the
SPI interface. For high precision motor operation,
work with a current scaling factor in the range 16
to 28 (31), because scaling down the current
values reduces the effective microstep resolution
by making microsteps coarser. This setting also
controls the maximum current value set by
coolStep™. Keep in mind, that a value above 28 is
only possible with reduced HYST setting:
CS=31 requires HYST < 16
CS=30 requires HYST < 32
CS=29 requires HYST < 48
Allows control of the sense resistor voltage range
or adaptation of one electronic module to different
maximum motor currents.
0 … 28 scaling factor:
(… 31) 1/32, 2/32, … 32/32
VSENSE
8.1
Comment
0
310mV
1
165mV
Considerations on the current sense resistors and layout
Sense resistors should be carefully selected. The full motor current flows through each sense resistor.
They also see the switching spikes from the MOSFET bridges. A low inductance type resistor is
required to prevent spikes causing ringing on the current measurement leading to instable
measurement results. A low inductivity, low resistance layout is essential. Also, any common GND
path of the sense resistors of different driver ICs needs to be prevented, because this would lead to
coupling between both current sense signals. A massive GND plane is best. Especially for high current
drivers or long motor cables, a spike damping with parallel capacitors can make sense (see figure 9).
As the TMC389 is susceptible to negative overvoltages on the sense resistor inputs, an additional
input protection resistor helps preventing damage in case of motor cable break or increased ringing on
the motor lines in case of long motor cables.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
22
MOSFET
bridge
optional input
protection resistors
SR
no common GND path
with other high current
loads
10R to 47R
optional filter
capacitors
TMC389
470nF
RSENSE
GND
Power
supply GND
figure 9: Sense resistor grounding and optional parts
The sense resistor needs to be able to conduct the peak motor coil current in motor stand still
situations, unless standby power is reduced. Under normal conditions, the sense resistor sees the coil
RMS current.
Peak sense resistor power dissipation:
(
)
For high current applications, power dissipation is halved by using the low VSENSE setting and using
an adapted resistance value. Please be aware, that in this case any voltage drop in PCB traces has a
larger influence on the result. A compact power stage layout with massive ground plane is best to
avoid parasitic effects.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
23
9 Chopper operation of the motor coils
The motor coils are operated using a chopper principle. The chopper regulates the current in the three
coils by switching each coil in one of three different states. In figure 10 the different phases of a
chopper cycle are shown for one coil, which is seen by each two half bridges. The figure assumes a
triangle connection of the coils, but, a star connection of the coils virtually shows the same behavior. In
the on-phase, the current is actively driven into the coils by connecting them to the power supply in the
direction of the target current. A fast decay phase reverses the polarity of the coil voltage to actively
reduce the current. The slow decay phase shorts the coil in order to let the current re-circulate. The
current can be regulated using only on phases and fast decay phases. An optional slow decay phase
can be inserted and might bring benefit for some low inductivity motors, by limiting the chopper
frequency to an upper value. The current comparator can measure coil current, when the current flows
through the sense resistor. Whenever the coil becomes switched, spikes at the sense resistors occur
due to charging and discharging parasitic capacities. During this time (typically one or two
microseconds), the current cannot be measured. It needs to be covered by the blank time setting.
+VM
+VM
+VM
ICOIL
ICOIL
ICOIL
RSENSE
on phase:
Current flows in direction
of target current
RSENSE
fast decay phase:
Current flows in opposite
direction of target current
RSENSE
slow decay phase:
Current re-circulation
figure 10: Chopper phases in motor operation
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
24
Parameter
Description
Range
Comment
TOFF
The off time setting controls the minimum chopper
frequency. For most applications an off time will
not be required. In this case, a dummy value
needs to be programmed to this register to enable
the driver and the NOSD flag shall be set.
Setting this parameter to zero completely disables
all driver transistors and the motor can free-wheel.
The hysteresis setting is the main control for the
chopper and determines the chopper frequency. A
higher setting introduces more current ripple and
thus reduces frequency. A too low setting will
result in the coil current only loosely following the
target current and thus reduced microstep
performance, especially in the current zero
crossing. A too high setting can cause audible
chopper noise.
Selects the comparator blank time. This time
needs to safely cover the switching event and the
duration of the ringing on the sense resistor. For
most low current drivers, a setting of 1 or 2 is
good. For high current applications with large
MOSFETs, a setting of 2 or 3 will be required.
0
chopper off
2…15
off time setting
NCLK=12+32*TOFF
0 … 63
Hysteresis for the chopper
0
16 tCLK
1
24 tCLK
2
36 tCLK
3
54 tCLK
Selection of the TOFF insertion
0
use TOFF setting for
additional SD phases
1
no slow decay phase
0
disable
1
random modulation enable
0
disable
1
synchronization enable
HYST
TBL
NOSD
RNDTF
CSYNC
CDIR
9.1
This bit switches on a random off time generator,
which slightly modulates the off time tOFF using a
random polynomial giving a spread spectrum
effect.
This bit switches on chopper synchronization. If
enabled, the chopper engine becomes reset with
each motor fullstep, in order to avoid a beat
occurring between full step sequence and chopper
clock.
The chopper direction should match the motor 0
direction, to allow highest motor velocities. In
Step/Dir mode, this is done automatically, when
CDIR is set to 1. In SPI mode, either the DIR input 1
or CDIR should be used, to adapt the chopper
direction. Both, DIR input and CDIR are XORed.
DIR=0: WVU
DIR=1: UVW
DIR=0: UVW
DIR=1: WVU
spreadCycle chopper
The spreadCycle chopper scheme (pat.fil.) is a precise and simple to use chopper principle, which
automatically determines the optimum fast decay portion for the motor. Anyhow, a number of settings
can be made in order to optimally fit the driver to the motor.
Each chopper cycle is comprised of an on phase, a fast decay phase and a slow decay phase (see
figure 11). Optional additional slow decay phases can be added (switch off using NOSD bit). The
hysteresis determines the chopper frequency by forcing the driver to introduce some amount of current
ripple into the motor coils. The motor inductivity determines the ability to follow a changing motor
current. The duration of the on- and fast decay phase needs to cover at least the blank time, because
the current comparator is disabled during this time. This is satisfied by choosing a positive value for
the hysteresis as can be estimated by the following calculation:
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
25
where fCHOP is the resulting chopper frequency. ICOIL is the peak motor coil current at the maximum
motor current setting CS, and RCOIL and LCOIL are motor coil inductivity and motor coil resistance.
The current hysteresis IHYST results from the HYST setting as follows:
The calculated chopper frequency should preferably lie between 18kHz and 60kHz. If a too high
chopper frequency results, you can try adding a slow decay phase.
Example:
For a 60mm stepper motor with 0.76mH, 0.32Ω phase and 5.8A RMS current at CS=28 and
HYST=40 operating from a 24V supply:
With this, the choice of a hysteresis setting of 40 results in a good chopper frequency, but a
higher hysteresis also will not harm.
The setting can also be determined 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. The correct setting can be determined best by rotating the motor slowly, and increasing
hysteresis setting, until the motion of the motor is very smooth (feel with fingers or add a long pointer
to the axis, e.g. laser pointer). Or, you can measure the motor currents with a current probe or with an
oscilloscope at the sense resistor, and check the waves for a pure sine wave. A further increment of
the hysteresis setting will lower chopper frequency and might at some point generate audible chopper
noise. For high inductivity motors, audible noise might occur at optimum setting. Increase supply
voltage, or choose a motor with a different, higher current winding.
I
target current + hysteresis
target current
target current - hysteresis
on
sd
fd
on
sd t
figure 11: spreadCycle (pat.fil.) chopper scheme showing the coil current within a chopper cycle
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
26
10 MOSFET driver stage
The TMC389 provides a three half bridge driver stage for N&P channel MOSFETs. The gate driver
current for the power MOSFETs can be adapted to match the MOSFETs and to influence the slew rate
at the coil outputs. Main features of the driver stage:
 5V gate drive voltage for low side N MOS driver, 8V for high side P MOS driver.
 The drivers protect the bridges actively against cross conduction via an internal Q GD protection
that holds MOSFETs safely off.
 Automatic brake-before-make logic minimizes dead time and diode conduction time.
 Integrated short to ground protection detects a short of the motor wires and protects the driver.
10.1 Principle of operation
The low side gate driver is supplied by the 5VOUT pin. The low side driver supplies 0V to the
MOSFET gate to close the MOSFET, and 5VOUT to open it. The high side gate driver voltage is
supplied by the VS and the VHS pin. VHS is more negative than VS and allows opening the VS
referenced high side MOSFET. The high side driver supplies VS to the P channel MOSFET gate to
close the MOSFET, and VHS to open it. The effective low side gate voltage is roughly 5V; the effective
high side gate voltage is roughly 8V.
Parameter
Description
SLPL
Low side slope control. Controls the MOSFET 0,1
gate driver current.
Set a value fitting the external MOSFET gate 1
charge and the desired slope.
2
min. setting
High side slope control. Controls the MOSFET 0…3
gate driver current.
Set to a value fitting the external MOSFET gate
charge and the desired slope.
min. setting…
max. setting
SLPH
Range
Comment
med. setting
max. setting
10.2 Break-before-make logic
Each half-bridge has to be protected against cross conduction during switching events. When
switching off the low-side MOSFET, its gate first needs to be discharged, before the high side
MOSFET is allowed to be switched on. The same goes when switching off the high-side MOSFET and
switching on the low-side MOSFET. The time for charging and discharging of the MOSFET gates
depends on the MOSFET gate charge and the driver current set by SLPL resp. SLPH. The BBM
(break-before-make) logic measures the gate voltage and automatically delays switching on of the
opposite bridge transistor, until its counterpart is discharged. This way, the bridge will always switch
with optimized timing independent of the MOSFETs used and independent of the slope setting.
10.3 ENN input
The motor driver outputs can be completely disabled by hardware, by pulling the ENN input high. This
way, the motor can free-wheel. The function however is identical to a software disable, which is
achieved by setting the register TOFF to zero. The hardware disable may be used in cases, where the
motor is to be hot plugged.
For normal operation tie ENN low.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
27
10.4 Slope control in TMC389
The TMC389 driver stage provides a constant current output stage slope control. This allows adapting
driver strength to the drive requirements of the power MOSFETs and adjusting the output slope by
providing for a controlled gate charge and discharge. A slower slope causes less electromagnetic
emission, but at the same time power dissipation of the power transistors rises. The duration of the
complete switching event depends on the total gate charge. The voltage transition of the output takes
place during the so called miller plateau (see figure 12). The miller plateau results from the gate to
drain capacity of the MOSFET charging / discharging during the switching. From the datasheet of the
transistor it can be seen, that the miller plateau typically covers only a part (e.g. one quarter) of the
complete charging event. The gate voltage level, where the miller plateau starts, depends on the gate
threshold voltage of the transistor and on the actual load current.
25
VS
4
20
3
15
2
10
1
5
0
0
2
4
6
8
VDS – Drain to source voltage (V)
VGS – Gate to source voltage (V)
MOSFET gate charge vs. switching event
5
0
10
QMILLER
QG – Total gate charge (nC)
figure 12: MOSFET gate charge as available in device data sheet vs. switching event (dotted line)
The slope time tSLOPE can be calculated as follows:
Whereas QMILLER is the charge the power transistor needs for the switching event, and I GATE is the
driver current setting of the TMC389.
Taking into account, that a slow switching event means high power dissipation during switching, and,
on the other side a fast switching event can cause EMV problems, the desired slope will be in some
ratio to the switching (chopper) frequency of the system. The chopper frequency is typically slightly
outside the audible range, i.e. 18kHz to 40kHz. The lower limit for the slope is dictated by the reverse
recovery time of the MOSFET internal diodes, unless additional Schottky diodes are used in parallel to
the MOSFETs source-drain diode. Thus, for most applications a switching time between 100ns and
750ns is chosen.
Example:
A circuit using the transistor from the diagram above is operated with a gate current setting of
15mA. The miller charge of the transistor is about 2.5nC.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
28
11 Diagnostics and protection
11.1 Short to GND detection
The short to GND detection prevents the high side power MOSFETs to be destroyed by accidentally
shorting the motor outputs to ground. It disables the driver, if a short condition persists, only. A
temporary event like an ESD event could look like a short, too. This becomes sorted out by the short
detection logic. In case of a short being detected, the bridge will be switched off instantaneously. The
chopper cycle on the affected coil becomes terminated and the short counter is increased by each
short circuit. It becomes decreased by one for each phase polarity change. The driver becomes shut
down when the counter reaches 3, until the short condition is reset by disabling the driver and reenabling it.
Status flag
Description
Range
S2G
This bit identifies a short to GND condition on B 0 / 1
persisting for multiple chopper cycles. The flag
becomes cleared when disabling the driver.
Comment
1: short condition detected
An overload condition of the high side MOSFET (“short to GND”) is detected by the TMC389, by
monitoring the BM voltage during high side on time. Under normal conditions, the high side power
MOSFET reaches the bridge supply voltage minus a small voltage drop during on time. If the bridge is
overloaded, the voltage cannot rise to the detection level within a limited time, defined by the internal
detection delay setting. Upon detection of an error, the bridge becomes switched off.
The short to GND detection delay needs to be adapted to the slope time, because it must cover the
slope, but should not be unnecessarily long.
Hxy
0V
VVS
VVS-
BMxy
Short
detection
0V
Driver
enabled
Driver off
0V
tS2G
Short to GND
monitor phase
Short to GND
detected
Valid area
VBMS2G
inactive
tS2G
delay
BM voltage
monitored
inactive
delay
Short detected
figure 13: Timing of the short to GND detector
Parameter
Description
Range
TS2G
This setting controls the short to GND detection 0…3
delay time. It needs to cover the switching slope
time. A higher setting reduces sensitivity to
capacitive loads.
Comment
0: maximum time…
3: minimum time
11.2 Open load detection
The open load detection detects, if a motor coil has an open condition, for example due to a loose
contact. When driving in fullstep mode (via SPI), the open load detection will also detect when the
motor current cannot be reached within each step, i.e. due to a too high motor velocity where the back
EMF voltage exceeds the supply voltage. The flag just has an informational character and an active
open load condition does not in all cases indicate that the motor is not working properly. The flag
becomes updated during normal operation of the motor whenever the polarity of the respective phase
toggles.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
29
Status flag
Description
OL
This bit indicates an open load condition. The flag 0 / 1
becomes set, if no chopper event has happened
during the last period with constant coil polarity.
It will flicker, if only one coil is detached during
motor operation. The flag is not updated with too
low actual coil current below 1/16 of maximum
setting.
Range
Comment
1: open load detected
11.3 Temperature measurement
The TMC389 integrates a two level temperature sensor (100°C prewarning and 150°C thermal
shutdown) for diagnostics and for protection of the driver stage. The temperature detector can detect
heat accumulation on the board, i.e. due to missing convection cooling. It cannot detect overheating of
the power transistors in all cases, because heat transfer between power transistors and driver chip
depends on the PCB layout and environmental conditions. Most critical situations, where the driver
MOSFETs could be overheated, are avoided when enabling the short to GND protection. For many
applications, the overtemperature prewarning will indicate an abnormal operation situation and can be
used to initiate user warning or power reduction measures. If continuous operation in hot environments
is necessary, a more precise processor based temperature measurement should be used to realize
application specific overtemperature detection. The thermal shutdown is just an emergency measure
and temperature rising to the shutdown level should be prevented by design.
The highside P-channel gate drivers within the TMC389 have a temperature dependency, which can
be compensated up to some extent by increasing driver current as soon as the warning temperature
threshold is reached. The TMC389 automatically corrects the temperature dependency at two settings,
marked as +tc in the SPI register documentation. In these settings, the driver current is increased by
one step when the temperature warning threshold is reached.
Status flag
Description
OTPW
Overtemperature pre-warning. This bit indicates 0 / 1
that the pre-warning level is reached. The
controller can react to this setting by reducing
power dissipation.
Overtemperature warning. This bit indicates that 0 / 1
the overtemperature threshold has been reached
and that the driver is switched off due to
overtemperature.
OT
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
Range
Comment
1: temperature prewarning
level reached
1: driver shut down due to
overtemperature
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
30
11.4 Undervoltage detection
The undervoltage detector monitors both, the internal logic supply voltage and the driver supply
voltage. It prevents operation of the chip at voltages, where a proper control of the MOSFET switches
cannot be guaranteed due to too low gate drive voltage.
In undervoltage conditions, the logic control block becomes reset and the driver is disabled. All
MOSFETs become switched off. The processor thus also should monitor the supply voltage to detect
an undervoltage condition. If the processor does not have an access to the voltage, the TMC389 can
directly be monitored via its SPI interface sending out only zero bits and not shifting through
information. A reset due to undervoltage or an actual undervoltage condition can be determined for
example by monitoring the current setting via its read back function. The current setting CS becomes
reset to zero, which can be seen when reading back the actual SE value.
VVS
VUV
ca. 100µs
ca. 100µs
Time
Device in reset: all
registers cleared to 0
Reset
figure 14 Undervoltage reset timing
Be sure to operate the IC significantly above the undervoltage threshold in order to assure reliable
operation! Check for SE read back at zero to detect an undervoltage event.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
31
12 stallGuard2™ sensorless load measurement
stallGuard2™ delivers a sensorless load measurement of the motor as well as a stall detection signal
available via the SG_TST output. The measured value changes linear with the load on the motor in a
wide range of load, velocity and current settings. At maximum motor load the stallGuard™ value goes
to zero. This corresponds to a load angle of 90° between the magnetic field of the stator and magnets
in the rotor. This also is the most energy efficient point of operation for the motor.
1000
900
stallGuard2
reading 800
Start value depends
on motor and
operating conditions
700
600
stallGuard value reaches zero
and indicates danger of stall.
This point is set by stallGuard
threshold value SGT.
500
400
Motor stalls above this point.
Load angle exceeds 90° and
available torque sinks.
300
200
100
0
10
20
30
40
50
60
70
80
90
100
motor load
(% max. torque)
figure 15: Principle function of stallGuard2
In order to use stallGuard2™ and coolStep™, the stallGuard2™ sensitivity should first be tuned using
the SGT setting.
12.1 Tuning the stallGuard2™ threshold SGT
The sensorless motor measurement depends on a number of motor specific parameters and operation
parameters. The easiest way to find a parameter set which fits to a specific motor type and operating
conditions is interactive tuning:
Operate the motor at a reasonable velocity (taking into account your application) and monitor the
stallGuard™ value (SG). Now, apply slowly increasing mechanical load to the motor. Now, try best
setting for SSPD and SFILT to have low noise on the signal, but high amplitude. If the motor stalls
before the stallGuard™ value reaches zero, decrease the stallGuard threshold value (SGT). A good
starting value is zero. You can apply negative values and positive values. If the SG value reaches zero
far before the motor stalls, increase the SGT value.
The optimum setting is reached, when the stallGuard2™ value reaches zero at increasing load shortly
before the motor stalls due to overload. However, this point can be shifted above 100% load, too. In
this case, activation of the stall output indicates, that a step has been lost. In order not to miss this
point, SFILT should to be turned off.
Please be aware, that the driver clock frequency influences the SG results. You should provide an
external stabilized clock for best performance. As the measurement has a high resolution, there are a
number of additional possibilities to enhance the absolute precision in order to give a good match to
the mechanical load on the motor. The optimum SGT value depends on a number of operating
parameters which can be compensated for, as shown in the next chapters.
12.1.1 Variable velocity operation
At varying velocities, SSPD and SFILT may be adapted to the actual velocity value in order to provide
the best results. Also an adaptation of the stallGuard2™ threshold value SGT can improve the
exactness of the load measurement and thus of coolStep™, which is based on the load measurement
value. At very low velocities, a reliable load measurement is not possible. At high velocities, where the
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
32
motor back EMF reaches the supply voltage, load angle increases and the measurement response is
lower. This can be seen in the example taken with a motor in an acceleration phase.
figure 16: Example SG result with a 60mm 3 phase motor without load accelerated from 0 to 375 RPM
12.1.2 Accuracy and reproducibility of stallGuard2™ measurement
Most of the stray in stallGuard2™ reading will result from motor production stray. Other factors which
can be compensated for are motor temperature, motor driver supply voltage and TMC389 clock
frequency. A stabilized driver supply voltage and an external clock source should be used in these
applications. The measurement error of stallGuard2™ – provided that all other parameters remain
stable – can be assumed as low as:
12.2 stallGuard2™ measurement frequency and filtering
The stallGuard2™ value becomes updated with each two fullsteps of the motor. This is enough to
safely detect a stall, as stalling of the motor always means the loss of six full steps. In a practical
application, especially when using coolStep™, a more precise measurement might be more important
than an update for each fullstep, taking into account that mechanical load never changes
instantaneously from one step to the next. Therefore, a filtering function is available: The SFILT bit
enables filtering of the motor load measurement over a number of 3 measurements. The filter should
always be enabled when a precise measurement is desired. It compensates for anisotropies in the
construction of the motor, e.g. due to misalignment of the magnet poles. Only if very fast response to
increasing load is required, the bit should be cleared.
12.3 Detecting a motor stall
In order to safely detect a motor stall a stall threshold must be determined using a specific SGT
setting. Therefore, you need to determine the maximum load the motor can drive without stalling and
to monitor the SG value at this load, e.g. some value within the range 0 to 100. The stall threshold
should be a value safely within the operating limits, to allow for parameter stray. So, you should set a
stall threshold in your microcontroller software, which is slightly higher than the minimum value seen
before an actual motor stall occurs. The response at an SGT setting at or near 0 gives some idea on
the quality of the signal: Check the SG value without load and with maximum load. They should show
a difference of at least 100 or a few 100, which shall be large compared to the offset. If you set the
SGT value in a way, that a reading of 0 occurs at maximum motor load, an active high stall output
signal is available at SG_TST output.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
33
12.4 Limits of stallGuard2™ operation
Please bear in mind, that stallGuard2™ will not operate reliable at extreme motor velocities: Very low
motor velocities (e.g. for many motors less than one round per second) generate a low back EMF in
the motor and make the measurement instable and dependent on environment conditions like
temperature, etc. Inappropriate conditions will also lead to extreme settings of SGT and low response
of the SG result to the motor load. On the other hand, very high motor velocities, where the driver is
not able to drive the full sinusoidal current into the motor coils also will lead to a low response in the
SG result. These velocities are typically characterized by the motor back EMF reaching the driver
supply voltage.
Parameter
SGT
Description
This signed value controls stallGuard2™ threshold
level for stall output and sets the optimum
measurement range for readout. A lower value
gives a higher sensitivity. Zero is the starting value
working with most motors. A higher value makes
stallGuard less sensitive and requires more torque
to indicate a stall.
Setting Comment
0
indifferent value
+1…
+63
less sensitivity
-1…-64
higher sensitivity
Enables the stallGuard2™ filter for more precision 0
of the measurement. If set, reduces the 1
measurement frequency to one measurement per
six fullsteps. In standard mode, a measurement is
taken each two fullsteps.
standard mode
Selects the filtering for less noise at low motor 0
velocities.
1
standard mode
Status
word
Description
Comment
SG
This is the stallGuard2™ result. A higher reading 0…
indicates less mechanical load. A lower reading 1023
indicates a higher load and thus a higher load
angle. Tune the SGT setting to show a SG reading
of 0 at maximum load before motor stall. This is
also signaled by the output SG_TST.
SFILT
SSPD
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
Range
filtered mode
low velocity mode
0: maximum load
low value: high load
high value: less load
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
34
13 coolStep™ smart energy operation
mechanical load
stallGuard2
reading
motor current
In order to use coolStep™, you should first tune the stallGuard2™ sensitivity. coolStep™ uses the
stallGuard2™ measurement, to operate the motor near the optimum load angle of +90°.
See example figure.
current setting CS
(upper limit)
motor current reduction area
SEMAX+SEMIN+1
SEMIN
½ or ¼ CS
(lower limit)
motor current increment area
0=maximum load
load angle optimized
time
slow current reduction due
to reduced motor load
load
angle
optimized
current increment due to
increased load
stall possible
load angle optimized
figure 17: Motor current control via coolStep adapts motor current to motor load
13.1 coolStep™ smart energy current regulator
The coolStep™ current regulator allows to control the reaction of the driver to increasing or decreasing
load. The internal regulator uses two thresholds to determine the minimum and the maximum load
angle for optimum motor operation. The current increment speed and the current decrement speed
can be adapted to the application. Additionally, the lower current limit can be set in relation to the
upper current limit set by the current scale parameter CS.
13.1.1 Adaptation to the load situation
To allow the motor current to quickly respond to increasing motor load, use a high current increment
step. If the motor load changes only slowly, a lower current increment step can be used. The current
decrement can then be adapted to work as quickly as possible, while avoiding oscillations of the
motor. Keep in mind, that enabling the stallGuard2™ filter via SFILT reduces the measurement speed
and thus the regulation speed.
13.1.2 Low velocity and standby operation
Since coolStep™ is not able to detect the motor load in standstill and at very low RPM operation, the
current at low velocities should be set to an application specific default value and should be combined
with a stand still current reduction. Switch off coolStep™ at low velocities, to avoid reaction to false
stallGuard™ reading.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
Parameter
SEMIN
SEMAX
Description
35
Setting Comment
Sets the lower threshold for stallGuard2™ reading. 0…15
Below this value, the motor current becomes
increased.
Set SEMIN to zero to disable coolStep™.
Sets the distance between the lower and the 0…15
upper threshold for stallGuard2™ reading. Above
the upper threshold the motor current becomes
decreased.
lower stallGuard threshold:
SEMIN*32
upper stallGuard
threshold:
(SEMIN+SEMAX+1)*32
SEUP
Sets the current increment step. The current 0…3
becomes incremented for each measured
stallGuard2™ value below the lower threshold.
step width is
1, 2, 4, 8
SEDN
Sets the number of stallGuard2™ readings above 0…3
the upper threshold necessary for each current
decrement of the motor current.
number of stallGuard
measurements per
decrement:
32, 8, 2, 1
SEIMIN
Sets the lower motor current limit for coolStep™ 0
operation by scaling the CS value.
1
Status
word
Description
SE
This status value provides the actual motor current 0…31
setting as controlled by coolStep™. The value
goes up to the CS value and down to the portion
of CS as specified by SEIMIN.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
Range
1/2 of CS
1/4 of CS
Comment
1/32, 2/32, … 32/32
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
36
13.2 User benefits, save energy, reduce power and cooling infrastructure
coolStep™ allows saving a lot of energy, especially for motors which see varying loads and operate at
a high duty cycle. Taking into account that a stepper motor application needs to work with a torque
reserve of 30% to 50%, even a constant load application allows saving lots of energy, because the
driver automatically enables torque reserve when required. The reduction in power dissipation further
keeps the system cooler and increases life time and allows savings in the power supply and cooling
infrastructure. Keep in mind, that half motor current means a quarter of the power dissipation in the
motor coils. This power dissipation makes up for most of the stepper motor losses!
The following figure shows shows the efficiency gain of a 42mm stepper motor when using coolStep
compared to standard operation with 50% of torque reserve. coolStep is enabled above 60rpm in the
example.
0,9
Efficiency with coolStep
0,8
Efficiency with 50% torque reserve
0,7
0,6
0,5
Efficiency
0,4
0,3
0,2
0,1
0
0
50
100
150
200
250
300
Velocity [RPM]
figure 18: Energy efficiency with coolStep (example)
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
350
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
37
14 Power Supply Sequencing
The TMC389 generates its own 5V supply for all internal operations. The internal reset of the chip is
derived from the supply voltage regulator in order to ensure a clean start-up of the device after power
up. During start up, the SPI unit is in reset and cannot be addressed. All registers become cleared.
VCC_IO limits the voltage allowable on the inputs and outputs and is used for driving the outputs, but
input levels thresholds are not depending on the actual level of VCC_IO. Therefore, the startup
sequence of the VCC_IO power supply with respect to VS is not important.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
38
15 Clock oscillator and clock input
The internal clock frequency for all operations is nominal 15MHz. An external clock of 10MHz to
20MHz (16MHz recommended for optimum performance) can be supplied for more exact timing,
especially when using coolStep™ and stallGuard2™. Alternatively, the internal clock frequency can be
measured, by measuring the delay time after the last step, until the TMC389 raises the STANDSTILL
flag. From this measurement, chopper timing parameters can be corrected, as the internal oscillator is
relatively stable over a wide range of environment temperatures.
An external clock frequency of up to 20MHz can be supplied. The external clock is enabled with the
first positive polarity seen on the CLK input. Tie the CLK input to GND near to the TMC389 if the
internal clock oscillator is to be used. Switching off the external clock frequency prevents the driver
from operating normally. Be careful to switch off the motor before switching off the clock (e.g. using the
enable input), because otherwise the chopper would stop and the motor current level could rise
uncontrolled. The short to GND detection stays active even without clock, if enabled.
15.1 Considerations on the frequency
A higher frequency allows faster step rates, faster SPI operation and higher chopper frequencies. On
the other hand, it may cause more electromagnetic emission and causes more power dissipation in
the TMC389 digital core. Generally a frequency of 8MHz to 16MHz should be sufficient for most
applications, unless the motor is to operate very fast. For reduced requirements concerning the motor
dynamics, a clock frequency of 4 to 8MHz should be considered.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
39
16 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
Supply voltage
Supply voltage max. 20000s
Symbol
VVS
Min
Max
Unit
-0.5
60
V
-0.5
65
V
Logic supply voltage
VVCC
-0.5
6.0
V
I/O supply voltage
VVIO
-0.5
6.0
V
Logic input voltage
VI
-0.5
VVIO+0.5
V
Analog input voltage
VIA
-0.5
VCC+0.5
V
Voltages on low side driver pins (LX)
VOLS
-0.7
VCC+0.7
V
Voltages on high side driver pins (HX)
VOHS
VHS 0.7
VVM+0.7
V
Voltages on BM pins (BMX)
VIBM
-5
VVM+5
V
VHSVM
-0.5
15
V
Relative high side driver voltage (VVM – VHS)
Maximum current to / from digital pins
and analog low voltage I/Os
IIO
+/-10
mA
Non destructive short time peak current into input / output pins
IIO
500
mA
5V regulator output current
I5VOUT
50
mA
5V regulator peak power dissipation (VVM-5V) * I5VOUT
P5VOUT
1
W
Junction temperature
TJ
-50
150
°C
Storage temperature
TSTG
-55
150
°C
ESD-Protection (Human body model, HBM), in application
VESDAP
1
kV
ESD-Protection (Human body model, HBM), device handling
VESDDH
300
V
17 Electrical Characteristics
17.1 Operational Range
Parameter
Symbol
Min
Max
Unit
TJ
-40
125
°C
Supply voltage
VVS
9
59
V
I/O supply voltage
VVIO
3.00
5.25
V
Junction temperature
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
40
17.2 DC Characteristics 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
Parameter
DC-Characteristics
VVS = 24.0V
Symbol
Conditions
Min
Typ
Max
Unit
Supply current, operating
IVS
fCLK=16MHz, 40kHz
chopper, QG=10nC
13
mA
Supply current, driver disabled
IVS
fCLK=16MHz
10
mA
Supply current, driver disabled,
dependency on CLK frequency
IVS
fCLK variable,
additional to IVS0
0.37
mA/
MHz
Static supply current
IVS0
fCLK=0Hz, digital inputs at +5V or GND
3.1
Part of supply current NOT
consumed from 5V supply
IVSHV
driver disabled
1.1
mA
no load on outputs,
inputs at VIO or GND
0.3
µA
IO supply current
NMOS low side driver
Parameter
IVIO
4
mA
DC-Characteristics
VLSX = 2.5V, slope setting controlled by SLPL
Symbol
Conditions
Gate drive current LX
a)
low side switch ON
ILSON
SLPL=00/01
12
mA
Gate drive current LX
a)
low side switch ON
ILSON
SLPL=10
21
mA
Gate drive current LX
a)
low side switch ON
ILSON
SLPL=11
Gate drive current LX
a)
low side switch OFF
ILSOFF
SLPL=00/01
-13
mA
Gate drive current LX
a)
low side switch OFF
ILSOFF
SLPL=10
-25
mA
Gate drive current LX
a)
low side switch OFF
ILSOFF
SLPL=11
Gate Off detector threshold
VGOD
VLSX falling
QGD protection resistance after
detection of gate off
Driver active output voltage
RLSOFFQGD SLPL=11
VLSX = 1V
VLSON
Min
20
-25
Typ
31
-37
Max
50
-60
1
26
mA
mA
V
50
VVCC
Notes:
a) Low side drivers behave similar to a constant current source between 0V and 2.5V (switching
on) resp. between 2.5V and 5V (switching off), because switching MOSFETs go into
saturation. At 2.5V, the output current is about 85% of peak value. This is the value specified.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
Unit

V
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
PMOS high side driver
Parameter
41
DC-Characteristics
VVS = 24.0V, VVS - VHSX = 2.5V, slope setting controlled by SLPH
Symbol
Conditions
Gate drive current HX
b)
high side switch ON
IHSON
SLPH=00/01
-15
mA
Gate drive current HX
b)
high side switch ON
IHSON
SLPH=10
-29
mA
Gate drive current HX
b)
high side switch ON
IHSON
SLPH=11
Gate drive current HX
c)
high side switch OFF
IHSOFF
SLPH=00/01
15
mA
Gate drive current HX
c)
high side switch OFF
IHSOFF
SLPH=10
29
mA
Gate drive current HX
c)
high side switch OFF
IHSOFF
SLPH=11
Gate Off detector threshold
VGOD
VHSX rising
QGD protection resistance after
detection of gate off
Driver active output voltage
Min
-25
28
IOUT = 0mA
-42
43
Max
Unit
-70
mA
70
mA
VVS-1
RHSOFFQGD SLPH=11
VHSX = VVS - 1V
VHSON
Typ
VVHS-2.8
V
32
60

VVHS-2.3
VVHS-1.8
V
Notes:
b) High side switch on drivers behave similar to a constant current source between VVS and VVS –
2.5V. At VVS-2.5V, the output current is about 90% of peak value. This is the value specified.
c) High side switch off drivers behave similar to a constant current source between VVS - 8V and
VVS-2.5V. At VVS-2.5V, the output current is about 65% of peak value. This is the value
specified.
High side voltage regulator
Parameter
DC-Characteristics
VVS = 24.0V
Symbol
Conditions
Min
Typ
Max
Unit
Output voltage
VVHS
IOUT = 0mA
TJ = 25°C
9.3
10.0
10.8
V
Output resistance
RVHS
Static load
50
TJ = full range
60
Deviation of output voltage over
the full temperature range
DC Output current
VVHS(DEV)
IVHS
Current limit
IVHSMAX
15
Series regulator transistor output
resistance (determines voltage
drop at low supply voltages)
RVHSLV
400
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG

200
mV
4
mA
mA
1000

TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
Linear regulator
Parameter
DC-Characteristics
Symbol
Conditions
Min
Typ
Max
Unit
4.75
5.0
5.25
V
Output voltage
V5VOUT
I5VOUT = 10mA
TJ = 25°C
Output resistance
R5VOUT
Static load
Deviation of output voltage over
the full temperature range
Output current capability
(attention, do not exceed
maximum ratings with DC
current)
Clock oscillator and input
Parameter
42
V5VOUT(DEV) I5VOUT = 10mA
TJ = full range
I5VOUT

3
30
60
mV
VVS = 12V
100
mA
VVS = 8V
60
mA
VVS = 6.5V
20
mA
Timing-Characteristics
Symbol
Conditions
Min
Typ
Max
Unit
Clock oscillator frequency
fCLKOSC
tJ=-50°C
10.0
14.3
Clock oscillator frequency
fCLKOSC
tJ=50°C
10.8
15.2
20.0
MHz
Clock oscillator frequency
fCLKOSC
tJ=150°C
15.4
20.3
MHz
External clock frequency
(operating)
fCLK
4
20
MHz
External clock high / low level
time
tCLK
12
Detector levels
Parameter
VVS undervoltage threshold
Short to GND detector threshold
(VVS - VBMx)
Short to GND detector delay
(low side gate off detected to
short detection)
Overtemperature prewarning
Overtemperature shutdown
Sense resistor voltage levels
MHz
ns
DC-Characteristics
Symbol
Min
Typ
Max
Unit
VUV
6.5
8
8.5
V
VBMS2G
1.0
1.5
2.3
V
2.0
3.2
4.5
µs
tS2G
Conditions
TS2G=00
TS2G=10
1.6
µs
TS2G=01
1.2
µs
TS2G=11
0.8
µs
tOTPW
tOT
Temperature rising
80
100
120
°C
135
150
170
°C
DC-Characteristics
Parameter
Symbol
Conditions
Min
Typ
Max
Unit
Sense input peak threshold
voltage (low sensitivity)
VSRTRIPL
VSENSE=0
Cx=248; Hyst.=0
290
310
330
mV
sense input peak threshold
voltage (high sensitivity)
tSRTRIPH
VSENSE=1
Cx=248; Hyst.=0
153
165
180
mV
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
Digital logic levels
DC-Characteristics
Parameter
Input voltage low level
43
Symbol
d)
Input voltage high level
d)
Conditions
Min
Typ
Max
Unit
VINLO
-0.3
0.8
V
VINHI
2.4
VVIO+0.3
V
0.4
V
Output voltage low level
VOUTLO
IOUTLO = 1mA
Output voltage high level
VOUTHI
IOUTHI = -1mA
Input leakage current
IILEAK
0.8VVIO
-10
V
10
Notes:
d) Digital inputs left within or near the transition region substantially increase power supply
current by drawing power from the internal 5V regulator. Make sure that digital inputs become
driven near to 0V and up to the VIO I/O voltage.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
µA
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
44
17.3 ESD sensitive device
The TMC389 is an ESD sensitive CMOS device and also MOSFET transistors used in the application
schematic are very sensitive to electrostatic discharge. Take special care to use adequate grounding
of personnel and machines in manual handling. After soldering the devices to the board, ESD
requirements are more relaxed. Failure to do so can result in defect or decreased reliability.
Note: In a modern SMD manufacturing process, ESD voltages well below 100V are standard. A major
source for ESD is plugging the motor during operation. As the TMC389 power MOSFETs are external,
the device in fact is very rugged concerning any ESD event. All other connections are typically
protected due to external circuitry on the PCB.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
45
17.4 MOSFET examples
There is a number of N&P channel paired MOSFETs available, which fit the TMC389, as well as single
N and P devices. The user choice will depend on the electrical data (voltage, current, RDSon) and on
the package and configuration (single / dual). The following table gives a few examples of SMD
MOSFET pairs for different motor voltages and currents. The MOSFETs explicitly are modern types
with a low total gate charge.
For the actual application, we suggest to calculate static and dynamic power dissipation for a given
MOSFET pair. A gate charge below 20nC (at 5V) should be preferred to reach reasonable slopes.
Transistor
Type
Unit
AOD4130
AOD409
SUD23N06
SUD19P06
AP4575GH
AOD603A
SI7414
SI7415
QM6301S
AO4612
SI4559ADY
AOD4186
AOD4185
FDD8647L
FDD4243
QM4302D
QM4803D
FDD8424H
AOD609
AP4543GEH
AP4543GMT
AO4618
AP4543GEM
SI4565DY
SI4567DY
FDS8960C
BSZ050N03
BSZ180P03
AP4509AGH
AO4616
FDS8958A
SI7501
AP4503BGM
SI4544DY
SI4539ADY
SI4532ADY
AP2852GO
AP2451GY
Manufacturer
A&O
Voltage
VDS
Max. RMS
Current (*)
V
A
60
7
Package
DPAK
Vishay
60
6
APEC
A&O
60
60
3.5
3.2
TO252-4L
TO252-4L
Vishay
60
3
PPAK1212
UBIQ
APEC
Vishay
60
60
60
2.6
2.3
2.2
A&O
40
8
Fairchild
40
7
UBIQ
UBIQ
Fairchild
A&O
APEC
APEC
A&O
APEC
Vishay
Vishay
Fairchild
40
40
40
40
40
40
40
40
40
40
35
5.5
4.2
4.2
4.1
4
3.5
3.3
3
3
2.5
3.3
Infineon
30
8
APEC
A&O
Fairchild
Vishay
APEC
Vishay
Vishay
Vishay
APEC
APEC
30
30
30
30
30
30
30
30
30
20
8
3.2
3
3
3
2.9
2.8
2.7
2.7
2.5
DPAK
SO8
SO8
SO8
DPAK
DPAK
TO252-4L
TO252-4L
DPAK-4L
TO252-4L
TO252-4L
PMPAK5x6
SO8
SO8
SO8
SO8
SO8
S3O8
TO252-4L
SO8
SO8
PPAK1212
SO8
SO8
SO8
SO8
TSSOP-8
2928-8
RDSon
N (5V)
RDSon
P (8V)
QG
N
QG
P
mΩ
30
mΩ
nC
13
nC
35
35
42
67
28
30
64
55
15
22
8
50
80
95
60
65
90
110
12
4
9
13
5
7
9
14
13
15
28
25
31
36
36
21
38
35
60
20
7
16
24
25
35
35
40
45
50
48
37
22
14
16
12
10
8
12
19
12
40
30
35
45
40
45
45
22
50
45
80
45
18
28
24
45
50
35
40
50
70
60
60
11
6
9
5
8
8
3
8
9
6
6
13
15
9
6
5
6
9
6
4
8
9
18
12
9
14
9
13
13
8
13
13
10
9
15
17
16
9
11
12
15
12
8
9
11
(*) Remark: The maximum motor current applicable in a given design depends upon PCB size and
layout, since all of these transistors are mainly cooled via the PCB. The data given implies adequate
cooling measures taken by the user, especially for higher current designs. The maximum RMS current
rating takes into account package power dissipation, on resistances and gate charges.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
46
18 Using an external power stage for higher voltage or current
The TMC389 uses a completely complementary driving scheme for power transistors. This allows
attaching an external gate driver, using the low side driver output information, only. Therefore, the
external gate driver needs to bring brake-before make capability. You can directly attach gate driver
ICs like TMC603 as gate drivers for high current NMOS transistor bridges. The TMC603 also supplies
a gate drive voltage regulator and allows 100% duty cycle. Please refer TMC603 datasheet. The
example shows the TMC603 driver boosting TMC389. The higher gate driving capability allows
addressing designs for more than 20A. Different gate driver ICs are available on the market which also
allow for higher voltages.
+V12
12V gate
supply
+VM 12-48V
supply
+V12
100n
16V
VHS
+VCC
VCC_IO
3.3V or 5V
100n
VLS
VM
TMC389
TMC603
470nF
D
BH1
CLK
D
step & dir
(optional)
DIR
HS-DRV
HS1
HW
Z 12V
HU
BM1
HV
STEP
VM
BBM_EN
5VOUT
100n
8-20MHz
VCP
+VCC
D
BMW
D
BMU
220R
+V12
BL1
LS-DRV
LS1
+VM
BMV
TEST_SE
ENABLE
CSN
SCK
SPI
SDI
SDO
LW
D
LV
D
BH2
HS-DRV
HS2
Z 12V
LU
3 phase
stepper
motor
BM2
D
220R
D
BL2
D
LS-DRV
LS2
D
+VM
stallGuard
output
SG_TST
D
BH3
HS-DRV
HS3
Z 12V
BM3
220R
BL3
LS-DRV
LS3
SR
INV_BL
DIE PAD
GND
TEST_ANA
RNAME
figure 19: High current high voltage power stage using additional gate drivers (example)
Please be aware, that the short to GND protection of the TMC389 cannot be used in this scheme: The
driver cannot be fully disabled, because the external gate driver just switches on either high side
MOSFET or low side MOSFET. An external short to GND protection could use a series resistor to
measure power bridge current and to disable the high side MOSFETs by using the TMC389 enable
input ENN. Use a gate driver like TMC603 to provide additional short to GND protection without the
need for a high side shunt.
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
47
19 Getting started
19.1 Initialization of the driver
Initialization SPI datagram example sequence to enable the driver and initialize the chopper:
//SPI Datagrams for configuring the TMC389
//Creation date: 23.11.2010 12:18:43
//DRVCTRL register (1/16 microstep with interpolation to 256 microsteps)
unsigned char DRVCTRL[3] = {0x00, 0x02, 0x04};
//CHOPCONF register (NOSD, HYST=40)
unsigned char CHOPCONF[3] = {0x09, 0x8E, 0x85};
//SMARTEN register (off)
unsigned char SMARTEN[3] = {0x0A, 0x00, 0x00};
//SGSCONF register (current setting=19)
unsigned char SGSCONF[3] = {0x0D, 0x00, 0x13};
//DRVCONF register
unsigned char DRVCONF[3] = {0x0E, 0xF0, 0x00};
First test of coolStep™ current control:
//SMARTEN register (SEMIN=2, SEMAX=2)
unsigned char SMARTEN[3] = {0x0A, 0x02, 0x02};
Please note, that the configuration parameters should be tuned to the motor and application for
optimum performance.
19.2 Sending SPI data from a CPU
SPI slaves can either be chained or be used with a single chip select line. If slaves are chained, they
behave like a long shift register, e.g. a chain of two drivers requires 40 bits to be sent. The last bits
shifted to each register in the chain are clocked into the holding register with the rising CSN signal.
This means, that for example 24 or 32 bit can be sent to a single driver, but it latches just the lower 20
bits.
+VM
Real time Step
& Dir interface
3 x REF_L, REF_R
TMC429
triple stepper motor
controller
nSCS_C
SCK_C
SDI_C
SDOZ_C
SPI to master
nINT
Interrupt
controller
Reference switch
processing
Moti
3x linear RAMP
generator
Step &
Direction pulse
generation
Position
comparator
Microstep table
CLK
Realtime event trigger
VCC_IO
ntrol
on co
S1 (SDO_S)
STEP
D1 (SCK_S)
Output select
SPI or
Step & Dir
DIR
S2 (nSCS_S)
D2 (SDI_S)
Driver 2
otor
tep m
coolS river
d
TMC389 three phase
stepper driver IC
step multiplier
Mechanical Feedback
or virtual stop switch
sine table
4*256 entry
x
Driver 3
Serial driver
interface
CSN
SCK
SDI
SDO
N
S
LS drivers
LS drivers
LS drivers
3phase
stepper
LS
SPI control,
Config & diags
coolStep™
SR
RS
Protection
& diagnostics
POSCOMP
HS
BM
chopper
S3 (nSCS_2)
D3 (nSCS_3)
HS drivers
HS drivers
HS drivers
stallGuard2™
Virtual stop switch
current
comparator
DAC
SG_TST
Second driver and motor
Motion command
SPI(TM)
Configuration and
diagnostics SPI(TM)
Third driver and motor
ol
contr
User CPU
System interfacing
m
Syste
figure 20: Sample system showing SPI interconnection and TMC429 StepDir controller IC
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG
TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)
48
20 Table of figures
1: BASIC APPLICATION BLOCK DIAGRAM .................................................................................................... 4
2: TMC389 PINNING ........................................................................................................................... 5
FIGURE 3: QFN32 5X5 DIMENSIONS .................................................................................................................. 7
FIGURE 4: TMC389 BLOCK AND APPLICATION SCHEMATIC ....................................................................................... 8
FIGURE 5: SPI TIMING .................................................................................................................................. 17
FIGURE 6: STEP AND DIR TIMING .................................................................................................................. 18
FIGURE 7: INTERNAL MICROSTEP TABLE SHOWING THE FIRST QUARTER OF THE SINE WAVE ............................................. 19
FIGURE 8: OPERATION OF THE STEP MULTIPLIER IN DIFFERENT SITUATIONS ............................................................... 20
FIGURE 9: SENSE RESISTOR GROUNDING AND OPTIONAL PARTS ............................................................................... 22
FIGURE 10: CHOPPER PHASES IN MOTOR OPERATION ............................................................................................ 23
FIGURE 11: SPREADCYCLE (PAT.FIL.) CHOPPER SCHEME SHOWING THE COIL CURRENT WITHIN A CHOPPER CYCLE ................. 25
FIGURE 12: MOSFET GATE CHARGE AS AVAILABLE IN DEVICE DATA SHEET VS. SWITCHING EVENT (DOTTED LINE) ............... 27
FIGURE 13: TIMING OF THE SHORT TO GND DETECTOR ......................................................................................... 28
FIGURE 14 UNDERVOLTAGE RESET TIMING.......................................................................................................... 30
FIGURE 15: PRINCIPLE FUNCTION OF STALLGUARD2 ............................................................................................. 31
FIGURE 16: EXAMPLE SG RESULT WITH A 60MM 3 PHASE MOTOR WITHOUT LOAD ACCELERATED FROM 0 TO 375 RPM ........ 32
FIGURE 17: MOTOR CURRENT CONTROL VIA COOLSTEP ADAPTS MOTOR CURRENT TO MOTOR LOAD ................................... 34
FIGURE 18: ENERGY EFFICIENCY WITH COOLSTEP (EXAMPLE) .................................................................................. 36
FIGURE 19: HIGH CURRENT HIGH VOLTAGE POWER STAGE USING ADDITIONAL GATE DRIVERS (EXAMPLE) ........................... 46
FIGURE 20: SAMPLE SYSTEM SHOWING SPI INTERCONNECTION AND TMC429 STEPDIR CONTROLLER IC .......................... 47
FIGURE
FIGURE
21 Revision History
21.1 Documentation Revision
Version
Date
Author
Description
BD=Bernhard Dwersteg
0.2
2010-APR-28
BD
Registermap corresponds to test chip
0.3
2010-OKT-10
BD
updated schematic and register bits
0.4
2010-NOV-03
BD
removed TMC388 information, added preliminary
1.02
2010-NOV-23
BD
First release of complete datasheet
1.03
2010-NOV-26
BD
added disclaimer, SPI details
1.05
2011-FEB-16
BD
minor corrections
1.06
2011-MAR-09
BD
Corrected undervoltage threshold, chopper thresholds
1.07
2011-APR-22
BD
Slightly corrected gate driver current levels, corrected
pinning table according to pinout
1.08
2011-JUL-26
BD
Updated MOSFET list, typ. fCLKOSC is 15MHz (old: 13MHz)
1.09
2011-DEC-29
BD
Minor modifications in look of tables, added % for binary
1.10
2012-FEB-06
BD
Minor Fix, added coolStep efficiency example
1.11
2012-MAY-29
BD
Minor Fix concerning wording “Fullstep”
1.12
2012-JUN-27
BD
Added / revised power supply sequencing
1.13
2012-AUG-13
SD
figure 14 (undervoltage reset timing) new
1.14
2013-MAR-25
BD
Updated MOSFET list
Table 1: Documentation Revisions
Copyright © 2010 TRINAMIC Motion Control GmbH & Co. KG