Datasheet
TMC220X, TMC222X DATASHEET (Rev. 1.02 / 2017-MAY-16) 6
www.trinamic.com
1.2 Control Interfaces
The TMC22xx supports both, discrete control lines for basic mode selection and a UART based single
wire interface with CRC checking. The UART interface automatically becomes enabled when correct
UART data is sent. When using UART, the pin selection may be disabled by control bits.
1.2.1 UART Interface
The single wire interface allows unidirectional operation (for parameter setting only), or bi-directional
operation for full control and diagnostics. It can be driven by any standard microcontroller UART or
even by bit banging in software. Baud rates from 9600 Baud to 500k Baud or even higher (when
using an external clock) may be used. No baud rate configuration is required, as the TMC22xx
automatically adapts to the masters’ baud rate. The frame format is identical to the intelligent
TRINAMIC controller & driver ICs TMC5130 and TMC5072. A CRC checksum allows data transmission
over longer distance. For fixed initialization sequences, store the data including CRC into the µC, thus
consuming only a few 100 bytes of code for a full initialization. CRC may be ignored during read
access, if not desired. This makes CRC use an optional feature! The IC has a fixed address. Multiple
drivers can be programmed in parallel by tying together all interface pins, in case no read access is
required. An optional addressing can be provided by analog multiplexers, like 74HC4066.
From a software point of view the TMC22xx is a peripheral with a number of control and status
registers. Most of them can either be written only or are read only. Some of the registers allow both,
read and write access. In case read-modify-write access is desired for a write only register, a shadow
register can be realized in master software.
1.3 Moving and Controlling the Motor
1.3.1 STEP/DIR Interface
The motor is controlled by a step and direction input. Active edges on the STEP input can be rising
edges or both rising and falling edges as controlled by a special mode bit (DEDGE). Using both edges
cuts the toggle rate of the STEP signal in half, which is useful for communication over slow interfaces
such as optically isolated interfaces. The state sampled from the DIR input upon an active STEP edge
determines whether to step forward or back. Each step can be a fullstep or a microstep, in which
there are 2, 4, 8, 16, 32, 64, 128, or 256 microsteps per fullstep. A step impulse with a low state on
DIR increases the microstep counter and a high decreases the counter by an amount controlled by the
microstep resolution. An internal table translates the counter value into the sine and cosine values
which control the motor current for microstepping.
1.3.2 Internal Step Pulse Generator
Some applications do not require a precisely co-ordinate motion – the motor just is required to move
for a certain time and at a certain velocity. The TMC22xx comes with an internal pulse generator for
these applications: Just provide the velocity via UART interface to move the motor. The velocity sign
automatically controls the direction of the motion. However, the pulse generator does not integrate a
ramping function. Motion at higher velocities will require ramping up and ramping down the velocity
value via software.
STEP/DIR mode and internal pulse generator mode can be mixed in an application!
1.4 stealthChop2 & spreadCycle Driver
stealthChop is a voltage chopper based principle. It especially guarantees that the motor is absolutely
quiet in standstill and in slow motion, except for noise generated by ball bearings. Unlike other
voltage mode choppers, stealthChop2 does not require any configuration. It automatically learns the
best settings during the first motion after power up and further optimizes the settings in subsequent
motions. An initial homing sequence is sufficient for learning. Optionally, initial learning parameters
can be stored to OTP. stealthChop2 allows high motor dynamics, by reacting at once to a change of
motor velocity.
UART
UART