QSPI Protocol: Introduction
Quad Serial Peripheral Interface (QSPI) is a serial communication interface. QSPI has been specifically designed for talking to flash chips. QSPI is useful in applications that involve a lot of memory-intensive data like multi-media and on-chip memory is not enough. It can also be used to store code externally and it has the ability to make the external memory behave as fast as the internal memory through some special mechanisms.
QSPI Protocol : Theory of operations
QSPI uses 4 data lines namely; I0,I1,I2 and I3 . QSPI uses a data queue with pointers which allow data transfers without any CPU. In addition it has a wrap around mode which allows continuous transfer of data from to/ from the queue. The QSPI peripheral acts as the memory mapped parallel device for the CPU. QSPI is typically used in applications such as ADC converters etc. QSPI can reach throughput rates upto 40Mbps .
Figure 1. Quad SPI setup with single slave
QSPI Protocol working
The Quad SPI interface configures the data lines on the fly so that they can act as outputs if required. This is helpful if we need to send some information to the flash memory and they can act as inputs if we need to read some memory contents.
It uses four data lines namely I0, I1, I2 and I3 as shown:
Figure 2. QSPI Working
The above figure shows the stages of a Quad SPI exchange:
First stage, the instruction is sent over the IO lines followed by the address and the Alt field which can be implemented the way the flash memory wants it to be
Second stage, for a short period of two clock cycles, the transmission is paused to allow for changing the direction of the I/O line as shown above.
Third stage the data line is sent from the flash device to the microcontroller. Here, 4 bits are transferred in every clock cycle. The bit order is IO0 sends bit 0, IO1 sends bit 1 and so on in the first clock cycle and bits 4,5,6 and 7 are sent out in the second clock cycle. Thereby transmitting the entire byte in just two clock cycles.
Challenges in Debugging QSPI:
Debugging QSPI remains a challenge for most developers as there are a limited number of devices out in the market using QSPI. Prodigy Technovations provides a QSPI debug software.
Prodigy Technovations offers QSPI Protocol Analysis and Decode Software as well as many other protocol decode softwares such as I2C,SPI, eMMC ,ONFI. Prodigy Technovations has developed itself as a protocol analysis leader.