TMC5160 DATASHEET (Rev. 1.08 / 2018-NOV-19)
96
16 DIAG Outputs
16.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 16.1 shows the available signals and control bits.
Power-on reset
Driver error
diag0_pushpull
diag0_error
PMD
DIAG0
Overtemp. prewarning
diag0_otpw
Stall
diag0_stall
PDD=100k pulldown
PMD=50k to VCC/2
diag1_stall
Sequencer microstep 0 index
diag1_pushpull
diag1_index
PDD
DIAG1
Chopper on-state
diag1_onstate
dcStep steps skipped
diag1_steps_skipped
Figure 16.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.
Attention
The duration of the index pulse corresponds to the duration of the microstep. When working without
interpolation at less than 256 microsteps, the index time goes down to two CLK clock cycles.
16.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
www.trinamic.com