![GigaDevice Semiconductor GD32F20 Series Скачать руководство пользователя страница 550](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801550.webp)
GD32F20x User Manual
550
Figure 21-6. A typical simplex connection (Master: Transmit only, Slave: Receive)
Master
MTU
MISO
MOSI
SCK
NSS
Slave
SRU
MISO
MOSI
SCK
NSS
Figure 21-7. A typical bidirectional connection
Master
MTB/MRB
MISO
MOSI
SCK
NSS
Slave
SRB/STB
MISO
MOSI
SCK
NSS
SPI initialization sequence
Before
transmitting or receiving
data, application should follow the SPI initialization sequence
described below:
1.
If master mode is used, program the PSC [2:0] bits in SPI_CTL0 register to generate
SCK with desired baud rate, otherwise, ignore this step.
2.
Program data format (FF16 bit in the SPI_CTL0 register).
3.
Program the clock timing register (CKPL and CKPH bits in the SPI_CTL0 register).
4.
Program the frame format (LF bit in the SPI_CTL0 register).
5.
Program the NSS mode (SWNSSEN and NSSDRV bits in the SPI_CTL0 register)
according to the application
’s demand as described above in
6.
Configure MSTMOD, RO, BDEN and BDOEN depending on the operation modes
described above.
7.
If Quad-SPI mode is used, set the QMOD bit in SPI_QCTL register. Ignore this step if
Quad-SPI mode is not used.
8.
Enable the SPI (set the SPIEN bit).
Содержание 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 ...