![PMD Atlas Compact Скачать руководство пользователя страница 90](http://html1.mh-extra.com/html/pmd/atlas-compact/atlas-compact_complete-technical-reference_1569420090.webp)
SPI Communications
90
Atlas® Digital Amplifier Complete Technical Reference
5
5.6
Sending Atlas Commands
Header communication transactions, described in the preceding sections, always consist of two 16-bit words. As such,
they are well suited to high speed operations such as continuously sending desired torque commands.
In addition to header communications however, Atlas supports an extensive command set that specifies and queries
a much larger number of registers and parameters. Throughout this manual we have illustrated the use of this
command set with mnemonics, for example the commands
SetOperatingMode
or
GetEventAction
.
Access to this full Atlas command set is supported within the SPI protocol using the command words shown in
. Commands are split into two overall groups, those that specify information to Atlas, and those that query
information from Atlas. Processing of each type is somewhat different, and the following sections will describe both
of these types of command operations.
5.6.1
Sending an Atlas Command
Figure 5-5:
Send
Command
Format
shows the overall format for commands that request an action or specify data to Atlas.
The associated data fields begin at the third word of the overall SPI packet and consist of a checksum byte, an opcode
byte, and one or more argument data words.
The checksum is calculated by ones-complement adding a byte value of 0xAA and all bytes of all words of the
command including the opcode and argument words, but not including any data words in the header. When evaluated,
this checksum should give a value of 0xFF for the checksum.
Each separate command mnemonic supported by Atlas is encoded with a unique 8 bit opcode. These opcodes, along
with the argument fields of the command data word, are listed in Chapter 6, the
Programmer Command Reference
. Users
familiar with PMD’s Magellan, Navigator, or 1st generation motion processor products will note that the overall
format of these commands are very similar to those products.
Controller word 0
checksum
opcode
Atlas word 0
0
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Controller word 1
argument word 0
Atlas word 1
0
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Controller word 2
argument word 1
Atlas word 2
0
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Controller word 3
argument word 2
Atlas word 3
0
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0