Atmel SAM4S-XPLD Atmel ATSAM4S-XPLD ATSAM4S-XPLD Hoja De Datos

Los códigos de productos
ATSAM4S-XPLD
Descargar
Página de 1125
 597
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
32.
Serial Peripheral Interface (SPI)
32.1
Description
The Serial Peripheral Interface (SPI) circuit is a synchronous serial data link that provides communication with external
devices in Master or Slave Mode. It also enables communication between processors if an external processor is
connected to the system.
The Serial Peripheral Interface is essentially a shift register that serially transmits data bits to other SPIs. During a data
transfer, one SPI system acts as the “master”' which controls the data flow, while the other devices act as “slaves'' which
have data shifted into and out by the master. Different CPUs can take turn being masters (Multiple Master Protocol
opposite to Single Master Protocol where one CPU is always the master while all of the others are always slaves) and
one master may simultaneously shift data into multiple slaves. However, only one slave may drive its output to write data
back to the master at any given time.
A slave device is selected when the master asserts its NSS signal. If multiple slave devices exist, the master generates a
separate slave select signal for each slave (NPCS).
The SPI system consists of two data lines and two control lines:
Master Out Slave In (MOSI): This data line supplies the output data from the master shifted into the input(s) of the 
slave(s). 
Master In Slave Out (MISO): This data line supplies the output data from a slave to the input of the master. There 
may be no more than one slave transmitting data during any particular transfer. 
Serial Clock (SPCK): This control line is driven by the master and regulates the flow of the data bits. The master 
may transmit data at a variety of baud rates; the SPCK line cycles once for each bit that is transmitted. 
Slave Select (NSS): This control line allows slaves to be turned on and off by hardware.
32.2
Embedded Characteristics
SPCK is asynchronous to bus/core clock in slave mode
Master Mode can run SPCK up to peripheral clock (bounded by maximum bus clock divided by 2)
Supports communication with serial external devices
Four chip selects with external decoder support allow communication with up to 15 peripherals
Serial memories, such as DataFlash® and 3-wire EEPROMs
Serial peripherals, such as ADCs, DACs, LCD Controllers, CAN Controllers and Sensors
External co-processors
Master or slave serial peripheral bus interface
8- to 16-bit programmable data length per chip select
Programmable phase and polarity per chip select
Programmable transfer delays between consecutive transfers and between clock and data per chip select
Programmable delay between consecutive transfers
Selectable mode fault detection
Connection to PDC channel capabilities optimizes data transfers
One channel for the receiver, one channel for the transmitter