
GD32L23x User Manual
549
2
MSTMOD
Master mode enable
0: Slave mode
1: Master mode
1
CKPL
Clock polarity selection
0: CLK pin is pulled low when SPI is idle.
1: CLK pin is pulled high when SPI is idle.
0
CKPH
Clock phase selection
0: Capture the first data at the first clock transition.
1: Capture the first data at the second clock transition.
22.11.2.
Control register 1 (SPI_CTL1)
Address offset: 0x04
Reset value: 0x0000 0700 for SPI0, 0x0000 0000 for SPI1
This register can be accessed by half-word (16-bit) or word (32-bit).
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Reserved
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Reserved
TXDMA_
ODD
RXDMA_
ODD
BYTEN
DZ[3:0]
TBEIE
RBNEIE
ERRIE
TMOD
NSSP
NSSDRV DMATEN DMAREN
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
Bits
Fields
Descriptions
31:15
Reserved
Must be kept at reset value.
14
TXDMA_ODD
Odd bytes in TX DMA channel (only for SPI0)
In data packing mode, this bit is set if the total number of data to transmit by DMA
is odd. It has effect only when DMATEN is set and data packing mode enable (data
size is less than or equal to 8-bit and write access to SPI_DATA is 16-bit wide).
This field can be written only when SPI is disabled.
0: The total number of data to transmit by DMA is even.
1: The total number of data to transmit by DMA is odd.
13
RXDMA_ODD
Odd bytes in RX DMA channel (only for SPI0)
In data packing mode, this bit is set if the total number of data to receive by DMA is
odd. It has effect only when DMAREN is set and data packing mode enable (data
size is less than or equal to 8-bit and write access to SPI_DATA is 16-bit wide).
This field can be written only when SPI is disabled.
0: The total number of data to receive by DMA is even.
1: The total number of data to receive by DMA is odd.
12
BYTEN
Byte access enable (only for SPI0)