Datasheet
TMC5130A DATASHEET (Rev. 1.11 / 2015-OCT-08) 90
www.trinamic.com
18 DIAG Outputs
18.1 STEP/DIR Mode
Operation with an external motion controller often requires quick reaction to certain states of the
stepper motor driver. Therefore, the DIAG outputs supply a configurable set of different real time
information complementing the STEP/DIR interface.
Both, the information available at DIAG0 and DIAG1 can be selected as well as the type of output
(low active open drain – default setting, or high active push-pull). In order to determine a reset of the
driver, DIAG0 always shows a power-on reset condition by pulling low during a reset condition.
Figure 18.1 shows the available signals and control bits.
DIAG1
DIAG0
PMD
PDD
PDD=100k pulldown
PMD=50k to VCC/2
Power-on reset
Driver error
diag0_error
Overtemp. prewarning
diag0_otpw
Stall
diag0_stall
diag0_pushpull
Sequencer microstep 0 index
diag1_index
Chopper on-state
diag1_onstate
diag1_steps_skipped
diag1_pushpull
diag1_stall
dcStep steps skipped
Figure 18.1 DIAG outputs in STEP/DIR mode
The stall output signal allows stallGuard2 to be handled by the external motion controller like a stop
switch. The index output signals the microstep counter zero position, to allow the application to
reference the drive to a certain current pattern. Chopper on-state shows the on-state of both coil
choppers (alternating) when working in spreadCycle or constant off time in order to determine the
duty cycle. The dcStep skipped information is an alternative way to find out when dcStep runs with a
velocity below the step velocity. It toggles with each step not taken by the sequencer.
18.2 Motion Controller Mode
In motion controller mode, the DIAG outputs deliver a position compare signal to allow exact
triggering of external logic, and an interrupt signal in order to trigger software to certain conditions
within the motion ramp. Either an open drain (active low) output signal can be chosen (default), or an
active high push-pull output signal. When using the open drain output, an external pull up resistor in
the range 4.7kΩ to 33kΩ is required. DIAG0 also becomes driven low upon a reset condition. However
the end of the reset condition cannot be determined by monitoring DIAG0 in this configuration,
because event_pos_reached flag also becomes active upon reset and thus the pin stays actively low
after the reset condition. In order to safely determine a reset condition, monitor the reset flag by SPI
or read out any register to confirm that the chip is powered up.