15-13
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
15.5.4.
Data Transmission in Master Mode
A data sending procedure and operations in master mode are shown below. Figures 15.5.4.1 and
15.5.4.2 show a timing chart and a flowchart, respectively.
Data sending procedure
1.
Set the QSPI_
n
CTL.DIR bit to 0 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 transmit data to the QSPI_
n
TXD register.
5.
Wait for a QSPI interrupt when using interrupt.
6.
Repeat Steps 3 to 5 (or 3 and 4) until the end of transmit data.
7.
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).
Data sending operations
QSPI Ch.
n
starts data sending operations when transmit data is written into the QSPI_
n
TXD register.
The transmit data in the QSPI_
n
TXD register is automatically transferred to the shift register and
the QSPI_
n
INTF.TBEIF bit is set to 1. If the QSPI_
n
INTE.TBEIE bit = 1 (transmit buffer empty
interrupt enabled), a transmit buffer empty interrupt occurs at the same time.
The QSPICLK
n
pin outputs clocks for the number of cycles specified by the QSPI_
n
MOD.CHLN[3:0]
bits and the transmit data bits are output in sequence from the QSDIO
n
pins, according to the transfer
mode specified by the QSPI_
n
MOD.TMOD[1:0] bits, in sync with these clocks.
Even if the clock is being output from the QSPICLK
n
pin, the next transmit data can be written to
the QSPI_
n
TXD register after making sure the QSPI_
n
INTF.TBEIF bit is set to 1.
If transmit data has not been written to the QSPI_
n
TXD register after the last clock is output from
the QSPI- CLK
n
pin, the clock output halts and the QSPI_
n
INTF.TENDIF bit is set to 1. At the same
time QSPI issues an end-of-transmission interrupt request if the QSPI_
n
INTE.TENDIE bit = 1.
Figure 15.5.4.1 Example of Data Sending Operations in Master Mode (QSPI_
n
MOD.CHDL[3:0] bits =
QSPI_
n
MOD.CHLN[3:0] bits = 0x3)
Data (W)
→
QSPI_
n
TXD
Data (W)
→
QSPI_
n
TXD
Data (W)
→
QSPI_
n
TXD
1 (W)
→
QSPI_
n
INTF.TENDIF
2
3
4
1
2
3
4
1
2
3
4
1
QSDIO
n
[3:0]
QSPI_
n
INTF.TBEIF
QSPI_
n
INTF.TENDIF
Software operations
QSPICLK
n
Содержание S1C31D50
Страница 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Страница 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Страница 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Страница 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...