Datasheet

TMC4361A Datasheet | Document Revision 1.22 2017-JAN-12
131/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 Directiveson page 224.
MAIN MANUAL
PWM Output Generation and Scaling Possibilities
The STPOUT and DIROUT output pins generally forward internal generated microsteps
and motion direction. In contrast to that, it is possible to forward the internal MSLUT
value as PWM output signals, which is dependent on the PWM frequency.
In order to generate PWM output, 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).
Result:
Step/Dir output is disabled and PWM signals are forwarded via STPOUT_PWMA and
DIROUT_PWMB. PWM frequency f
PWM
is calculated by:
f
PWM
= f
CLK
/
PWM_FREQ
If PWM Voltage mode is selected:
Avoid unintended overheating to prevent motor damage during PWM
mode!
At lower velocity values PWM voltage scaling MUST be enabled.
This will ensure smooth operation during controlled PWM mode.
The duty cycle of both signals represent the sine (STPOUT) and cosine (DIROUT)
values of the MSLUT.
PWM voltage scaling does not work the same way as presented for the SPI current
output interface (see chapter 11, page 120). PWM scaling is adapted linearly, which
depends on the internal ramp velocity. During Voltage PWM mode the scaling value
at
VACTUAL
= 0 must be assigned, and also the velocity at which full scaling is
reached.
In order to generate a scaled PWM output, do as follows:
Action:
Set
PWM_AMPL
(bit31:16 of register 0x05) as start PWM scaling value.
Set
PWM_VMAX
register 0x17 to the internal ramp velocity [pps] at which full PWM
scaling is reached.
Set
pwm_scale
= 1 (bit8 of
CURRENT_CONF
register 0x05).
Result:
PWM_SCALE is the actual scaling value.
In case
VACTUAL
= 0, PWM_SCALE = (
PWM_AMPL
+ 1) / 2
17
.
i Whenever the absolute velocity value increases, the scale parameter also
increases linearly until it reaches the maximum of PWM_SCALE = 0.5 at
VACTUAL
=
PWM_VMAX
.
i The minimum duty cycle is calculated by DUTY_MIN = (0.5 PWM_SCALE).
i The maximum duty cycle is calculated by
DUTY_MAX = (0.5 + PWM_SCALE).
i These values set the PWM duty cycle limits of any internal ramp velocity.
Enable PWM
Output
Generation
NOTICE
PWM Duty Cycle
Scaling