AT32F425
Series Reference Manual
2022.03.30
Page 162
Ver 2.01
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 based 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. In the meantime, the SPI interface can be compatible
with the TI protocol through software configurations.
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
MDIV3EN
MDIV[3:0]
CLKPOL
CLKPHA
MSTEN
Transmitter logic
Transmission CRC unit
CCEN
NTC
LTF
SPIEN
FBN
TIEN
MOSI
MISO
SCK
CS
Full-
Duplex/Ha
rf-duplex
selector
Receiver logic
Receipt CRC unit
Receive & transmit date
shift logic
Interrupt generator
ERRIE TEIE RNEIE
LTF
SPIEN
FBN
TIEN
CSPA
S
Main features as SPI:
Full-duplex or half-duplex communication
─
Full-duplex synchronous communication (supporting reception-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 prescalers (Frequency up to 48M, and prescalers up to f
PCLK
/2)