
Rev. 1.00
427 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
20 Serial Peripheral Interface (SPI)
SCK
SCK
MOSI
MISO
MOSI
MISO
SEL
SEL
SCK
SCK
MOSI
MOSI
MISO
MISO
SEL
SEL
I/O 0
I/O 1
I/O 2
I/O 0
I/O 1
I/O 2
SPI
Master
SPI
Master
SPI
Slave
SPI
Slave
Figure 161. SPI Multi-Master Slave Environment
Table 47. SPI Mode Fault Trigger Conditions
Mode Fault
Descriptions
Trigger condition
1. SPI Master mode
2. SELOEN = 0 in the SPICR0 register – SEL pin is configured to be the input mode
3. SEL signal changes to an active level when driven by the external SPI master
SPI behavior
1. Mode fault flag is set.
2. The SPIEN bit in the SPICR0 register is reset. This disables the SPI interface and
blocks all output signals from the device.
3. The MODE bit in the SPICR1 register is reset. This forces the device into slave mode.
Table 48. SPI Master Mode SEL Pin Status
SEL as Input – SELOEN = 0
SEL as Output – SELOEN = 1
Multi-master
Support
Not support
SPI SEL control signal Use Another GPIO to replace the
SEL pin function
SEL pin in hardware or software control mode
- using SELM setting
Continuous transfer
Case 1
Case 2
Case 1
Case 2
Not support
Support
Hardware control
Hardware or software control
Case 1:
SEL signal must be inactive between each data transfer.
Case 2:
SEL signal will not to be inactive until the last data frame has finished.
Note:
When the SPI is in the slave mode, the SEL signal is always an input and not affected by the SELOEN bit in
the SPICR0 register.