L6482
Programming manual
Doc ID 023768 Rev 1
61/73
9.2.1 Command
management
The host microcontroller can control motor motion and configure the L6482 through a
complete set of commands.
All commands are composed by a single byte. After the command byte, some bytes of
arguments should be needed (see
). Argument length can vary from 1 to 3 bytes.
Figure 25.
Command with 3-byte argument
By default, the device returns an all zero response for any received byte, the only exceptions
are GetParam and GetStatus commands. When one of these commands is received, the
following response bytes represent the related register value (see
). Response
length can vary from 1 to 3 bytes.
Figure 26.
Command with 3-byte response
During response transmission, new commands can be sent. If a command requiring a
response is sent before the previous response is completed, the response transmission is
aborted and the new response is loaded into the output communication buffer (see
).
Figure 27.
Command response aborted
When a byte that does not correspond to a command is sent to the IC it is ignored and the
WRONG_CMD flag in the STATUS register is raised (see
).
S
DI
S
DO
Comm
a
nd
b
yte
Arg
u
ment
b
yte 2
(M
S
B)
Arg
u
ment
b
yte 0
(L
S
B)
Arg
u
ment
b
yte 1
0x00
0x00
0x00
0x00
(from ho
s
t)
(to ho
s
t)
AM15055v1
S
DI
S
DO
Comm
a
nd
b
yte
Re
s
pon
s
e
b
yte 2
(M
S
B)
Re
s
pon
s
e
b
yte 0
(L
S
B)
Re
s
pon
s
e
b
yte 1
0x00
NOP
NOP
NOP
(from ho
s
t)
(to ho
s
t)
AM15056v1
S
DI
S
DO
Comm
a
nd 1
(
3
b
yte re
s
p expected)
Comm
a
nd
3
(2
b
yte re
s
p expected)
Re
s
pon
s
e
b
yte 2
(M
S
B)
Re
s
pon
s
e
b
yte 1
(M
S
B)
Re
s
pon
s
e
b
yte 1
0x00
Comm
a
nd 2
(no re
s
p. expected)
Re
s
pon
s
e
b
yte 0
(L
S
B)
(from ho
s
t)
(to ho
s
t)
Comm
a
nd 4
(no re
s
p. expected)
Comm
a
nd 5
(no re
s
p. expected)
Comm
a
nd 1 re
s
pon
s
e
i
s
ab
orted
AM15057v1