![Microchip Technology ATSAMA5D27-WLSOM1 Скачать руководство пользователя страница 41](http://html1.mh-extra.com/html/microchip-technology/atsama5d27-wlsom1/atsama5d27-wlsom1_manual_1785812041.webp)
The Serial Peripheral Interface is essentially a shift register that serially transmits data bits to other SPI devices.
During a data transfer, one SPI system acts as the “host”' which controls the data flow, while the other devices act
as “clients'' which have data shifted into and out by the host. Different CPUs can take turn being hosts (multiple host
protocol, contrary to single host protocol where one CPU is always the host while all of the others are always clients).
One host can simultaneously shift data into multiple clients. However, only one client can drive its output to write data
back to the host at any given time.
A client device is selected when the host asserts its NSS signal. If multiple client devices exist, the host generates a
separate client select signal for each client (NPCS).
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.
Table 4-5. SPI Interface Configurations
Interface Instance
IO set
Pin #
PIO
Pin Name
Comments
SPI0
1
21
PA14
SPI0_SPCK
SPI0
1
22
PA15
SPI0_MOSI
SPI0
1
23
PA16
SPI0_MISO
SPI0
1
24
PA17
SPI0_NPCS0
SPI0
2
76
PA30
SPI0_NPCS0
SPI0
2
75
PA31
SPI0_MISO
SPI0
2
81
PB00
SPI0_MOSI
SPI0
2
80
PB01
SPI0_SPCK
SPI0
1
18
PC01
SPI1_SPCK
SPI1
1
17
PC02
SPI1_MOSI
SPI1
1
16
PC03
SPI1_MISO
SPI1
1
19
PC04
SPI1_NPCS0
SPI1
1
20
PC05
SPI1_NPCS1
SPI1
1
176
PC06
SPI1_NPCS2
SPI1
1
177
PC07
SPI1_NPCS3
SPI1
3
132
PD25
SPI1_SPCK
SPI1
3
127
PD26
SPI1_MOSI
SPI1
3
123
PD27
SPI1_MISO
SPI1
3
124
PD28
SPI1_NPCS0
SPI1
3
131
PD29
SPI1_NPCS1
SPI1
3
130
PD30
SPI1_NPCS2
SAMA5D27 Wireless SOM1
Functional Description
©
2021 Microchip Technology Inc.
and its subsidiaries
Complete Datasheet
DS60001590D-page 41