
AT32F413
Series Reference Manual
2022.06.27
Page 159
Rev 2.00
13
Serial peripheral interface (SPI)
13.1 SPI introduction
The SPI interace supports either the SPI protocol or the I
2
S protocoal, depending on software
configuration. This chapter gives an introduction of the main features and congiruation procedure of SPI
used as SPI or I
2
S.
13.2 Function overview
13.2.1 SPI description
The SPI can be configured as host or slave, depending on software configuration, supporting full-duplex,
reception-only full-duplex and transmission-only/reception-only half-duplex modes, DMA transfer, and
automatic CRC function of SPI internal hardware.
SPI block diagram:
Figure 13-1 SPI block diagram
SPI_SCK controller
SPI_STS
BF
ROE
RR
MME
RR
CCE
RR
TUER
R
ACS
TDBE RDBF
Communication controller
CS
controller
SWCSEN
SWCSIL
SLBEN
SLBTD
ORA
MDIV[3:0]
CLKPOL
CLKPHA
MSTEN
Transmitter logic
Transmission CRC unit
CCEN
NTC
LTF
SPIEN
FBN
MOSI
MISO
SCK
CS
Full-
Duplex/Harf
-duplex
selector
Receiver logic
Receipt CRC unit
Receive & transmit date
shift logic
Interrupt generator
ERRIE TDBEIE RDBFIE
LTF
SPIEN
FBN
Main features as SPI:
Full-duplex or half-duplex communication
─
Full-duplex synchronous communication (select receive-only mode to release IO for
transmission)
─
Half-duplex synchronous communication (transfer direction is configurable: receive or transmit)
Master or slave mode
CS signal processing mode
─
CS signal processing by hardware
─
CS signal processing by software
8-bit or 16-bit frame format
Communication frequency and frequency division factor (max. frequency division factor up to
f
PCLK
/2)