15-15
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
15.5.5.
Data Reception in Register Access Master Mode
A data receiving procedure and operations in register access master mode are shown below. Figures
15.5.5.1 and show a timing chart and flowcharts, respectively.
Data receiving procedure
1.
Set the QSPI_
n
CTL.DIR bit to 1 when QSPI Ch.
n
is set to dual or quad transfer mode. (This setting
is not necessary in single transfer mode.)
2.
Assert the slave select signal for the external slave device to be accessed by controlling the
QSPI_
n
CTL. MSTSSO bit or the general-purpose output port used for an extra slave select signal
output (if necessary).
3.
Check to see if the QSPI_
n
INTF.TBEIF bit is set to 1 (transmit buffer empty).
4.
Write dummy data (or transmit data) to the QSPI_
n
TXD register.
5.
Wait for a transmit buffer empty interrupt (QSPI_
n
INTF.TBEIF bit = 1).
6.
Write dummy data (or transmit data) to the QSPI_
n
TXD register.
7.
Wait for a receive buffer full interrupt (QSPI_
n
INTF.RBFIF bit = 1).
8.
Read the received data from the QSPI_
n
RXD register.
9.
Repeat Steps 6 to 8 until the end of data reception.
10.
Negate the slave select signal that has been asserted in Step 2 by controlling the
QSPI_
n
CTL.MSTSSO bit or the general-purpose output port (if necessary).
Note:
To perform continuous data reception without stopping QSPICLK
n
, Steps 8 and 6 operations
must be completed within the QSPICLK
n
cycles equivalent to
“Data
bit length -
1”
after Step 7.
Data receiving operations
In single transfer mode (QSPI_
n
MOD.TMOD[1:0] bits = 0), QSPI Ch.
n
operates similar to legacy SPI
devices. The data receiving operation starts simultaneously with a data sending operation when
transmit data (may be dummy data if data transmission is not required) is written to the QSPI_
n
TXD
register. Transmit data are output from the QSDIO
n
0 pin and receive data are input from the
QSDIO
n
1 pin.
In dual or quad transfer mode (QSPI_
n
MOD.TMOD[1:0] bits = 1 or 2), transmit data are not sent at
data reception. Writing dummy data to the QSPI_
n
TXD register triggers the QSPI Ch.
n
to start
supplying the data transfer clock from the QSPICLK
n
pin to the slave device.
The QSPICLK
n
pin outputs the number of clocks specified by the QSPI_
n
MOD.CHLN[3:0] bits.
The receive data bits input from the QSDIO
n
pins, according to the transfer mode specified by
the QSPI_
n
MOD. TMOD[1:0] bits, are shifted into the shift register in sync with these clocks.
When the last clock is output from the QSPICLK
n
pin and receive data bits are all shifted into the shift
register, the received data is transferred to the receive data buffer and the QSPI_
n
INTF.RBFIF bit is set
to 1. At the same time QSPI Ch.
n
issues a receive buffer full interrupt request if the QSPI_
n
INTE.RBFIE
bit = 1. After that, the received data in the receive data buffer can be read through the QSPI_
n
RXD
register.
Note:
If data of the number of the bits specified by the QSPI_
n
MOD.CHLN[3:0] bits and QSPI_
n
MOD.
TMOD[1:0] bits is received when the QSPI_
n
INTF.RBFIF bit is set to 1, the QSPI_
n
RXD register is
overwritten with the newly received data and the previously received data is lost. In this case, the
QSPI_
n
INTF.OEIF bit is set.
Summary of Contents for S1C31D50
Page 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Page 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Page 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Page 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...