![GigaDevice Semiconductor GD32E23 Series User Manual Download Page 501](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794501.webp)
GD32E23x User Manual
501
RXFIFO level is less than half of its capacity. The meaning of RXFIFO full is the opposite. If
the RXFIFO empty or full appears below and
there is no special explanation, the meaning is
the same as that described here.
Data merging (Only for SPI1)
When DZ[3:0] in the SPI_CTL1 register configures the transmission data bit width to be 8
bits or less than 8 bits, by configuring the BYTEN bit in the SPI_CTL1 register to 0, the data
merge transmission mode function is enabled. When DZ[3:0] in the configuration SPI_CTL1
register configures the transmission data bit width to be less than or equal to 8 bits, this
function can realize that when 16-bit write access is performed to the SPI_DATA register,
two data frames are sent in parallel instead of serial line method.
Similarly, at the receiving end, the receiver obtains these two data frames through a 16-bit
read access to SPI_DATA, and only one RBNE event will be generated when the two frames
of data are received.
Note:
when an odd number of data bytes will be transferred, on the transmitter side, writing
the last data frame of any odd sequence with an 8-bit access to SPI_DATA is enough. The
receiver has to change BYTEN for the last data frame received in the odd sequence of
frames in order to generate the RBNE event.
18.3.5.
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.
Table 18-3. NSS function in slave mode
Mode
Register configuration
Description
Slave hardware NSS mode
MSTMOD = 0
SWNSSEN = 0
SPI slave gets NSS level from NSS pin.
Slave software NSS mode
MSTMOD = 0
SWNSSEN = 1
SPI slave NSS level is determined by
the SWNSS bit.
SWNSS = 0: NSS level is low
SWNSS = 1: NSS level is high
Master mode
In master mode (MSTMOD=1) if the application uses multi-master connection, NSS can be
configured to hardware input mode (SWNSSEN=0, NSSDRV=0) or software mode