Datasheet
TMC4361A Datasheet | Document Revision 1.22 • 2017-JAN-12
134/230
© 2015 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany — Terms of delivery and rights
to technical change reserved. Download newest version at: www.trinamic.com .
Read entire documentation; especially the “Supplemental Directives” on page 224.
MAIN MANUAL
The hardware setup scenario, as shown on the previous page, also allows switching
between SPI and Voltage PWM mode. It is advisable to enable or disable the Voltage
PWM mode during standstill of the internal ramp.
In order to disable Voltage PWM mode for TMC23x/24x, do as follows:
Action:
Set
pwm_out_en
= 0 (
GENERAL_CONF
register 0x00).
Result:
SPI output interface is enabled and controlled PWM output for TMC23x/24x is disabled.
MP2 – that must be connected with SPE@TMC23x/24x – is set to high voltage level,
which enables TMC23x/24x SPI mode.
However, it is also possible to switch between both modes during motion. Because
the internal MSLUT is used either as voltage specification or as current specification,
microstep loss can occur whenever the mode is switched in case the switching velocity
is passed by.
i In order to overcome this, issue a microstep offset during PWM mode can be
assigned.
In order to set up a TMC23x/24x configuration that switches between
SPI and PWM voltage mode, do as follows:
Action:
Set
PWM_FREQ
register 0x1F to the number of clock cycles for one PWM cycle.
Set
pwm_out_en
= 1 (
GENERAL_CONF
register 0x00).
Set
spi_output_format
= b’1000 (TMC23x) or
spi_output_format
= b’1001 (TMC24x).
Set
SPI_SWITCH_VEL
register 0x1D to a value [pps] at which the mode change
should happen.
Set
MS_OFFSET
register 0x79 (only write access) to a value between 0 and 255.
Result:
Whenever the internal velocity |
VACTUAL
|<
SPI_SWITCH_VEL
, Voltage PWM mode is
activated automatically.
Whenever |
VACTUAL
| ≥
SPI_SWITCH_VEL,
SPI mode is activated automatically.
During PWM mode the internal MSLUT value is modified by
MS_OFFSET
; in order to
shift the resulting voltage curve of the motor coils.
Observing the motor coil currents with current probes is the best method
for determining the required
MS_OFFSET
:
Triggering the SPE signal will gain the switching point.
At this point the current curves show a crack if no offset is assigned. This could
lead to step loss.
i The offset can attenuate this crack to overcome this step loss.
Switching
between SPI
and Voltage
PWM Modes
Determining
MS_OFFSET