DolphinV4 API  1.6.1.0
spi
Collaboration diagram for spi:

Modules

 SPI config parameters
 SPI structures and constants
 SPI functions

Detailed Description

The SPI module is used for communication between the DOLPHIN IC and a HOST using the SPI protocol. The SPI module supports communication where the DOLPHIN acts as SPI-Master and the HOST acts SPI-Slave.

The SPI module supports packet transmission. The size of one packet can be 1,2,3 or 4 bytes. The CS can't be modified during packet transmission. The maximum speed of one packet transmission is 2Mbit. Between two packets a certain processing delay is needed called interpacket delay. size of the interpacket delay depends on the following factors:

The interpacket delay + the packet transmission speed gives the real SPI communication speed. The following table shows the real SPI speed for different packet size @ 2MHz packet clock speed.

spispeed.PNG
SPI Tx speed @ 2MHz SPI clock and different packet size and duplex mode and worst case interrupt calculation



The initialization of the SPI module is done through Dolphin APIConfigurator. The generated settings are saved to the file EO3100I_CFG.h.

The SPI interfaces uses the following pins:



There are two possibilities how control CS (configured with spi_init with the parameters).

To manualy controll the CS the function spi_setCS is used. In automatic CS the CS raised and lowered between each packet automaticly.

spi_arch.PNG
SPI initialization between DOLPHIN and HOST
Note:
In order to determine the real SPI communication speed, be sure to measure the interpacket delay for data that is larger than 4 byte and also calculate with the duration of interrupts that can make the interpacket delay larger.
Be sure when using both SPI and UART module that the UART module is not configured for pins WSDADIO2, RSDADIO3.