Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
519
/
631
duplex mode
Slave two-wire one-way send-only mode (SPI_CTRL1.MSEL = 0, SPI_CTRL1.BIDIRMODE = 0 and
SPI_CTRL1.RONLY = 0)
Figure 24-9 Schematic diagram of TE/BUSY change during continuous transmission in slave unidirectional transmit-only
mode
Slave two-wire one-way receive-only mode (SPI_CTRL1.MSEL = 0, SPI_CTRL1.BIDIRMODE = 0 and
SPI_CTRL1.RONLY = 1)
The data receiving process begins when the slave device receives the clock signal and the first data bit from the
b0
b2
b1
b3
b4
b6
b5
b0
b7
b1
b2
b3
b5
b4
b6
b7
b1
b0
b3
b2
b4
b5
b7
b6
DATA1=0x11
DATA2=0x22
DATA3=0x33
b0
b2
b1
b3
b4
b6
b5
b0
b7
b1
b2
b3
b5
b4
b6
b7
b1
b0
b3
b2
b4
b5
b7
b6
DATA1=0xAA
DATA2=0xBB
DATA3=0xCC
SCK
MISO/MOSI
(out)
TE flag
Tx buffer
(
write to SPI_DAT
)
BUSY flag
MISO/MOSI
(
in
)
RNE flag
Rx buffer
(
read from SPI_DAT
)
Slave mode
:
CLKPOL=1.CLKPHA=1
The flag set/clear by hardware
Set by hardware
Clear by software
0xAA
0xBB
0xCC
Set by hardware
Clear by software
Write 0x11 into SPI_DAT
Wait until TE=1,write 0x22 into SPI_DAT
Wait until RNE=1,read 0xAA from SPI_DAT
Wait until TE=1,write 0x33 into SPI_DAT
Wait until RNE=1,read 0xBB from SPI_DAT
Wait until RNE=1,read 0xCC from SPI_DAT
0x22
0x33
0x11
b0
b2
b1
b3
b4
b6
b5
b0
b7
b1
b2
b3
b5
b4
b6
b7
b1
b0
b3
b2
b4
b5
b7
b6
DATA1=0x11
DATA2=0x22
DATA3=0x33
SCK
MISO/MOSI
(out)
TE flag
Tx buffer
(
write to SPI_DAT
)
BUSY flag
Slave mode
:
CLKPOL=1.CLKPHA=1
The flag set/clear by hardware
Set by hardware
Clear by software
Write 0x11 into SPI_DAT
Wait until TE=1,write 0x22 into SPI_DAT
Wait until TE=1,write 0x33 into SPI_DAT
0x22
0x33
0x11
Wait TX=1
Wait BUSY=0