GD32F10x User Manual
485
Pin name
Direction
Description
application.
Slave in hardware NSS mode: NSS input, as a chip select
signal for slave.
Note:
The pin as input must be configured as in floating mode.
18.3.3.
SPI clock timing and data format
CKPL and CKPH bits in SPI_CTL0 register decide the timing of SPI clock and data signal.
The CKPL bit decides the SCK level when idle and CKPH bit decides either first or second
clock edge is a valid sampling edge.
Figure 18-2. SPI timing diagram in normal mode
SCK (CKPH=0 CKPL=0)
SCK (CKPH=0 CKPL=1)
SCK (CKPH=1 CKPL=0)
SCK (CKPH=1 CKPL=1)
LF=1
FF16=0
MOSI
MISO
NSS
D[0]
D[1]
D[2]
D[3]
D[4]
D[5]
D[6]
D[7]
sample
D[0]
D[1]
D[2]
D[3]
D[4]
D[5]
D[6]
D[7]
In normal mode, the length of data is configured by the FF16 bit in the SPI_CTL0 register.
Data length is 16 bits if FF16 = 1, otherwise is 8 bits.
Data order is configured by LF bit in SPI_CTL0 register, and SPI will first send the LSB if LF
= 1, or the MSB if LF = 0.
18.3.4.
NSS function
Slave mode
When slave mode is configured (MSTMOD = 0), SPI gets NSS level from NSS pin in hardware
NSS mode (SWNSSEN = 0) or from SWNSS bit in software NSS mode (SWNSSEN = 1) and
transmits / receives data only when NSS level is low. In software NSS mode, NSS pin is not
used.
Содержание GD32F10 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F10x Arm Cortex M3 32 bit MCU User Manual Revision 2 6 Jun 2022 ...
Страница 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Страница 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Страница 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Страница 427: ...GD32F10x User Manual 427 value ...
Страница 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...