TMC5161 DATASHEET (Rev. 1.01 / 2018-NOV-20)
52
6.5.5 DRV_STATUS – stallGuard2 Value and Driver Error Flags
0X6F: DRV_STATUS – STALLGUARD2 VALUE AND DRIVER ERROR FLAGS
Bit Name
31 stst
Function
standstill indicator
Comment
This flag indicates motor stand still in each operation mode.
This occurs 2^20 clocks after the last step pulse.
1: Open load detected on phase A or B.
30 olb
open load indicator
phase B
open load indicator
phase A
Hint: This is just an informative flag. The driver takes no action
upon it. False detection may occur in fast motion and
standstill. Check during slow motion, only.
29 ola
1: Short to GND detected on phase A or B. The driver becomes
disabled. The flags stay active, until the driver is disabled by
software (TOFF=0) or by the ENN input.
28 s2gb
27 s2ga
26 otpw
short to ground
indicator phase B
short to ground
indicator phase A
overtemperature pre-
warning flag
1: Overtemperature pre-warning threshold is exceeded.
The overtemperature pre-warning flag is common for both
bridges.
1: Overtemperature limit has been reached. Drivers become
disabled until otpw is also cleared due to cooling down of the
25 ot
overtemperature flag
IC.
The overtemperature flag is common for both bridges.
1: Motor stall detected (SG_RESULT=0) or dcStep stall in dcStep
mode.
24 stallGuard stallGuard2 status
Ignore these bits
23
22
21
-
reserved
Actual current control scaling, for monitoring smart energy
current scaling controlled via settings in register COOLCONF, or
for monitoring the function of the automatic current scaling.
20 CS
actual motor current /
smart energy current
ACTUAL
19
18
17
16
1: Indicates that the driver has switched to fullstep as defined
by chopper mode settings and velocity thresholds.
15 fsactive
full step active
indicator
1: Driver operates in stealthChop mode
14 stealth
13 s2vsb
stealthChop indicator
short to supply
indicator phase B
short to supply
indicator phase A
reserved
1: Short to supply detected on phase A or B. The driver
becomes disabled. The flags stay active, until the driver is
disabled by software (TOFF=0) or by the ENN input. Sense
resistor voltage drop is included in the measurement!
12 s2vsa
Ignore this bit
Ignore this bit
Mechanical load measurement:
The stallGuard2 result gives a means to measure mechanical
motor load. A higher value means lower mechanical load. A
value of 0 signals highest load. With optimum SGT setting,
this is an indicator for a motor stall. The stall detection
compares SG_RESULT to 0 in order to detect a stall. SG_RESULT
is used as a base for coolStep operation, by comparing it to a
programmable upper and a lower limit. It is not applicable in
stealthChop mode.
11
10
9
-
-
reserved
SG_
RESULT
stallGuard2 result
respectively PWM on
time for coil A in stand
still for motor
8
7
6
5
4
3
2
temperature detection
1
stallGuard2 works best with microstep operation or dcStep.
0
Temperature measurement:
In standstill, no stallGuard2 result can be obtained. SG_RESULT
shows the chopper on-time for motor coil A instead. Move the
motor to a determined microstep position at a certain current
setting to get a rough estimation of motor temperature by a
reading the chopper on-time. As the motor heats up, its coil
resistance rises and the chopper on-time increases.
www.trinamic.com