Atmel SAM E70 SPI Chip-Select (SPCS) lines

atmelspi

I deliberate the datasheet of Atmel's SAM E70 Cortex-M7 and i have a confusion about SPI.
When SPI is in master mode, it uses NPCS lines for Chip Select (Slave Select). But i can't find a report which explain that those lines used all of them (as outputs) by the peripheral, or there's able to using one of them.
Therefore, it is forced by hardware to make all SPCS lines as outputs in master mode? Or it is possibility to get only one SPCS line, as chip-select, only SPCS0 for example?

By the datasheet:

The SPI operates in Master mode or in Slave mode. The SPI operates in Master mode by writing a 1 to the MSTR bit in the SPI Mode Register (SPI_MR).

  • Pins NPCS0 to NPCS3 are all configured as outputs.
  • The SPCK pin is driven.
  • The MISO line is wired on the receiver input.
  • The MOSI line is driven as an output by the transmitter.

Best Answer

Being an output or an input has nothing to do with what your lines will do if they are configured as Chip selects.

You may either configure them as GPIOs (in which case they have nothing to do with the SPI subsystem) or as SPCS lines (in which case the GPIO configuration becomes irrelevant). Of course you are able to only configure 1 or 2 or 3 chip selects and the other line(s) as GPIOs (inputs or outputs).