20 GENERAL-PURPOSE SERIAL INTERFACE (FSIO)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
20-11
(4) Controlling the #SRDY
x
signal (advanced mode)
When the slave device is in receive mode, the #SRDY
x
signal is output from the slave device to the master de-
vice to notify whether the slave device is ready to receive data or not.
When this serial interface is in the clock-synchronized slave mode, the #SRDY
x
signal is turned to a low level
by writing 1 to RXEN to enable receive operations, thereby indicating to the master device that the slave is
ready to receive. When the LSB of data is received, #SRDY
x
is turned to a high level; when the MSB is re-
ceived, #SRDY
x
is returned to a low level, in preparation for the next receive operation.
If an overrun error occurs, #SRDY
x
is turned to a high level (unable to receive) at that point, so receive opera-
tions for the subsequent data are suspended. In this case, #SRDY
x
is returned to low by reading out the receive
data buffer, and if any receive data follows, the slave restarts receiving data.
In normal mode, the #SRDY
x
signal indicating ready to receive is output even if the receive data buffer is full.
If the receive data buffer cannot be read in this case, an overrun error occurs in the next data transfer. To prevent
this error, the serial interface provides #SRDY
x
high mask mode. In this mode, if the receive data buffer is full,
the #SRDY
x
signal is forcibly fixed at high in order to suspend data transfer from the master device until the
data in the buffer is read.
To use this function, set SRDYCTL/FSIO_IRDA
x
register to 1.
This function is effective in clock-synchronized master mode as well. In this case, the #SRDY
x
signal (low)
from the slave device is ignored when the receive data buffer is full and the serial interface stops outputting the
SCLK
x
signal until the buffer data is read.
When the receive data buffer is not full, normal receive operation is performed even if this function is enabled.
A First data is read.
The clock output stops while FIFO is full.
SCLK
x
SIN
x
Receive data buffer
RXDNUM[1:0]
RDBF
#SRDY
x
(SRDYCTL = 1)
data 1
D0 D1 ··· D6 D7
data 2
D0 D1 ··· D6 D7
data 3
D0 D1 ··· D6 D7
data 4
D0 D1 ··· D6
D7
data 5
D0 D1 ··· D6
A
data 1
1, 2
2, 3, 4
1, 2, 3, 4
1
2
3
1, 2, 3
2
0
Clock-synchronized master mode
Clock-synchronized slave mode
A First data is read.
#SRDY
x
is fixed at high while FIFO is full.
SCLK
x
SIN
x
Receive data buffer
RXDNUM[1:0]
RDBF
#SRDY
x
(SRDYCTL = 1)
data 1
D0 D1 ··· D6 D7
data 2
D0 D1 ··· D6 D7
data 3
D0 D1 ··· D6 D7
data 4
D0 D1 ··· D6
D7
data 5
D0 D1 ··· D6
A
data 1
1, 2
2, 3, 4
1, 2, 3, 4
1
2
3
1, 2, 3
2
0
6.3.5 #SRDY
Figure 20.
x
High Mask Mode
(5) Terminating receive operation
Upon completion of a data receive operation, write 0 to the receive-enable bit RXEN to disable receive opera-
tions. This operation clears (initializes) the receive data buffer (FIFO), therefore, make sure that there is no data
that has not been read in the receive data buffer before setting RXEN to 0.