English
Language : 

C8051F02X Datasheet, PDF (202/272 Pages) Silicon Laboratories – 8K ISP FLASH MCU Family
C8051F020/1/2/3
Figure 19.6. SPI0CN: SPI0 Control Register
R/W
SPIF
Bit7
R/W
WCOL
Bit6
R/W
MODF
Bit5
R/W
RXOVRN
Bit4
R
TXBSY
Bit3
R
SLVSEL
Bit2
R/W
R/W
Reset Value
MSTEN SPIEN 00000000
Bit1
Bit0 SFR Address:
(bit addressable) 0xF8
Bit7:
Bit6:
Bit5:
Bit4:
Bit3:
Bit2:
Bit1:
Bit0:
SPIF: SPI0 Interrupt Flag.
This bit is set to logic 1 by hardware at the end of a data transfer. If interrupts are enabled, setting this
bit causes the CPU to vector to the SPI0 interrupt service routine. This bit is not automatically cleared
by hardware. It must be cleared by software.
WCOL: Write Collision Flag.
This bit is set to logic 1 by hardware (and generates a SPI0 interrupt) to indicate a write to the SPI0
data register was attempted while a data transfer was in progress. If interrupts are enabled, setting this
bit causes the CPU to vector to the SPI0 interrupt service routine. This bit is not automatically cleared
by hardware. It must be cleared by software.
MODF: Mode Fault Flag.
This bit is set to logic 1 by hardware (and generates a SPI0 interrupt) when a master mode collision is
detected (NSS is low and MSTEN = 1). If interrupts are enabled, setting this bit causes the CPU to
vector to the SPI0 interrupt service routine. This bit is not automatically cleared by hardware. It must
be cleared by software.
RXOVRN: Receive Overrun Flag.
This bit is set to logic 1 by hardware (and generates a SPI0 interrupt) when the receive buffer still
holds unread data from a previous transfer and the last bit of the current transfer is shifted into the
SPI0 shift register. If interrupts are enabled, setting this bit causes the CPU to vector to the SPI0 inter-
rupt service routine. This bit is not automatically cleared by hardware. It must be cleared by software.
TXBSY: Transmit Busy Flag.
This bit is set to logic 1 by hardware while a master mode transfer is in progress. It is cleared by hard-
ware at the end of the transfer.
SLVSEL: Slave Selected Flag.
This bit is set to logic 1 whenever the NSS pin is low indicating it is enabled as a slave. It is cleared to
logic 0 when NSS is high (slave disabled).
MSTEN: Master Mode Enable.
0: Disable master mode. Operate in slave mode.
1: Enable master mode. Operate as a master.
SPIEN: SPI0 Enable.
This bit enables/disables the SPI.
0: SPI disabled.
202
Rev. 1.4