User Manual

TMC5031-EVAL Manual / Firmware V1.00 (Rev. 1.00 / 2013-FEB-22) 17
www.trinamic.com
6.4.2 Ramp Generator Features Dialogue
This dialogue offers two tabs: the ramp status tab and the switch mode tab. These tabs correlate with
each other.
6.4.2.1 Ramp Status Tab
Ramp status flags can be polled continuously or
on demand. This status tab is designed to read
out the RAMP_STAT register of the TMC5031
Blue marked flags are set.
If you use the push buttons for the reference
switches of motor 2 on the evaluation board, the
status can be read out here.
0X35, 0X55: RAMP_STAT RAMP AND REFERENCE SWITCH STATUS REGISTER OF TMC5031
R/W
Bit
Name
Comment
R
13
status_sg
1: Signals an active stallGuard2 input from the coolStep driver, if
enabled.
Hint: When polling this flag, stall events may be missed activate
sg_stop to be sure not to miss the stall event.
R+C
12
second_move
1: Signals that the automatic ramp requires moving back in the
opposite direction, e.g. due to on-the-fly parameter change
(Flag is cleared upon reading)
R
11
t_zerowait_
active
1: Signals, that T_ZEROWAIT is active after a motor stop. During this
time, the motor is in standstill.
R
10
vzero
1: Signals, that the actual velocity is 0.
R
9
position_
reached
1: Signals, that the target position is reached.
This flag becomes set while X_ACTUAL and X_TARGET match.
R
8
velocity_
reached
1: Signals, that the target velocity is reached.
This flag becomes set while V_ACTUAL and VMAX match.
R+C
7
event_pos_
reached
1: Signals, that the target position has been reached (pos_reached
becoming active).
This bit is ORed to the interrupt output signal.
(Flag is cleared upon reading)
R+C
6
event_stop_
sg
1: Signals an active StallGuard2 stop event.
(Flag is cleared upon reading)
This bit is ORed to the interrupt output signal.
R
5
event_stop_r
Signals an active stop right condition due to stop switch.
This bit is ORed to the interrupt output signal.
Figure 6.11 Ramp and reference switch status flags