![ARTERY AT32WB415 Series Скачать руководство пользователя страница 149](http://html1.mh-extra.com/html/artery/at32wb415-series/at32wb415-series_reference-manual_2977599149.webp)
AT32WB415
Series Reference Manual
2022.04.13
Page 149
Ver 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 Functional 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.
SPI block diagram:
Figure 13-1
SPI block diagram
SPI_SCK controller
SPI_STS
BF
ROE
RR
MM
ERR
CCE
RR
TUE
RR
ACS
TDB
E
RDB
F
Communication controller
CS
controlle
r
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/H
arf-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 (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)
Programmable clock plarity and phase