3.2.6.6.2 SPI Bus Distribution

The SAMA7G54-EK features two dedicated SPIs to access the on-board devices.

The Serial Peripheral Interface (SPI) circuit is a synchronous serial data link that provides communication with external devices in Host or Client mode. It also enables communication between processors if an external processor is connected to the system.

The SPI system consists of two data lines and two control lines:

  • Host Out Client In (MOSI)—This data line supplies the output data from the host shifted into the input(s) of the client(s).
  • Host In Client Out (MISO)—This data line supplies the output data from a client to the input of the host. There may be no more than one client transmitting data during any particular transfer.
  • Serial Clock (SPCK)—This control line is driven by the host and regulates the flow of the data bits. The host can transmit data at a variety of baud rates; there is one SPCK pulse for each bit that is transmitted.
  • Client Select (NSS)—This control line allows clients to be turned on and off by hardware.
The first interface is used to access the following devices:
  • Any device placed on the mikroBUS 1 connector. Flexcom11 in SPI mode is used to address this interface. Chip Select 0 is used to select the device available in this interface.
  • Any device placed on the mikroBUS 2 connector. Flexcom11 in SPI mode is used to address this interface. Chip Select 1 is used to select the device available in this interface.
Figure 3-23. First SPI Distribution Schematic
Table 3-10. First SPI PIO Assignments
PIOMPU Net NameDevice Net NameFunction
PB3FLEXCOM11_IO0_PB3MIKROBUS1_MOSI_PB3SPI MOSI line mikroBUS 1
MIKROBUS2_MOSI_PB3SPI MOSI line mikroBUS 2
PB4FLEXCOM11_IO1_PB4MIKROBUS1_MISO_PB4SPI MISO line mikroBUS 1
MIKROBUS2_MISO_PB4SPI MISO line mikroBUS 2
PB5FLEXCOM11_IO2_PB5MIKROBUS1_SCK_PB5SPI clock line mikroBUS 1
MIKROBUS2_SCK_PB5SPI clock line mikroBUS 2
PB6MIKROBUS1_CS_PB6MIKROBUS1_CS_PB6SPI Chip Select 0 mikroBUS 1
PB7MIKROBUS2_CS_PB7MIKROBUS2_CS_PB7SPI Chip Select 1 mikroBUS 2

The second interface is used to access the following devices either in SPI mode or in USART mode:

  • Any device placed on the RPi 40-pin connector. Flexcom0 in SPI mode is used to address this interface. Chip Select 0 and Chip Select 1 are used to select the device(s) available in this interface.
  • WILC3000 USART interface. Flexcom0 is used in USART mode.
  • Note: Only IO0, IO1, IO3 and IO4 are shared between these two interfaces. IO2 (clock) is reserved to SPI mode only.
Figure 3-24. Second SPI Distribution Schematic
Table 3-11. Second SPI PIO Assignment
PIOMPU Net NameDevice Net NameFunction
PE3PE3EXT40_SPI1_MOSI_PE3SPI MOSI line RPi 40-pin connector
BT_RX_FLEXCOM0_IO0_PE3WILC3000 USART RX line
PE4PE4EXT40_SPI1_MISO_PE4SPI MISO line RPi 40-pin connector
BT_TX_FLEXCOM0_IO1_PE4WILC3000 USART TX line
PE6PE6EXT40_SPI1_CE0_PE6SPI Chip Select 0 RPi 40-pin connector
BT_RTS_FLEXCOM0_IO3_PE6WILC3000 USART RTS line
PE7PE7EXT40_SPI1_CE1_PE7SPI Chip Select 1 RPi 40-pin connector
BT_CTS_FLEXCOM0_IO4_PE7WILC3000 USART CTS line
PE5EXT40_SPI1_SCLK_PE5EXT40_SPI1_SCLK_PE5SPI clock line RPi 40-pin connector