AT32F425
Series Reference Manual
2022.03.30
Page 182
Ver 2.01
This bit is used to select for MST transfer first or LSB
transfer first.
0: MSB
1: LSB
Bit 6
SPIEN
0x0
rw
SPI enable
0: Disabled
1: Enabled
Bit 5: 3
MDIV
0x0
rw
Master clock frequency division
In master mode, the peripheral clock divided by the
prescaler is used as SPI clock. The MDIV[3] bit is in the
SPI_CTRL2 register, MDIV[3: 0]:
0000: Divided by 2
0001: Divided by 4
0010: Divided by 8
0011: Divided by 16
0100: Divided by 32
0101: Divided by 64
0110: Divided by 128
0111: Divided by 256
1000: Divided by 512
1001: Divided by 1024
Bit 2
MSTEN
0x0
rw
Master enable
0: Disabled (Slave)
1: Enabled (Master)
Bit 1
CLKPOL
0x0
rw
Clock polarity
Indicates the polarity of clock output in idle state.
0: Low level
1: High level
Bit 0
CLKPHA
0x0
rw
Clock phase
0: Data capture starts from the first clock edge
1: Data capture starts from the second clock edge
Note: The SPI_CTRL1 register must be 0 in I
2
S mode.
13.4.2 SPI control register2 (SPI_CTRL2)
Bit
Register
Reset value
Type
Description
Bit 15: 10 Reserved
0x00
resd
Forced 0 by hardware.
Bit 9
MDIV3EN
0x0
rw
Master clock frequency divided by 3 enable
0: Disabled
1: Enabled
Note: When this bit is set, the MDIV[3: 0] becomes invalid,
and the SPI clock is forced to be PCLK/3.
Bit 8
MDIV[3]
0x0
rw
Master clock frequency division
Refer to the MDIV[2: 0] of the SPI_CTRL1 register.
Bit 7
TDBEIE
0x0
rw
Transmit data buffer empty interrupt enable
0: Disabled
1: Enabled
Bit 6
RDBFIE
0x0
rw
Receive data buffer full interrupt enable
0: Disabled
1: Enabled
Bit 5
ERRIE
0x0
rw
Error interrupt enable
This bit controls interrupt generation when errors occur
(CCERR, MMERR, ROERR and TUERR)
0: Disabled
1: Enabled
Bit 4
TIEN
0x0
rw
TI mode enable
0: TI mode disabled (Motorola mode)
1: TI mode enabled (TI mode)
Note: This mode is not used in I2S mode. It must be 0 in