Pins of the SPI

The SPI consists of four different signal lines. These lines are the shift clock (SCK), the Master Out Slave In line (MOSI), the Master In Slave Out line (MISO) and the active low Slave Select line (SS). When the SPI is enabled, the data direction of the MOSI, MISO, SCK, and SS pins are overridden according to the following table.
Table 1. SPI Pin Overrides
Pin Direction Master Mode Direction Slave Mode
MOSI User Defined Input
MISO Input User Defined
SCK User Defined Input
SS User Defined Input

This table shows that the input pins are automatically configured. The output pins must be initialized manually by the software. The reason for this is to avoid damages through driver contention.