AT32F421
Series Reference Manual
2022.11.11
Page 156
Rev 2.02
Figure 13-7 Slave full-duplex communications
SCK
MISO
TDBE flag
BF flag
CS
MOSI
RDBF flag
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
Sampling
Drive
Transmit buffer empty and
software can write data
Software needs to read the
received data
Half-duplex communication – master transmit
Configured as follows:
MSTEN=1: Master enable
SLBEN=1: Single line bidirectional mode
CLKPOL=0, CLKPHA=0: SCK idle output low, use the first edge for sampling
FBN=0: 8-bit frame
Master transmit (MOSI): 0xaa, 0xcc, 0xaa
Figure 13-8 Slave full-duplex communications
SCK
BF flag
CS
MOSI
1
0
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
TDBE flag
Drive
Transmit buffer empty and
software can write data
Half-duplex communication – slave receive
Configured as follows:
MSTEN=0: Slave enable
SLBEN=1: Single line bidirectional mode
SLBTD=0: Receive mode
CLKPOL=0, CLKPHA=0: SCK idle output low, use the first edge for sampling
FBN=0: 8-bit frame
Slave receive: 0xaa, 0xcc, 0xaa
Figure 13-9 Slave half-duplex receive
RDBF flag
SCK
CS
MISO
1
0
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
BF flag
Software needs to read the
received data
Half-duplex communication – slave transmit
Configured as follows:
MSTEN=0: Slave enable
SLBEN=1: Single line bidirectional mode
SLBTD=1: Transmit enable