
TMC222 DATASHEET (V. 1.12 / March 7, 2011)
17
Copyright 2004-2009 TRINAMIC Motion Control GmbH & Co. KG
5.1.14 Internal handling of commands and flags
The internal handling of commands and flags differs. Commands are handled with different priorities
depending on the current state and the current status of internal flags, see figure below. SetPosition or
GotoSecurePosition commands are ignored as long as the <StepLoss> flag is set. Details can be
found in Table 8: Priority Encoder.
Note: A HardStop command is sent by the master or triggered internally in case of an electrical defect
or over temperature.
A description of the available commands can be found in 6.8 Command Description. A list of the
internal flags can be found in 5.2.2 Status Flags.
As an example: When the circuit drives the motor to its programmed target position, state “GotoPos” is
entered. There are three events which can cause to leave this state: HardStop command received,
SoftStop command received or target position reached. If all three events occur at the same time the
HardStop command is executed since it has the highest priority. The Motion finished event (target
position reached) has the lowest priority and thus will only cause transition to “Stopped” state when
both other events do not occur.
RunInit
SoftStop
Stopped
ShutDown
HardStop
GotoPos
Priorities
High
Low
Thermal Shutdown
GotoSecurePosition
SetPosition
Motion finished
HardStop
Thermal Shutdown
Power On
Reset
GetFullStatus1
AND <TSD> + <HS> = 0
HardStop
Thermal Shutdown
SoftStop
RunInit
Motion finished
Figure 7: Internal handling of commands and flags