GD32A50x User Manual
560
Figure 21-13. Timing diagram of quad read operation in Quad-SPI mode
MOSI
MISO
D0[4]
D0[0]
D1[4]
D1[0]
D0[5]
D0[1]
D1[5]
D1[1]
sample
IO2
IO3
D0[6]
D0[2]
D1[6]
D1[2]
D0[7]
D0[3]
D1[7]
D1[3]
TBE
Software writes SPI_DATA
Hardware sets TBE
RBNE
Software reads
SPI_DATA
Software writes
SPI_DATA
SCK
SPI disabling sequence
Different sequences are used to disable the SPI in different operation modes.
MFD SFD
Wait for the last RBNE flag and then receive the last data. Confirm that TBE=1 and TRANS=0.
At last, disable the SPI by clearing SPIEN bit.
MTU MTB STU STB
Write the last data into SPI_DATA and wait until the TBE flag is set and then wait until the
TRANS flag is cleared. Disable the SPI by clearing SPIEN bit.
MRU MRB
After getting the second last RBNE flag, read out this data and delay for a SCK clock time
and then, disable the SPI by clearing SPIEN bit. Wait until the last RBNE flag is set and read
out the last data.
SRU SRB
Application can disable the SPI when it doesn’t want to receive data, and then wait until the
TRANS=0 to ensure the ongoing transfer completes.
TI mode
The disabling sequence of TI mode is the same as the sequences described above.
NSS pulse mode
The disabling sequence of NSSP mode is the same as the sequences described above.