When sending a data read frame in indirect mode, the QSPI controller shall only use
the format with QSPIFORMAT[3] as ‘1’ with other bits as per the required frame
format. It must also program the QSPIPREFETCH, QSPIADDR, QSPIPERFBYTE, QSPICMDBYTE
and QSPIDUMMYCLK for proper operation.
Once the programming is complete, the
host shall write the address to the TXFIFO to prime the transaction. After the first
byte is written to the TXFIFO, the QSPI controller shall start the bus transaction
by sending the QSPICMDBYTE, followed by the address byte, QSPIPERFBYTE and dummy
clocks. During the instruction and address phase (including the performance byte
when enabled) the QSPI data lines will be driven by the host controller depending on
the frame format. During the dummy clock phase and read data, the QSPI lines will
only be input mode until the chip select is de-asserted. The bus shall not be
sampled during dummy clock phase.
Note: Dummy clocks are required for interfacing
with external NOR flash, and are needed to allow the NOR flash time to retrieve
the requested data.
- The host must check QSPISTATUS.QSPIIDLE = ‘1’
- The host must program QSPICTL0 register only one time if the data frame format
is not being changed
- QSPIFORMAT for type of transfer
- QSPICMDBYTE for the instruction opcode as per the flash datasheet
- QSPIADDR for using 3- or 4-byte address field as per the flash
datasheet
- QSPIPERFBYTE and QSPIPERFMODE for the performance byte as per the flash
datasheet
- QSPIDUMMYCLK for number of dummy clocks to be sent as per the flash
datasheet
- Case-1: When total number of bytes is less than 256
- The host must program QSPICTL1 register
- The number of bytes to receive to QSPICTL1.RXCOUNT and
QSPICTL1.QSPIPREFETCH = 1
- Write the address byte to the TXFIFO and monitor QSPISTATUS.TXFIFONF
before writing additional address byte(s) to prime the transfer
- Check QSPISTATUS.RXFIFOE to be ‘0’ and read the number of RXCOUNT data
bytes
- Once RXCOUNT data bytes are received, write QSPICS.CSHOLDCTL as ‘1’ and
check QSPISTATUS.QSPIIDLE = ‘1’
- Write QSPICS.CSHOLDCTL = '0' to release the chip select for the
subsequent transactions
- Case-2: When total number of bytes is equal to or more than 256
- The host must program QSPICTL1 register
- For indefinite read set QSPICTL1.RXCOUNT = 0 and
QSPICTL1.QSPIPREFETCH = 1
- Write the address byte to the TXFIFO and monitor QSPISTATUS.TXFIFONF
before writing additional address byte(s) to prime the transfer
- Check QSPISTATUS.RXFIFOE to be ‘0’ and read the data bytes
- Once required number of data bytes are received, wait for
QSPISTATUS.QSPISTALL to be 1.
- Write QSPICS.CSHOLDCTL as ‘1’ and check QSPISTATUS.QSPIIDLE = ‘1’
- Write QSPICS.RXFIFOFLUSH as ‘1’, check QSPISTATUS.RXFIFOE = ‘1’ and
QSPISTATUS.QSPISTALL = ‘0’
- Write QSPICS.CSHOLDCTL = '0' to release the chip select for the
subsequent transactions