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

Overview

The MCUXpresso SDK provides a peripheral driver for the Quad Serial Peripheral Interface (QSPI) module of MCUXpresso SDK devices.

Typical use case

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/qspi

Input Operation

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/qspi

Data Structures

struct  qspi_header_count_config_t
 QSPI header count configuration structure. More...
 
struct  qspi_config_t
 QSPI configuration structure. More...
 

Enumerations

enum  qspi_transfer_mode_t {
  kQSPI_TransferModeSingle,
  kQSPI_TransferModeDual,
  kQSPI_TransferModeQuad
}
 QSPI transfer mode. More...
 
enum  qspi_data_pin_t {
  kQSPI_DataPinSingle,
  kQSPI_DataPinDual,
  kQSPI_DataPinQuad
}
 QSPI data pin. More...
 
enum  qspi_addr_pin_t {
  kQSPI_AddrPinSingle,
  kQSPI_AddrPinAsData
}
 QSPI address pin. More...
 
enum  qspi_clock_phase_t {
  kQSPI_ClockPhaseRising,
  kQSPI_ClockPhaseFalling
}
 QSPI clock phase. More...
 
enum  qspi_clock_polarity_t {
  kQSPI_ClockPolarityLow,
  kQSPI_ClockPolarityHigh
}
 QSPI clock polarity. More...
 
enum  qspi_capture_edge_t {
  kQSPI_CaptureEdgeFirst,
  kQSPI_CaptureEdgeSecond
}
 QSPI capture clock edge. More...
 
enum  qspi_transfer_length_t {
  kQSPI_TransferLength1Byte,
  kQSPI_TransferLength4Bytes
}
 QSPI transfer length. More...
 
enum  qspi_clock_prescaler_t {
  kQSPI_ClockDiv1 = 0x1,
  kQSPI_ClockDiv2 = 0x2,
  kQSPI_ClockDiv3 = 0x3,
  kQSPI_ClockDiv4 = 0x4,
  kQSPI_ClockDiv5 = 0x5,
  kQSPI_ClockDiv6 = 0x6,
  kQSPI_ClockDiv7 = 0x7,
  kQSPI_ClockDiv8 = 0x8,
  kQSPI_ClockDiv9 = 0x9,
  kQSPI_ClockDiv10 = 0xA,
  kQSPI_ClockDiv11 = 0xB,
  kQSPI_ClockDiv12 = 0xC,
  kQSPI_ClockDiv13 = 0xD,
  kQSPI_ClockDiv14 = 0xE,
  kQSPI_ClockDiv15 = 0xF,
  kQSPI_ClockDiv16 = 0x18,
  kQSPI_ClockDiv18 = 0x19,
  kQSPI_ClockDiv20 = 0x1A,
  kQSPI_ClockDiv22 = 0x1B,
  kQSPI_ClockDiv24 = 0x1C,
  kQSPI_ClockDiv26 = 0x1D,
  kQSPI_ClockDiv28 = 0x1E,
  kQSPI_ClockDiv30 = 0x1F
}
 QSPI clock prescaler. More...
 
enum  qspi_transfer_direction_t {
  kQSPI_Read,
  kQSPI_Write
}
 QSPI read or write type. More...
 
enum  {
  kQSPI_TransferReady = QSPI_CNTL_XFER_RDY_MASK,
  kQSPI_ReadFifoEmpty = QSPI_CNTL_RFIFO_EMPTY_MASK,
  kQSPI_ReadFifoFull = QSPI_CNTL_RFIFO_FULL_MASK,
  kQSPI_WriteFifoEmpty = QSPI_CNTL_WFIFO_EMPTY_MASK,
  kQSPI_WriteFifoFull = QSPI_CNTL_WFIFO_FULL_MASK,
  kQSPI_ReadFifoUnderflow = QSPI_CNTL_RFIFO_UNDRFLW_MASK,
  kQSPI_ReadFifoOverflow = QSPI_CNTL_RFIFO_OVRFLW_MASK,
  kQSPI_WriteFifoUnderflow = QSPI_CNTL_WFIFO_UNDRFLW_MASK,
  kQSPI_WriteFifoOverflow = QSPI_CNTL_WFIFO_OVERFLW_MASK
}
 QSPI status bit,. More...
 
enum  {
  kQSPI_InterruptTransferDone = QSPI_ISR_XFER_DONE_IS_MASK,
  kQSPI_InterruptTransferReady = QSPI_ISR_XFER_RDY_IS_MASK,
  kQSPI_InterruptReadFifoDmaBurst = QSPI_ISR_XFER_RDY_IS_MASK,
  kQSPI_InterruptWriteFifoDmaBurst,
  kQSPI_InterruptReadFifoEmpty = QSPI_ISR_RFIFO_EMPTY_IS_MASK,
  kQSPI_InterruptReadFifoFull = QSPI_ISR_RFIFO_FULL_IS_MASK,
  kQSPI_InterruptWriteFifoEmpty = QSPI_ISR_WFIFO_EMPTY_IS_MASK,
  kQSPI_InterruptWriteFifoFull = QSPI_ISR_WFIFO_FULL_IS_MASK,
  kQSPI_InterruptReadFifoUnderflow = QSPI_ISR_RFIFO_UNDRFLW_IS_MASK,
  kQSPI_InterruptReadFifoOverflow = QSPI_ISR_RFIFO_OVRFLW_IS_MASK,
  kQSPI_InterruptWriteFifoUnderflow = QSPI_ISR_WFIFO_UNDRFLW_IS_MASK,
  kQSPI_InterruptWriteFifoOverflow = QSPI_ISR_WFIFO_OVRFLW_IS_MASK
}
 QSPI interrupt status bit,. More...
 
enum  {
  kQSPI_InterruptTransferDoneMask = QSPI_IMR_XFER_DONE_IM_MASK,
  kQSPI_InterruptTransferReadyMask = QSPI_IMR_XFER_RDY_IM_MASK,
  kQSPI_InterruptReadFifoDmaBurstMask,
  kQSPI_InterruptWriteFifoDmaBurstMask,
  kQSPI_InterruptReadFifoEmptyMask = QSPI_IMR_RFIFO_EMPTY_IM_MASK,
  kQSPI_InterruptReadFifoFullMask = QSPI_IMR_RFIFO_FULL_IM_MASK,
  kQSPI_InterruptWriteFifoEmptyMask = QSPI_IMR_WFIFO_EMPTY_IM_MASK,
  kQSPI_InterruptWriteFifoFullMask = QSPI_IMR_WFIFO_FULL_IM_MASK,
  kQSPI_InterruptReadFifoUnderflowMask,
  kQSPI_InterruptReadFifoOverflowMask,
  kQSPI_InterruptWriteFifoUnderflowMask,
  kQSPI_InterruptWriteFifoOverflowMask
}
 QSPI interrupt mask status bit,. More...
 
enum  qspi_dma_transfer_direction_t {
  kQSPI_DmaRead,
  kQSPI_DmaWrite
}
 QSPI dma read/write type. More...
 
enum  qspi_dma_burst_len_t {
  kQSPI_BurstLen1,
  kQSPI_BurstLen4,
  kQSPI_BurstLen8,
  kQSPI_BurstLen0
}
 QSPI dma read/write burst type. More...
 
enum  qspi_instruction_count_t {
  kQSPI_InstructionCnt0Byte,
  kQSPI_InstructionCnt1Byte,
  kQSPI_InstructionCnt2Byte
}
 QSPI Instruction Count. More...
 
enum  qspi_address_count_t {
  kQSPI_AddressCnt0Byte,
  kQSPI_AddressCnt1Byte,
  kQSPI_AddressCnt2Byte,
  kQSPI_AddressCnt3Byte,
  kQSPI_AddressCnt4Byte
}
 QSPI Address Count. More...
 
enum  qspi_read_mode_count_t {
  kQSPI_ReadModeCnt0Byte,
  kQSPI_ReadModeCnt1Byte,
  kQSPI_ReadModeCnt2Byte
}
 QSPI Read Mode Count. More...
 
enum  qspi_dummy_count_t {
  kQSPI_DummyCnt0Byte,
  kQSPI_DummyCnt1Byte,
  kQSPI_DummyCnt2Byte,
  kQSPI_DummyCnt3Byte
}
 QSPI Dummy Count. More...
 

Driver version

#define FSL_QSPI_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 QSPI driver version 2.0.0. More...
 

Initialization and deinitialization

uint32_t QSPI_GetInstance (QSPI_Type *base)
 Get the instance number for QSPI. More...
 
void QSPI_Init (QSPI_Type *base, qspi_config_t *config)
 Initializes the QSPI module and internal state. More...
 
void QSPI_GetDefaultConfig (qspi_config_t *config)
 Gets default settings for QSPI. More...
 
void QSPI_Deinit (QSPI_Type *base)
 Deinitializes the QSPI module. More...
 
void QSPI_SoftwareReset (QSPI_Type *base)
 Do software reset QSPI. More...
 

Status

static uint32_t QSPI_GetInterruptMaskStatusFlags (QSPI_Type *base)
 Gets the state value of QSPI. More...
 
static void QSPI_MaskInterrupts (QSPI_Type *base, uint32_t mask)
 Mask/Unmask specified interrupts. More...
 
static uint32_t QSPI_GetStatusFlags (QSPI_Type *base)
 Get QSPI status flag. More...
 
static uint32_t QSPI_GetInterruptStatus (QSPI_Type *base)
 Get interrupt status. More...
 
static void QSPI_ClearTransferDoneStatus (QSPI_Type *base)
 Clear transfer done interrupt. More...
 

QSPI functional interface

status_t QSPI_FlushFIFO (QSPI_Type *base)
 Flush Write and Read FIFOs. More...
 
static void QSPI_SetDatePin (QSPI_Type *base, qspi_data_pin_t dataPin)
 Set QSPI serial interface transfer mode. More...
 
static void QSPI_SetAddressPin (QSPI_Type *base, qspi_addr_pin_t addrPin)
 Set QSPI serial interface transfer mode. More...
 
void QSPI_SetHeaderCount (QSPI_Type *base, qspi_header_count_config_t *config)
 Set QSPI serial interface header count . More...
 
static void QSPI_SetInstructionCnt (QSPI_Type *base, qspi_instruction_count_t count)
 Set number of bytes in INSTR register to shift out to the serial interface. More...
 
static void QSPI_SetAddressCnt (QSPI_Type *base, qspi_address_count_t count)
 Set number of bytes in ADDR register to shift out to the serial interface. More...
 
static void QSPI_SetReadModeCnt (QSPI_Type *base, qspi_read_mode_count_t count)
 Set number of bytes in RM register to shift out to the serial interface. More...
 
static void QSPI_SetDummyCnt (QSPI_Type *base, qspi_dummy_count_t count)
 Set number of bytes as dummy to shift out to the serial interface. More...
 
static void QSPI_SetInstruction (QSPI_Type *base, uint32_t instruction)
 Set QSPI serial interface instruction. More...
 
static void QSPI_SetAddress (QSPI_Type *base, uint32_t address)
 Set QSPI serial interface address. More...
 
static void QSPI_SetReadMode (QSPI_Type *base, uint32_t mode)
 Set QSPI serial interface read mode. More...
 
static void QSPI_SetDataInCnt (QSPI_Type *base, uint32_t count)
 Set number of bytes of data to shift in from the serial interface. More...
 
static void QSPI_UpdateTansferLength (QSPI_Type *base, qspi_transfer_length_t length)
 Update the number of bytes in each serial interface I/O transfer. More...
 
void QSPI_SetSSEnable (QSPI_Type *base, bool enable)
 Activate or de-activate serial select output. More...
 
void QSPI_StartTransfer (QSPI_Type *base, qspi_transfer_direction_t direction)
 Start the specified QSPI transfer. More...
 
void QSPI_StopTransfer (QSPI_Type *base)
 Stop QSPI transfer. More...
 
void QSPI_WriteByte (QSPI_Type *base, uint8_t data)
 Write a byte to QSPI serial interface. More...
 
uint8_t QSPI_ReadByte (QSPI_Type *base)
 Read a byte from QSPI serial interface. More...
 
void QSPI_WriteWord (QSPI_Type *base, uint32_t word)
 Write a word to QSPI serial interface. More...
 
uint32_t QSPI_ReadWord (QSPI_Type *base)
 Read a word from QSPI serial interface. More...
 
void QSPI_SetDmaTransferConfig (QSPI_Type *base, qspi_dma_transfer_direction_t direction, qspi_dma_burst_len_t length)
 Set DMA tansfer related configuration. More...
 
void QSPI_WriteBlocking (QSPI_Type *base, uint32_t *buffer, size_t size)
 Sends a buffer of data bytes using a blocking method. More...
 
void QSPI_ReadBlocking (QSPI_Type *base, uint32_t *buffer, size_t size)
 Receives a buffer of data bytes using a blocking method. More...
 

Data Structure Documentation

struct qspi_header_count_config_t

Data Fields

qspi_instruction_count_t instructionCnt
 Instruction Count, number of bytes in INSTR register to shift out. More...
 
qspi_address_count_t addressCnt
 Address Count, number of bytes in ADDR register to shift out. More...
 
qspi_read_mode_count_t readModeCnt
 Read Mode Count, number of bytes in RMODE register to shift out. More...
 
qspi_dummy_count_t dummyCnt
 Dummy Count, number of bytes as dummy to shift out. More...
 

Field Documentation

qspi_instruction_count_t qspi_header_count_config_t::instructionCnt
qspi_address_count_t qspi_header_count_config_t::addressCnt
qspi_read_mode_count_t qspi_header_count_config_t::readModeCnt
qspi_dummy_count_t qspi_header_count_config_t::dummyCnt
struct qspi_config_t

Data Fields

qspi_clock_prescaler_t preScale
 Serial Interface Clock Prescaler. More...
 
qspi_transfer_length_t byteLen
 Byte Length, the number of bytes in each serial interface I/O transfer. More...
 
qspi_clock_phase_t clockPhase
 Serial Interface Clock Phase. More...
 
qspi_clock_polarity_t clockPolarity
 Serial Interface Clock Polarity. More...
 
qspi_data_pin_t dataPinMode
 Data Transfer Pin. More...
 
qspi_addr_pin_t addrPinMode
 Address Transfer Pin. More...
 
qspi_capture_edge_t captureEdge
 Serial Interface Capture Clock Edge. More...
 
qspi_header_count_config_t headerCnt
 Serial Interface header count. More...
 

Field Documentation

qspi_clock_prescaler_t qspi_config_t::preScale
qspi_transfer_length_t qspi_config_t::byteLen
qspi_clock_phase_t qspi_config_t::clockPhase
qspi_clock_polarity_t qspi_config_t::clockPolarity
qspi_data_pin_t qspi_config_t::dataPinMode
qspi_addr_pin_t qspi_config_t::addrPinMode
qspi_capture_edge_t qspi_config_t::captureEdge
qspi_header_count_config_t qspi_config_t::headerCnt

Macro Definition Documentation

#define FSL_QSPI_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))

Enumeration Type Documentation

Enumerator
kQSPI_TransferModeSingle 

Use 1 serial interface pin.

kQSPI_TransferModeDual 

Use 2 serial interface pins.

kQSPI_TransferModeQuad 

Use 4 serial interface pins.

Enumerator
kQSPI_DataPinSingle 

Use 1 serial interface pin.

kQSPI_DataPinDual 

Use 2 serial interface pins.

kQSPI_DataPinQuad 

Use 4 serial interface pins.

Enumerator
kQSPI_AddrPinSingle 

Use 1 serial interface pin.

kQSPI_AddrPinAsData 

Use the number of pins as indicated in DATA_PIN.

Enumerator
kQSPI_ClockPhaseRising 

Data is latched on the rising edge of the serial clock.

kQSPI_ClockPhaseFalling 

Data is latched on the falling edge of the serial clock.

Enumerator
kQSPI_ClockPolarityLow 

Inactive state of serial clock is low.

kQSPI_ClockPolarityHigh 

Inactive state of serial clock is high.

Enumerator
kQSPI_CaptureEdgeFirst 

Input data is captured on the first edge of the serial clock.

kQSPI_CaptureEdgeSecond 

Input data is captured on the second edge of the serial clock.

Enumerator
kQSPI_TransferLength1Byte 

1 byte in each serial interface I/O transfer

kQSPI_TransferLength4Bytes 

4 bytes in each serial interface I/O transfer

Enumerator
kQSPI_ClockDiv1 

Serial interface clock prescaler is SPI clock / 1.

kQSPI_ClockDiv2 

Serial interface clock prescaler is SPI clock / 2.

kQSPI_ClockDiv3 

Serial interface clock prescaler is SPI clock / 3.

kQSPI_ClockDiv4 

Serial interface clock prescaler is SPI clock / 4.

kQSPI_ClockDiv5 

Serial interface clock prescaler is SPI clock / 5.

kQSPI_ClockDiv6 

Serial interface clock prescaler is SPI clock / 6.

kQSPI_ClockDiv7 

Serial interface clock prescaler is SPI clock / 7.

kQSPI_ClockDiv8 

Serial interface clock prescaler is SPI clock / 8.

kQSPI_ClockDiv9 

Serial interface clock prescaler is SPI clock / 9.

kQSPI_ClockDiv10 

Serial interface clock prescaler is SPI clock / 10.

kQSPI_ClockDiv11 

Serial interface clock prescaler is SPI clock / 11.

kQSPI_ClockDiv12 

Serial interface clock prescaler is SPI clock / 12.

kQSPI_ClockDiv13 

Serial interface clock prescaler is SPI clock / 13.

kQSPI_ClockDiv14 

Serial interface clock prescaler is SPI clock / 14.

kQSPI_ClockDiv15 

Serial interface clock prescaler is SPI clock / 15.

kQSPI_ClockDiv16 

Serial interface clock prescaler is SPI clock / 16.

kQSPI_ClockDiv18 

Serial interface clock prescaler is SPI clock / 18.

kQSPI_ClockDiv20 

Serial interface clock prescaler is SPI clock / 20.

kQSPI_ClockDiv22 

Serial interface clock prescaler is SPI clock / 22.

kQSPI_ClockDiv24 

Serial interface clock prescaler is SPI clock / 24.

kQSPI_ClockDiv26 

Serial interface clock prescaler is SPI clock / 26.

kQSPI_ClockDiv28 

Serial interface clock prescaler is SPI clock / 28.

kQSPI_ClockDiv30 

Serial interface clock prescaler is SPI clock / 30.

Enumerator
kQSPI_Read 

Read data from the serial interface.

kQSPI_Write 

Write data to the serial interface.

anonymous enum

Enumerator
kQSPI_TransferReady 

Serial interface transfer ready.

kQSPI_ReadFifoEmpty 

QSPI read FIFO empty flag.

kQSPI_ReadFifoFull 

QSPI read FIFO full flag.

kQSPI_WriteFifoEmpty 

QSPI write FIFO empty flag.

kQSPI_WriteFifoFull 

QSPI write FIFO full flag.

kQSPI_ReadFifoUnderflow 

QSPI read FIFO underflow flag.

kQSPI_ReadFifoOverflow 

QSPI read FIFO overflow flag.

kQSPI_WriteFifoUnderflow 

QSPI write FIFO underflow flag.

kQSPI_WriteFifoOverflow 

QSPI write FIFO overflow flag.

anonymous enum

Enumerator
kQSPI_InterruptTransferDone 

QSPI interrupt transfer done flag.

kQSPI_InterruptTransferReady 

QSPI interrupt transfer ready flag.

kQSPI_InterruptReadFifoDmaBurst 

QSPI interrupt read FIFO DMA burst flag.

kQSPI_InterruptWriteFifoDmaBurst 

QSPI interrupt write FIFO DMA burst flag.

kQSPI_InterruptReadFifoEmpty 

QSPI interrupt read FIFO empty flag.

kQSPI_InterruptReadFifoFull 

QSPI interrupt read FIFO full flag.

kQSPI_InterruptWriteFifoEmpty 

QSPI interrupt write FIFO empty flag.

kQSPI_InterruptWriteFifoFull 

QSPI interrupt write FIFO full flag.

kQSPI_InterruptReadFifoUnderflow 

QSPI interrupt read FIFO underflow flag.

kQSPI_InterruptReadFifoOverflow 

QSPI interrupt read FIFO overflow flag.

kQSPI_InterruptWriteFifoUnderflow 

QSPI interrupt write FIFO underflow flag.

kQSPI_InterruptWriteFifoOverflow 

QSPI interrupt write FIFO overflow flag.

anonymous enum

Enumerator
kQSPI_InterruptTransferDoneMask 

QSPI interrupt transfer done mask flag.

kQSPI_InterruptTransferReadyMask 

QSPI interrupt transfer ready mask flag.

kQSPI_InterruptReadFifoDmaBurstMask 

QSPI interrupt read FIFO DMA burst mask flag.

kQSPI_InterruptWriteFifoDmaBurstMask 

QSPI interrupt write FIFO DMA burst mask flag.

kQSPI_InterruptReadFifoEmptyMask 

QSPI interrupt read FIFO empty mask flag.

kQSPI_InterruptReadFifoFullMask 

QSPI interrupt read FIFO full mask flag.

kQSPI_InterruptWriteFifoEmptyMask 

QSPI interrupt write FIFO empty mask flag.

kQSPI_InterruptWriteFifoFullMask 

QSPI interrupt write FIFO full mask flag.

kQSPI_InterruptReadFifoUnderflowMask 

QSPI interrupt read FIFO underflow mask flag.

kQSPI_InterruptReadFifoOverflowMask 

QSPI interrupt read FIFO overflow mask flag.

kQSPI_InterruptWriteFifoUnderflowMask 

QSPI interrupt write FIFO underflow mask flag.

kQSPI_InterruptWriteFifoOverflowMask 

QSPI interrupt write FIFO overflow mask flag.

Enumerator
kQSPI_DmaRead 

QSPI DMA read.

kQSPI_DmaWrite 

QSPI DMA write.

Enumerator
kQSPI_BurstLen1 

One data(each of width BYTE_LEN) is available in the Read/Write FIFO before a receive/transmit burst request is made to the DMA.

kQSPI_BurstLen4 

Four data(each of width BYTE_LEN) is available in the Read/Write FIFO before a receive/transmit burst request is made to the DMA.

kQSPI_BurstLen8 

Eight data(each of width BYTE_LEN) is available in the Read/Write FIFO before a receive/transmit burst request is made to the DMA.

kQSPI_BurstLen0 

Disable DMA read/write.

Enumerator
kQSPI_InstructionCnt0Byte 

Instrution count: 0 byte.

kQSPI_InstructionCnt1Byte 

Instrution count: 1 byte.

kQSPI_InstructionCnt2Byte 

Instrution count: 2 bytes.

Enumerator
kQSPI_AddressCnt0Byte 

Address count: 0 byte.

kQSPI_AddressCnt1Byte 

Address count: 1 byte.

kQSPI_AddressCnt2Byte 

Address count: 2 bytes.

kQSPI_AddressCnt3Byte 

Address count: 3 bytes.

kQSPI_AddressCnt4Byte 

Address count: 4 bytes.

Enumerator
kQSPI_ReadModeCnt0Byte 

Read mode count: 0 byte.

kQSPI_ReadModeCnt1Byte 

Read mode count: 1 byte.

kQSPI_ReadModeCnt2Byte 

Read mode count: 2 bytes.

Enumerator
kQSPI_DummyCnt0Byte 

Dummy count: 0 byte.

kQSPI_DummyCnt1Byte 

Dummy count: 1 byte.

kQSPI_DummyCnt2Byte 

Dummy count: 2 bytes.

kQSPI_DummyCnt3Byte 

Dummy count: 3 bytes.

Function Documentation

uint32_t QSPI_GetInstance ( QSPI_Type *  base)
Parameters
baseQSPI base pointer.
void QSPI_Init ( QSPI_Type *  base,
qspi_config_t config 
)

This function enables the clock for QSPI and also configures the QSPI with the input configure parameters. Users should call this function before any QSPI operations.

Parameters
basePointer to QuadSPI Type.
configQSPI configure structure.
void QSPI_GetDefaultConfig ( qspi_config_t config)
Parameters
configQSPI configuration structure.
void QSPI_Deinit ( QSPI_Type *  base)
Parameters
basePointer to QuadSPI Type.
void QSPI_SoftwareReset ( QSPI_Type *  base)
Parameters
basePointer to QSPI Type.
static uint32_t QSPI_GetInterruptMaskStatusFlags ( QSPI_Type *  base)
inlinestatic
Parameters
basePointer to QSPI Type.
Returns
status flag, use status flag to AND _qspi_interrupt_mask_status_flags could get the related status.
static void QSPI_MaskInterrupts ( QSPI_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
basePointer to QSPI Type.
maskinterrupt mask.
static uint32_t QSPI_GetStatusFlags ( QSPI_Type *  base)
inlinestatic
Parameters
basePointer to QSPI Type.
Returns
status flag, use status flag to AND _qspi_status_flags could get the related status.
static uint32_t QSPI_GetInterruptStatus ( QSPI_Type *  base)
inlinestatic
Parameters
basePointer to QSPI Type.
Returns
status flag, use status flag to AND _qspi_interrupt_status_flags could get the related status.
static void QSPI_ClearTransferDoneStatus ( QSPI_Type *  base)
inlinestatic
Parameters
basePointer to QSPI Type.
status_t QSPI_FlushFIFO ( QSPI_Type *  base)
Parameters
basePointer to QSPI Type.
Returns
return status.
static void QSPI_SetDatePin ( QSPI_Type *  base,
qspi_data_pin_t  dataPin 
)
inlinestatic
Parameters
basePointer to QSPI Type.
dataPinQSPI tansfer data pin.
static void QSPI_SetAddressPin ( QSPI_Type *  base,
qspi_addr_pin_t  addrPin 
)
inlinestatic
Parameters
basePointer to QSPI Type.
addrPinQSPI tansfer address pin.
void QSPI_SetHeaderCount ( QSPI_Type *  base,
qspi_header_count_config_t config 
)
Parameters
basePointer to QSPI Type.
configPointer to header count configuration structure.
static void QSPI_SetInstructionCnt ( QSPI_Type *  base,
qspi_instruction_count_t  count 
)
inlinestatic
Parameters
basePointer to QSPI Type.
countnumber of bytes in INSTR register to shift out.
static void QSPI_SetAddressCnt ( QSPI_Type *  base,
qspi_address_count_t  count 
)
inlinestatic
Parameters
basePointer to QSPI Type.
countnumber of bytes in ADDR register to shift out.
static void QSPI_SetReadModeCnt ( QSPI_Type *  base,
qspi_read_mode_count_t  count 
)
inlinestatic
Parameters
basePointer to QSPI Type.
countnumber of bytes in RM register to shift out.
static void QSPI_SetDummyCnt ( QSPI_Type *  base,
qspi_dummy_count_t  count 
)
inlinestatic
Parameters
basePointer to QSPI Type.
countnumber of bytes as dummy to shift out.
static void QSPI_SetInstruction ( QSPI_Type *  base,
uint32_t  instruction 
)
inlinestatic
Parameters
basePointer to QSPI Type.
instructionQSPI serial interface instruction.
static void QSPI_SetAddress ( QSPI_Type *  base,
uint32_t  address 
)
inlinestatic
Parameters
basePointer to QSPI Type.
addressQSPI serial interface address.
static void QSPI_SetReadMode ( QSPI_Type *  base,
uint32_t  mode 
)
inlinestatic
Parameters
basePointer to QSPI Type.
modeQSPI serial interface read mode.
static void QSPI_SetDataInCnt ( QSPI_Type *  base,
uint32_t  count 
)
inlinestatic
Parameters
basePointer to QSPI Type.
countnumber of bytes of data to shift in.
static void QSPI_UpdateTansferLength ( QSPI_Type *  base,
qspi_transfer_length_t  length 
)
inlinestatic
Parameters
basePointer to QSPI Type.
lengththe number of bytes in each serial interface I/O transfer.
void QSPI_SetSSEnable ( QSPI_Type *  base,
bool  enable 
)
Parameters
basePointer to QSPI Type.
enableenable or disable.
void QSPI_StartTransfer ( QSPI_Type *  base,
qspi_transfer_direction_t  direction 
)
Parameters
basePointer to QSPI Type.
directionQSPI tansfer direction.
void QSPI_StopTransfer ( QSPI_Type *  base)
Parameters
basePointer to QSPI Type.
void QSPI_WriteByte ( QSPI_Type *  base,
uint8_t  data 
)
Parameters
basePointer to QSPI Type.
datadata to be written.
uint8_t QSPI_ReadByte ( QSPI_Type *  base)
Parameters
basePointer to QSPI Type.
Returns
byte from QSPI serial interface.
void QSPI_WriteWord ( QSPI_Type *  base,
uint32_t  word 
)
Parameters
basePointer to QSPI Type.
worddata to be written.
uint32_t QSPI_ReadWord ( QSPI_Type *  base)
Parameters
basePointer to QSPI Type.
Returns
word from QSPI serial interface.
void QSPI_SetDmaTransferConfig ( QSPI_Type *  base,
qspi_dma_transfer_direction_t  direction,
qspi_dma_burst_len_t  length 
)
Parameters
basePointer to QSPI Type.
directionDMA transfer direction, read or write.
lengthDMA burst length, 1/4/8 bytes.
void QSPI_WriteBlocking ( QSPI_Type *  base,
uint32_t *  buffer,
size_t  size 
)
Note
This function blocks via polling until all bytes have been sent.
Parameters
baseQSPI base pointer
bufferThe data bytes to send
sizeThe number of data bytes to send
void QSPI_ReadBlocking ( QSPI_Type *  base,
uint32_t *  buffer,
size_t  size 
)
Parameters
baseQSPI base pointer
bufferThe data bytes to send
sizeThe number of data bytes to receive