Datasheet

TMC223 DATASHEET (V. 1.00 / May 3rd, 2007) 35
Copyright © 2007 TRINAMIC Motion Control GmbH & Co. KG
6.8.9 SetMotorParam
This command is provided to the circuit by the Master to set the values for the following stepper motor
parameters in RAM:
coil peak current value (Irun)
coil hold current value (Ihold)
maximum velocity for the Stepper-motor (Vmax)
minimum velocity for the Stepper-motor (Vmin)
acceleration shape (AccShape)
stepping mode (StepMode)
direction of the Stepper-motor motion (Shaft)
acceleration (deceleration) for the Stepper-motor (Acc)
secure position for the Stepper-motor (SecPos)
PWM frequency selection (PWMfreq)
PWM jitter enable (PWMJEn) for low EMI
If SecPos[10:0] is set to 0x400 (the most negative decimal value of –1024) the secure position is
disabled and the GotoSecurePosition command is ignored.
SetMotorParam command
Structure Byte Content
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
0 Slave Address 1 1 OTP3 OTP2 OTP1 OTP0 HW 0
1 SetMotorParam 1 0 0 0 1 0 0 1
2 N/A 1 1 1 1 1 1 1 1
3 N/A 1 1 1 1 1 1 1 1
4 Irun & I hold Irun(3:0) Ihold(3:0)
5 Vmax & Vmin Vmax(3:0) Vmin(3:0)
6 Status SecPos(10:8) Shaft Acc(3:0)
7 SecurePos SecPos(7:0)
8 StepMode etc. 1
PWMfreq
1 AccShape StepMode[1:0] 1
PWMJEn
Note: N/A = not applicable
6.8.10 SetStallParam
This command sets the relevant parameters for the sensorless stall detection. A description with an
example, how to find a set of parameters for stall detection is given in section 7, page 39.
SetStallParam command
Structure Byte Content
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
0 Slave Address 1 1 OTP3 OTP2 OTP1 OTP0 HW 0
1 SetStallParam 1 0 0 1 0 1 1 0
2 N/A 1 1 1 1 1 1 1 1
3 N/A 1 1 1 1 1 1 1 1
4 Irun & I hold Irun(3:0) Ihold(3:0)
5 Vmax & Vmin Vmax(3:0) Vmin(3:0)
6 MinSamples(2:0) Shaft Acc(3:0)
7 AbsThr(3:0) DelThr(3:0)
8 StepMode FS2StallEN(2:0) AccShape StepMode[1:0]
DC100En PWMJEn
Note: The PWMfreq selection bit set via SetMotorParam has to be taken into account for MinSamples