![GigaDevice Semiconductor GD32F20 Series Скачать руководство пользователя страница 553](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801553.webp)
GD32F20x User Manual
553
Figure 21-8. Timing diagram of quad write operation in Quad-SPI mode
D1[5]
D1[4]
D1[6]
D1[7]
D1[0]
D1[1]
D1[2]
D1[3]
SCK
MOSI
MISO
IO2
IO3
TBE
D2[4]
D2[6]
D2[7]
D2[0]
D2[1]
D2[2]
D2[3]
D2[5]
Software Write
SPI_DATA
Hadware Sets TBE again
Quad read operation
SPI works in quad read mode when QMOD and QRD are both set in SPI_QCTL register. In
this mode, MOSI, MISO, IO2 and IO3 are all used as input pins. SPI begins to generate clock
on SCK line as soon as a data is written into SPI_DATA (TBE is cleared) and SPIEN is set.
Writing data into SPI_DATA is only to generate SCK clocks, so the written data can be any
value. Once SPI starts transmission, it always checks SPIEN and TBE status at the end of a
frame and stops when condition is not met. So, software should always write dummy data
into SPI_DATA to make SPI generate SCK.
The operation flow for receiving in quad mode:
1.Configure clock prescaler, clock polarity, phase, etc. in SPI_CTL0 and SPI_CTL1 register
based on your application requirements.
2.Set QMOD and QRD bits in SPI_QCTL register and then enable SPI by setting SPIEN in
SPI_CTL0 register.
3.Write an arbitrary byte (for example, 0xFF) to SPI_DATA register.
4.Wait until the RBNE flag is set and read SPI_DATA to get the received byte.
5.Write an arbitrary byte (for example, 0xFF) to SPI_DATA to receive the next byte.
Содержание GD32F20 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F20x ARM Cortex M3 32 bit MCU User Manual Revision 2 2 Oct 2019 ...
Страница 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Страница 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Страница 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Страница 385: ...GD32F20x User Manual 385 ...
Страница 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...