
Rev. 1.00
431 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
20 Serial Peripheral Interface (SPI)
SPI Control Register 1 – SPICR1
This register specifies the SPI parameters including the data length, the transfer format, the SEL active polarity /
mode, the LSB / MSB control and the master / slave mode.
Offset:
0x004
Reset value: 0x0000_0000
31
30
29
28
27
26
25
24
Reserved
Type/Reset
23
22
21
20
19
18
17
16
Reserved
Type/Reset
15
14
13
12
11
10
9
8
Reserved
MODE
SELM
FIRSTBIT
SELAP
FORMAT
Type/Reset
RW 0 RW 0 RW 0 RW 0 RW 0 RW 0 RW 0
7
6
5
4
3
2
1
0
Reserved
DFL
Type/Reset
RW 0 RW 0 RW 0 RW 0
Bits
Field
Descriptions
[14]
MODE
Master or Slave Mode
0: Slave mode
1: Master mode
[13]
SELM
Slave Select Mode
0: SEL signal is controlled by software – asserted or de-asserted by the SSELC bit
1: SEL signal is controlled by hardware – generated automatically by the SPI
hardware
Note that the SELM bit is available for master mode only – MODE = 1.
[12]
FIRSTBIT
LSB or MSB Transmitted First
0: MSB is transmitted first
1: LSB is transmitted first
[11]
SELAP
Slave Select Active Polarity
0: SEL signal is active low
1: SEL signal is active high
[10:8]
FORMAT
SPI Data Transfer Format
These three bits are used to determine the data transfer format of the SPI interface.
FORMAT [2:0]
CPOL
CPHA
001
0
0
010
0
1
110
1
0
101
1
1
Others
Reserved
CPOL: Clock Polarity
0: SCK Idle state is low
1: SCK Idle state is high
CPHA: Clock Phase
0: Data is captured on the first SCK clock edge
1: Data is captured on the second SCK clock edge