GD32F403xx User Manual
465
Figure 19-9. Timing diagram of TI master mode with continuous transfer
D[7]
D[6]
D[5]
D[4]
D[3]
D[2]
D[1]
D[0]
D[7]
D[6]
D[5]
D[4]
D[3]
D[2]
D[1]
D[0]
D[7]
D[6]
D[5]
D[4]
D[3]
D[2]
D[1]
D[0]
D[7]
D[6]
D[5]
D[4]
D[3]
D[2]
D[1]
D[0]
SCK
NSS
MOSI
MISO
sample
In master TI mode, SPI can perform continuous or non-continuous transfer. If the master
writes SPI_DATA register fast enough, the transfer is continuous, otherwise non-continuous.
In non-continuous transfer there is an extra header clock cycle before each byte. While in
continuous transfer, the extra header clock cycle only exists before the first byte and the
following bytes’ header clock is overlaid at the last bit of pervious bytes.
Figure 19-10. Timing diagram of TI slave mode
D[7]
D[6]
D[5]
D[4]
D[3]
D[2]
D[1]
D[0]
D[7]
D[6]
D[5]
D[4]
D[3]
D[2]
D[1]
D[0]
SCK
NSS
MOSI
MISO
sample
Td
In Slave TI mode, after the last rising edge of SCK in transfer, the slave begins to transmit the
LSB bit of the last data byte, and after a half-bit time, the master begins to sample the line.
To make sure that the master samples the right value, the slave should continue to drive this
bit after the falling sample edge of SCK for a period of time before releasing the pin. This time
is called
𝑇
𝑑
.
𝑇
𝑑
is decided by PSC [2:0] bits in SPI_CTL0 register.
𝑇
𝑑
=
T
bit
2
+ 5 ∗ T
pclk
(21-1)
For example, if PSC[2:0] = 010,
𝑇
𝑑
is 9*Tpclk.
In slave mode, the slave also monitors the NSS signal and sets an error flag FERR if it detects
an incorrect NSS behavior, for example: toggles at the middle bit of a byte.
NSS pulse mode operation sequence
This function is controlled by NSSP bit in SPI_CTL1 register, for this function to fully take
place, several additional conditions must be met, users must also set the device into master
Содержание GD32F403 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F403xx Arm Cortex M4 32 bit MCU User Manual Revision 2 6 Jul 2022 ...
Страница 177: ...GD32F403xx UserManual 177 Peripheral Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 SDIO SDIO ...
Страница 217: ...GD32F403xx UserManual 217 ensures that no conversion is in progress ...