7 SPI Protocol
The main interface of the PL360 device is the SPI port. The PL360 device employs a proprietary protocol to allow the exchange of formatted data with the PL360 Host Controller. The PL360 SPI protocol uses raw bytes exchanged on the SPI bus to form high-level structures like requests and callbacks.
The PL360 SPI protocol consists of two layers:
- Layer 1: bootloader commands to transfer the firmware and configure the PL360 device
- Layer 2: firmware commands to allow the host MCU application to exchange high-level messages (e.g. PLC data transmission or PLC data reception) with the PL360 embedded firmware
The PL360 SPI Protocol is implemented as a command-response transaction and assumes that one part is the master (PL360 Host Controller) and the other one is the slave (PL360 embedded firmware).
The format of Command, Response and Data frames is described in the following subsections. The following points apply:
- There is a response for each command
- Transmitted/received data is divided into packets with variable size
- For a write transaction (slave is receiving data packets), the slave sends a response for each data packet
- For a read transaction (master is receiving data packets), the master does not send any response
- Boot commands require 8-bit transactions. Firmware commands require 16-bit transactions.