2.87 Quad Serial Peripheral Interface (QSPI)

This Plib implements software abstraction for QSPI Peripheral.

Note: Not all APIs maybe implemented. See the specific device family section for available APIs.

Library Interface

Quad Serial Peripheral Interface peripheral library provides the following interfaces:

Functions

QSPI Mode:

NameDescription
QSPIx_InitializeInitializes given instance of the QSPI peripheral
QSPIx_CommandWriteWrites command to QSPI slave device
QSPIx_RegisterReadReads particular register of QSPI slave device
QSPIx_RegisterWriteWrites to particular register of QSPI slave device
QSPIx_MemoryReadReads from the specified address of the serial flash device
QSPIx_MemoryWriteWrites to the specified address of the serial flash device

SPI Mode:

NameDescription
QSPIx_InitializeInitializes given instance of the QSPI peripheral
QSPIx_TransferSetupSetup QSPI operational parameters as desired by the client.
QSPIx_WriteReadWrite and Read data on QSPI peripheral.
QSPIx_WriteWrite data on QSPI peripheral.
QSPIx_ReadRead data on QSPI peripheral.
QSPIx_IsBusyReturns transfer status of QSPI peripheral.
QSPIx_CallbackRegisterAllows application to register callback with PLIB.

Data types and constants

NameTypeDescription
QSPI_ADDRESS_LENGTHEnumDefines the data type to specify address length
QSPI_LANE_WIDTHEnumDefines the data type to specify lane width
QSPI_OPTION_LENGTHEnumDefines the data type to specify option length
QSPI_PROTOCOL_TYPEEnumDefines the QSPI Protocol type - STD_SPI, TWIN_QUAD, OCTAFLASH and HYPERFLASH
QSPI_CLOCK_PHASEEnumIdentifies QSPI Clock Phase Options
QSPI_CLOCK_POLARITYEnumIdentifies QSPI Clock Polarity Options
QSPI_DATA_BITSEnumIdentifies SPI bits per transfer
QSPI_TRANSFER_SETUPStructIdentifies the setup parameters which can be changed dynamically
qspi_command_xfer_tStructDefines the data type for the QSPI commands transfer
qspi_register_xfer_tStructDefines the data type for the QSPI register data transfer
qspi_memory_xfer_tStructDefines the data type for the QSPI memory transfer
QSPI_CALLBACKTypedefPointer to a Callback function. This is used in SPI mode only