User Manual

TMC5031-EVAL Manual / Firmware V1.00 (Rev. 1.00 / 2013-FEB-22) 19
www.trinamic.com
6.4.2.2 Switch Mode Tab
With this tab, the SW_MODE register of the
TMC5031 can be adjusted. Just tick the desired
function to set it.
0X34, 0X54: SW_MODE REFERENCE SWITCH AND STALLGUARD2 EVENT CONFIGURATION REGISTER
Bit
Name
Comment
11
en_softstop
0: Hard stop
1: Soft stop
The soft stop mode always uses the deceleration ramp settings DMAX, V1,
D1, VSTOP and TZEROWAIT for stopping the motor. A stop occurs when
the velocity sign matches the reference switch position (REFL for negative
velocities, REFR for positive velocities) and the respective switch stop
function is enabled.
A hard stop also uses TZEROWAIT before the motor becomes released.
Attention: Do not use soft stop in combination with stallGuard2.
10
sg_stop
1: Enable stop by stallGuard2. Disable to release motor after stop event.
Attention: Do not enable during motor spin-up, wait until the motor
velocity exceeds a certain value, where stallGuard2 delivers a stable result.
9
-
Reserved, set to 0
8
latch_r_inactive
1: Activates latching of the position to XLATCH upon an inactive going
edge on the right reference switch input REFR.
7
latch_r_active
1: Activates latching of the position to XLATCH upon an active going edge
on the right reference switch input REFR.
Hint: Activate latch_r_active to detect any spurious stop event by reading
status_latch_r.
6
latch_l_inactive
1: Activates latching of the position to XLATCH upon an inactive going
edge on the left reference switch input REFL.
5
latch_l_active
1: Activates latching of the position to XLATCH upon an active going edge
on the left reference switch input REFL.
Hint: Activate latch_l_active to detect any spurious stop event by reading
status_latch_l.
4
swap_lr
1: Swap the left and the right reference switch input
Figure 6.12 SW_MODE register
NOTE
If stallGuard stop is active and the motor stalls,
deactivate the stallGuard event before going on
with your tests. Otherwise the motor will not
rotate.
For a further stallGuard test activate the
stallGuard event again.