15 Quad Synchronous Serial Interface (QSPI)
15-6
Seiko Epson Corporation
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
15.2.3 Pin Functions in Master Mode and Slave Mode
The pin functions are changed according to the transfer direction, transfer mode, and master/slave mode selections.
The differences in pin functions between the modes are shown in Table 15.2.3.1.
Table 15.2.3.1 Pin Function Differences between Modes
Pin
Function in master mode
Function in slave mode
Single transfer mode Dual transfer mode Quad transfer mode Single transfer mode Dual transfer mode Quad transfer mode
QSDIOn[3:2] Always placed into Hi-Z state.
T h e s e p i n s a re
placed into input
or output state
according to the
QSPI_nCTL.DIR bit
setting.
Always placed into Hi-Z state.
T h e s e p i n s a re
placed into output
state while a low
level is applied
to the #QSPISSn
pin and the QSPI_
nCTL.DIR bit is set
to 0 (output), or
placed into Hi-Z
state while a high
level is applied to
the #QSPISSn pin
or the QSPI_nCTL.
DIR bit is set to 1
(input).
QSDIOn1
Always placed into
input state.
T h e s e p i n s a re
placed into input
or output state
according to the
QSPI_nCTL.DIR bit
setting.
Always placed into
input state.
T h e s e p i n s a re
placed into output
state while a low
level is applied
to the #QSPISSn
pin and the QSPI_
nCTL.DIR bit is set
to 0 (output), or
placed into Hi-Z
state while a high
level is applied to
the #QSPISSn pin
or the QSPI_nCTL.
DIR bit is set to 1
(input).
QSDIOn0
Always placed into
output state.
This pin is placed
into output state
while a low level
is applied to the
#QSPISSn pin or
placed into Hi-Z
state while a high
level is applied to
the #QSPISSn pin.
QSPICLKn Outputs the QSPI clock to external devices.
Output clock polarity and phase can be configured if nec-
essary.
Inputs an external QSPI clock.
Clock polarity and phase can be designated according to
the input clock.
#QSPISSn This pin is used to output the slave select signal in mas-
ter mode. In memory mapped access mode, this pin is
controlled by the internal state machine. In register ac-
cess mode, this pin is controlled by a register bit. When
connecting more than one external slave device, general-
purpose I/O ports can be used to output the extra slave
select signals.
Applying a low level to the #QSPISSn pin enables the
QSPI to transmit/receive data. While a high level is applied
to this pin, the QSPI is not selected as a slave device. Data
input to the QSDIOn pins and the clock input to the QSPI-
CLKn pin are ignored. When a high level is applied, the
transmit/receive bit count is cleared to 0 and the already
received bits are discarded.
15.2.4 Input Pin Pull-Up/Pull-Down Function
The QSPI pins (QSDIO
n
[3:0] pins in master mode or QSDIO
n
[3:0] pins, QSPICLK
n
, and #QSPISS
n
pins in slave
mode) have a pull-up or pull-down function as shown in Table 15.2.4.1. This function is enabled by setting the
QSPI_
n
MOD.PUEN bit to 1.
Table 15.2.4.1 Pull-Up or Pull-Down of QSPI Pins
Pin
Master mode
Slave mode
QSDIOn[3:0]
Pull-up
Pull-up
QSPICLKn
–
QSPI_nMOD.CPOL bit = 1: Pull-up
QSPI_nMOD.CPOL bit = 0: Pull-down
#QSPISSn
–
Pull-up
15.3 Clock Settings
15.3.1 QSPI Operating Clock
Operating clock in master mode
In master mode, the QSPI operating clock is supplied from the 16-bit timer. The following two options are pro-
vided for the clock configuration.
Use the 16-bit timer operating clock without dividing
By setting the QSPI_
n
MOD.NOCLKDIV bit to 1, the operating clock CLK_T16_
m
, which is configured
by selecting a clock source and a division ratio, for the 16-bit timer channel corresponding to the QSPI
channel is input to the QSPI as CLK_QSPI
n
. Since this clock is also used as the QSPI clock QSPICLK
n
without changing, the CLK_QSPI
n
frequency becomes the baud rate.
To supply CLK_QSPI
n
to the QSPI, the 16-bit timer clock source must be enabled in the clock generator. It
does not matter how the T16_
m
CTL.MODEN and T16_
m
CTL.PRUN bits of the corresponding 16-bit timer
channel are set (1 or 0).