
SPI protocol
SN260
7.5.1
Primary SPI bytes
There are four primary SPI bytes: SPI protocol version, SPI status, Bootloader frame and
EZSP frame.
●
SPI protocol version [0x0A]: Sending this command requests the SPI Protocol
Version number from the SPI Interface. The response will always have bit 7 set and bit
6 cleared. In this current version, the response will be 0x82, since the version number
corresponding to this set of Command-Response values is version number 2. The
version number can be a value from 1 to 63 (0x81–0xBF).
●
SPI status [0x0B]: Sending this command asks for the SN260 status. The response
status byte will always have the upper 2 bits set. In this current version, the status byte
only has one status bit [0], which is set if the SN260 is alive and ready for commands.
●
Bootloader frame [0xFD]: This byte indicates that the current transaction is a
Bootloader transaction and there is more data to follow. This SPI Byte will cause the
transaction to look like the full data format illustrated in Figure 8. The byte immediately
after this SPI Byte will be a Length Byte, and it is used to identify the length of the
Bootloader Frame. Refer to the EmberZNet Application Developer’s Guide (120-4028-
000) for more information on the bootloader. If the SPI Byte is 0xFD, it means the
minimum transaction size is four bytes.
●
EZSP frame [0xFE]: This byte indicates that the current transaction is an EZSP
transaction and there is more data to follow. This SPI Byte will cause the transaction to
look like the full data format illustrated in Figure 8. The byte immediately after this SPI
Byte will be a Length Byte, and it is used to identify the length of the EZSP Frame. (The
EZSP Frame is defined in the EZSP Reference Guide, 120-3009-000.) If the SPI Byte
is 0xFE, it means the minimum transaction size is five bytes
Any
0x03
Missing Frame Terminator—This is never used in another
response; it always indicates a missing frame terminator in
the command.
Any
0x04
Unsupported SPI Command—This is never used in another
Response; it always indicates an unsupported SPI Byte in
the command.
0x00 –
0x0F
Reserved
[none]
0x0A
SPI
Protocol
Version
0x81 –
0xBF
bit[7] is always set. bit[6] is always cleared. bit[5:0] is a
number from 1–63.
0x0B
SPI Status
0xC0 –
0xC1
bit[7] is always set. bit[6] is always set. bit[0]—Set if Alive.
0xF0 –
0xFC
Reserved
[none]
0xFD
Bootloader
Frame
0xFD
Bootloader frame
0xFE
EZSP
Frame
0xFE
EZSP frame
0xFF
Invalid
0xFF
Invalid
Table 8.
SPI commands & responses (continued)
Command
value
Command
Response
value
Response