TMC5161 DATASHEET (Rev. 1.01 / 2018-NOV-20)
40
6.3.2.2 RAMP_STAT – Ramp & Reference Switch Status Register
0X35: RAMP_STAT – RAMP AND REFERENCE SWITCH STATUS REGISTER
R/W
Bit Name
Comment
R
13
status_sg
1: Signals an active stallGuard2 input from the coolStep driver or
from the dcStep unit, if enabled.
Hint: When polling this flag, stall events may be missed – activate
sg_stop to be sure not to miss the stall event.
1: Signals that the automatic ramp required moving back in the
opposite direction, e.g. due to on-the-fly parameter change
(Write ‘1’ to clear)
R+
WC
12
11
second_move
R
t_zerowait_
active
1: Signals, that TZEROWAIT is active after a motor stop. During this
time, the motor is in standstill.
R
R
10
9
vzero
1: Signals, that the actual velocity is 0.
1: Signals, that the target position is reached.
This flag becomes set while XACTUAL and XTARGET match.
1: Signals, that the target velocity is reached.
This flag becomes set while VACTUAL and VMAX match.
1: Signals, that the target position has been reached
(position_reached becoming active).
position_
reached
velocity_
reached
event_pos_
reached
R
8
7
R+
WC
(Write ‘1’ to clear flag and interrupt condition)
This bit is ORed to the interrupt output signal.
R+
WC
6
5
event_stop_
sg
1: Signals an active StallGuard2 stop event.
Reading the register will clear the stall condition and the motor may
re-start motion, unless the motion controller has been stopped.
(Write ‘1’ to clear flag and interrupt condition)
This bit is ORed to the interrupt output signal.
R
event_stop_r
1: Signals an active stop right condition due to stop switch.
The stop condition and the interrupt condition can be removed by
setting RAMP_MODE to hold mode or by commanding a move to the
opposite direction. In soft_stop mode, the condition will remain
active until the motor has stopped motion into the direction of the
stop switch. Disabling the stop switch or the stop function also
clears the flag, but the motor will continue motion.
This bit is ORed to the interrupt output signal.
4
event_stop_l
1: Signals an active stop left condition due to stop switch.
The stop condition and the interrupt condition can be removed by
setting RAMP_MODE to hold mode or by commanding a move to the
opposite direction. In soft_stop mode, the condition will remain
active until the motor has stopped motion into the direction of the
stop switch. Disabling the stop switch or the stop function also
clears the flag, but the motor will continue motion.
This bit is ORed to the interrupt output signal.
R+
WC
3
2
status_latch_r
status_latch_l
1: Latch right ready
(enable position latching using SW_MODE settings
latch_r_active or latch_r_inactive)
(Write ‘1’ to clear)
1: Latch left ready
(enable position latching using SW_MODE settings
latch_l_active or latch_l_inactive)
(Write ‘1’ to clear)
R
1
0
status_stop_r
status_stop_l
Reference switch right status (1=active)
Reference switch left status (1=active)
www.trinamic.com