In Master mode, the Slave Select Disable bit in Control Register B (SSD bit in SPIn.CTRLB) controls how the SPI uses the SS line.
If SSD in SPIn.CTRLB is ‘0’, the SPI can use the SS pin to transition from Master to Slave mode. This allows multiple SPI masters on the same SPI bus.
If SSD in SPIn.CTRLB is ‘1’, the SPI does not use the SS pin, and it can be used as a regular I/O pin, or by other peripheral modules.
If SSD in SPIn.CTRLB is ‘0’ and the SS is configured as an output pin, it can be used as a regular I/O pin or by other peripheral modules, and will not affect the SPI system.
| SS Configuration | SS Pin-Level | Description |
|---|---|---|
| Input | High | Master activated (selected) |
| Low | Master deactivated, switched to Slave mode | |
| Output | High | Master activated (selected) |
| Low |
If the AVR device is configured for Master mode and it cannot be ensured that the SS pin will stay high between two transmissions, the status of the Master bit (the MASTER bit in SPIn.CTRLA) has to be checked before a new byte is written. After the Master bit has been cleared by a low level on the SS line, it must be set by the application to re-enable the SPI Master mode.