676
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
Figure 24-2 QSPI command sequence
Operating procedures
24.5.1
QSPI indirect mode
In indirect mode, instruction are initiated by writing to the QSPI registers, and data is transferred by reading and
writing to the data registers, in the same manner as other communication peripherals.
When QSPI_CTRL0.TMOD[1:0] = 00, it is working in Tx and Rx mode, both transmit and receive data is valid.
Transmission of data continues until the transmit FIFO is empty. The data received from the external device is stored
in the receive FIFO memory and can be accessed by the host processor.
Note: Tx and Rx modes are only available in Single SPI mode (QSPI_CTRL0.SPI_FRF[1:0] = 00)
When QSPI_CTRL0.TMOD[1:0] = 01, the QSPI is in indirect transmission mode, and the byte to be transmitted is
sent to the flash memory during the data transmission phase, and the data is provided by writing the QSPI_DATx
register.
When QSPI_CTRL0.TMOD[1:0] = 10, the QSPI is in indirect receive mode, the data to be received is received from
the flash memory in the data receive phase, and the data is obtained by reading the QSPI_DATx register.
When QSPI_CTRL0.TMOD[1:0] = 11, EEPROM read mode, transmit data is used to send opcode or address to
EEPROM device.
Note: EEPROM read mode is only available in Single SPI mode (QSPI_CTRL0.SPI_FRF[1:0] = 00)
The number of bytes to read is specified in QSPI_CTRL1.NDF[15:0].
4
4
0
0 4 0 4 0
7
6
5
4
3
2
1
0
5
5
1
1 5 1 5 1
6
6
2
2 6 2 6 2
7
7
3
3 7 3 7 3
4 0 4 0
5 1 5 1
6 2 6 2
7 3 7 3
Instruction
Address
Mode
bits
Wait
cycles
Data
GPIO switches from
output to input
Dat a1
Dat a2
M7-0
A7-0
A15-8
A23-16
NSS
SCK
IO0
IO1
IO2
IO3