GD32F20x User Manual
548
Master mode
In master mode (MSTMOD=1) if the application uses multi-master connection, NSS can be
configured to hardware input mode (SWNSSEN=0, NSSDRV=0) or software mode
(SWNSSEN=1). Then, once the NSS pin (in hardware NSS mode) or the SWNSS bit (in
software NSS mode) goes low, the SPI automatically enters to slave mode and triggers a
master fault flag CONFERR.
If the application wants to use NSS line to control the SPI slave, NSS should be configured
to hardware output mode (SWNSSEN=0, NSSDRV=1). NSS stays high after SPI is enabled
and goes low when transmission or reception process begins.
The application may also use a general purpose IO as NSS pin to realize more flexible NSS.
21.5.3.
SPI operation modes
Table 21-3. SPI operation modes
Mode
Description
Register Configuration
Data Pin Usage
MFD
Master Full-Duplex
MSTMOD = 1
RO = 0
BDEN = 0
BDOEN
: Don’t care
MOSI: Transmission
MISO: Reception
MTU
Master Transmission with
unidirectional connection
MSTMOD = 1
RO = 0
BDEN = 0
BDOEN
: Don’t care
MOSI: Transmission
MISO: Not used
MRU
Master
Reception
with
unidirectional connection
MSTMOD = 1
RO = 1
BDEN = 0
BDOEN
: Don’t care
MOSI: Not used
MISO: Reception
MTB
Master Transmission with
bidirectional connection
MSTMOD = 1
RO = 0
BDEN = 1
BDOEN = 1
MOSI: Transmission
MISO: Not used
MRB
Master
Reception
with
bidirectional connection
MSTMOD = 1
RO = 0
BDEN = 1
BDOEN = 0
MOSI: Reception
MISO: Not used
SFD
Slave Full-Duplex
MSTMOD = 0
RO = 0
BDEN = 0
BDOEN
: Don’t care
MOSI: Reception
MISO: Transmission
STU
Slave Transmission with
MSTMOD = 0
MOSI: Not used
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...