![ST L6470H Скачать руководство пользователя страница 55](http://html1.mh-extra.com/html/st/l6470h/l6470h_manual_1355485055.webp)
L6470
Programming manual
Doc ID 16737 Rev 2
55/64
9.2.5
Run (DIR, SPD)
The Run command produces a motion at SPD speed; the direction is selected by DIR bit: '1'
forward or '0' reverse. The SPD value is expressed in step/tick (format unsigned fixed point
0.28) that is the same format that SPEED register (see paragraph 9.1.4).
Note:
The SPD value should be lower than MAX_SPEED and greater than MIN_SPEED
otherwise the Run command will be executed at MAX_SPEED or MIN_SPEED respectively.
This command can be given anytime and is immediately executed.
9.2.6 StepClock
(DIR)
The StepClock command switches the device in step clock mode (see paragraph
) and
impose the forward (DIR = '1') or reverse (DIR = '0') direction.
When the device is in step clock mode the SCK_MOD flag in STATUS register is raised and
the motor is always considered stopped (see paragraphs
).
Device exits from step clock mode when a constant speed, absolute positioning or motion
command is sent through SPI. Motion direction is imposed by the respective StepClock
command argument and can by changed by a new StepClock command without exiting the
step clock mode.
Events that cause bridges to be forced in high impedance state (overtemperature,
overcurrent, etc.) do not cause the device to leave step clock mode.
This command can only be given when the motor is stopped. If a motion is in progress the
motor should be stopped and then it is possible to send a StepClock command.
Any attempt to perform a StepClock command when the motor is running causes the
command to be ignored and the NOTPERF_CMD flag to rise (see paragraph
).
Table 40.
Run command structure
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
1
0
1
0
0
0
DIR
from host
X
X
X
X
SPD (Byte 2)
from host
SPD (Byte 1)
from host
SPD (Byte 0)
from host
Table 41.
Stepclock command structure
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
1
0
1
1
0
0
DIR
from host