
34
TMC222 DATASHEET (V. 1.12 / March 7, 2011)
Copyright 2004-2011 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)
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
Byte
Content
Structure
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
0
Slave Address
1
OTP3
OTP2
OTP1
OTP0
HW
0
1
SetMotorParam
1
0
1
0
1
2
N/A
1
3
N/A
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
AccShape
StepMode[1:0]
Note: N/A = not applicable
6.8.10 SetOTPParam
This command is provided to the circuit by the Master in order to zap the OTP memory. The OTPA
address (OTPA) addresses the OTP word (please refer section 5.2.3, page 21) within the OTP
Memory structure. The Pbit byte represents the bit pattern to be programmed, where a one programs
an un-programmed OTP bit. For example, if one wants to OTP the defaults to Irun := 0xD and Ihold =
0x5, one has to execute the SetOTPParam with OTPA = 0x03 and Pbit := 0xD5. Those OTP bits that
are un-programmed can be programmed to '1' by corresponding Pbit chosen as '1' . For OTP the
supply voltage Vbat has to be within the valid range specified as VbbOTP within Table 21, page 45.
SetOTPParam command
Byte
Content
Structure
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
0
Slave Address
1
OTP3
OTP2
OTP1
OTP0
HW
0
1
SetOTPParam
1
0
1
0
2
N/A
1
3
N/A
1
4
OTP Address
1
OTPA(2:0)
5
Pbit
Pbit(7:0)
Note: N/A = not applicable