Article How to configure the TMC5160 and TMC5130 for DC Motor Configuration

Configuration of TMC5160 or TMC5130 for DCMotor operation
 
Please set: 
GCONF:
direct_mode=1
en_pwm_mode = 1
 
PWM_CONF:
pwm_autoscale = 0, PWM_OFS = 255, PWM_GRAD = 4
 
IRUN_IHOLD:
IHOLD = 31
 
Enable driver by writing CHOPCONF.TOFF=5.
 
Now operate both motors on coil outputs A and B:
XTARGET (0x2D). Bits 8..0 control motor A and Bits 24..16 control motor B PWM.
 
Setting the corresponding PWM bits between -255 and +255 (signed, two’s complement numbers) will vary motor voltage from -100% to 100%.

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.