MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
QSPI Peripheral and Driver Overview

Peripheral feature

The serial peripheral interface (SPI) module enables full-duplex, synchronous, serial communication between the chip and peripheral devices, including other chips. Software can poll the SPI status flags or SPI operation can be interrupt driven. The block contains six 16-bit memory mapped registers for control parameters, status, and data transfer.

Features of the SPI module include the following:

Signals

How this driver is designed to make this peripheral works

The Queued SPI driver is provided with 2 parallel layers for different users with different requirements on flexibility, abstraction level: Functional layer and Transactional layer. Do not mix the usage of these layers with one exception that transactional layer need the QSPI_MasterInit and QSPI_SlaveInit. See detail in section transactional- layer-usage-model.

SPI peripheral is working either as the role of Master or Slave. Functions in both layers get the Master/Slave inside meaning they are prepared for Master or Slave, other wise it apply for both Master/Slave mode.

Functional Layer

This layer provider multiple function API sorted in groups

Transactional Layer

Transactional layer is state retained thus it use the _qspi_master_handle or _qspi_slave_handle to specify the peripheral. User need to initialize the handle by calling QSPI_MasterTransferCreateHandle or QSPI_SlaveTransferCreateHandle.

Transactional layer abstract the provided functionality in transaction level rather than peripheral register level. The background knowledgement requested from user is the common SPI transaction model with optional peripheral specific transfer configuration for transaction. This layer use the data structure _qspi_transfer to describe a transfer

Transaction get 2 modes: Blocking and NonBlocking. Blocking is using the polling mode while NonBlocking using the interrupt or DMA. In Blocking mode, not context need to be kept on return of the function calling thus handle parameter is not needed.

Transactional layer greatly simplify the interrupt handling coding efforts

This layer provider multiple function API sorted in groups

How to use this driver

General Preprocessor Configuraiton Macros

Configuration Items Before Calling Driver APIs

Functional layer usage model

Transactional layer usage model

Typical Use Cases

NA