
SN260
SPI protocol
7.5.2
Special response bytes
There are only five SPI Byte values, 0x00-0x04, ever used as error codes (see
Table 9).
When the error condition occurs, any command sent to the SN260 will be ignored and
responded to with one of these codes. These special SPI Bytes must be trapped and dealt
with. In addition, for each error condition the Error Byte (instead of the Length Byte) is also
sent with the SPI Byte.
7.6
Powering on, power cycling, and rebooting
When the Host powers on (or reboots), it cannot guarantee that the SN260 is awake and
ready to receive commands. Therefore, the Host should always perform the Wake SN260
handshake to guarantee that the SN260 is awake. If the SN260 resets, it needs to inform the
Host so that the Host can reconfigure the stack if needed.
When the SN260 resets, it will assert the nHOST_INT signal, telling the Host that it has
data. The Host should request data from the SN260 as usual. The SN260 will ignore
whatever command is sent to it and respond only with two bytes. The first byte will always be
0x00
and the second byte will be the reset type as defined by EmberResetType. This
specialty SPI Byte is never used in another Response SPI Byte. If the Host sees 0x00 from
the SN260, it knows that the SN260 has been reset. The SN260 will de-assert the
nHOST_INT signal shortly after receiving a byte on the SPI and process all further
commands in the usual manner. In addition to the Host having control of the reset line of the
SN260, the EmberZNet Serial Protocol also provides a mechanism for a software reboot.
7.6.1
Bootloading the SN260
The SPI Protocol supports a Payload Frame called the Bootloader Frame for communicating
with the SN260 when the SN260 is in bootloader mode. The SN260 can enter bootload
mode through either an EZSP command or holding one of two pins low while the SN260
exits reset. Both the nWAKE pin and the PTI_DATA pin are capable of activating the
bootloader while performing a standard SN260 reset procedure. Assert nRESET to hold the
Table 9.
Byte values used as error codes
SPI byte
value
Error message
Error description
Error byte description
0x00
SN260 Reset
The reset type. Refer to the API
documentation discussing
EmberResetType.
0x01
Oversized EZSP
Frame
The command contained an EZSP frame with
a Length Byte greater than 133. The SN260
was forced to drop the entire command.
Reserved
0x02
Aborted
Transaction
The transaction was not completed properly
and the SN260 was forced to abort the
transaction.
Reserved
0x03
Missing Frame
Terminator
The command was missing the Frame
Terminator. The SN260 was forced to drop the
entire command.
Reserved
0x04
Unsupported SPI
Command
The command contained an unsup-ported SPI
Byte. The SN260 was forced to drop the entire
command.
Reserved