AT32F425
Series Reference Manual
2022.03.30
Page 169
Ver 2.01
Receiver configuration procedure:
Configure full-duplex/half-duplex selector
Configure chip select controller
Configure SPI_SCK controller
Configure CRC (if necessary)
Configure DMA transfer (if necessary)
If the DMA transfer mode is not used, the software will check whether to enable receive data
interrupt (RDBEIE =1) through the RDBE bit.
Configure frame format: select MSB/LSB mmode with the LTF bit, and select 8/16-bit data with
the FBN bit
Enable SPI by setting the SPIEN
13.2.10 Motorola mode
This section describes the SPI communication timings, which includes full-duplex and half-duplex
master/slave timings.
Full-duplex communication – master mode
Configured as follows:
MSTEN=1: Master enable
SLBEN=0: Full-duplex 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
Slave transmit (MISO): 0xcc, 0xaa, 0xcc
Figure 13-6 Master 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
Software needs to read the
received data
Transmit buffer empty and
software can write data
Full-duplex communication – slave mode
Configured as follows:
MSTEN=0: Slave enable
SLBEN=0: Full-duplex 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
Slave transmit (MISO): 0xcc, 0xaa, 0xcc