18 UNIVERSAL SERIAL INTERFACE (USI)
18-30
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
USI SPI Master/Slave Mode Interrupt Flag Register (USI_SIF)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
USI SPI Master/
Slave Mode
Interrupt Flag
Register
(USI_SIF)
0x300452
(8 bits)
D7–4 –
reserved
–
–
–
0 when being read.
D3
SSIF
Transfer busy flag (master)
1 Busy
0 Idle
0
R
ss signal low flag (slave)
1 ss = H
0 ss = L
D2
SEIF
Overrun error flag
1 Error
0 Normal
0
R/W Reset by writing 1.
D1
SRDIF
Receive buffer full flag
1 Full
0 Not full
0
R/W
D0
STDIF
Transmit buffer empty flag
1 Empty
0 Not empty
0
R/W
Note: This register is effective only in SPI master and slave modes. Configure USI to SPI master/slave
mode before this register can be used.
D[7:4]
Reserved
D3
SSIF: Transfer Busy Flag Bit (Master Mode)/ss Signal Low Flag Bit (Slave Mode)
Master mode
Indicates the SPI transfer status.
1 (R):
Operating
0 (R):
Standby (default)
SSIF is set to 1 when the SPI starts data transfer in master mode and is maintained at 1 while transfer is
underway. It is cleared to 0 once the transfer is completed.
Slave mode
Indicates the slave select (USI_CS) signal status.
1 (R):
High level (this SPI is not selected)
0 (R):
Low level (this SPI is selected) (default)
SSIF is set to 0 when the master device asserts the slave select (USI_CS) signal to select this SPI con-
troller (slave device). It is returned to 1 when the master device clears the SPI controller selection by
negating the slave select (USI_CS) signal.
D2
SEIF: Overrun Error Flag Bit
Indicates whether an overrun error has occurred or not.
1 (R):
Error occurred
0 (R):
No error (default)
1 (W):
Reset to 0
0 (W):
Ignored
SEIF is set to 1 when an overrun error occurs. At the same time a receive error interrupt request is sent
to the ITC if SEIE/USI_SIE register is 1. An overrun error occurs if data are received successively when
SRDIF is 1. While SRDIF is set to 1, the next received data will not be transferred from the shift regis-
ter to the receive data buffer (the first byte data exists in the receive data buffer and the second byte data
exists in the shift register). An overrun error occurs if the third byte data is received in this condition, as
the second byte data in the shift register is corrupted (an overrun error occurs at the time the first bit of
the third byte is fetched).
SEIF is reset by writing 1. To reset an overrun error, write 1 to SEIF and then read the receive data buf-
fer (USI_RD register) twice. The procedure that writes 1 to SEIF and reads USI_RD register twice can
be reversed.
D1
SRDIF: Receive Buffer Full Flag Bit
Indicates the receive data buffer status.
1 (R):
Data full
0 (R):
No data (default)
1 (W):
Reset to 0
0 (W):
Ignored
SRDIF is set to 1 when data received in the shift register is sent to the receive data buffer (when receiv-
ing is completed), indicating that the data can be read. At the same time a receive buffer full interrupt
request is sent to the ITC if SRDIE/USI_SIE register is 1. SRDIF is reset by writing 1.