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

Overview

Data Structures

struct  flexspi_dma_handle_t
 FLEXSPI DMA transfer handle, users should not touch the content of the handle. More...
 

Typedefs

typedef void(* flexspi_dma_callback_t )(FLEXSPI_Type *base, flexspi_dma_handle_t *handle, status_t status, void *userData)
 FLEXSPI dma transfer callback function for finish and error.
 

Enumerations

enum  flexspi_dma_transfer_nsize_t {
  kFLEXPSI_DMAnSize1Bytes = 0x1U,
  kFLEXPSI_DMAnSize2Bytes = 0x2U,
  kFLEXPSI_DMAnSize4Bytes = 0x4U,
  kFLEXPSI_DMAnSize8Bytes = 0x8U,
  kFLEXPSI_DMAnSize32Bytes = 0x20U
}
 dma transfer configuration More...
 

Driver version

#define FSL_FLEXSPI_DMA_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 FLEXSPI DMA driver version 2.0.0. More...
 

FLEXSPI dma Transactional

void FLEXSPI_TransferCreateHandleDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle, flexspi_dma_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle)
 Initializes the FLEXSPI handle for transfer which is used in transactional functions and set the callback. More...
 
void FLEXSPI_TransferUpdateSizeDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle, flexspi_dma_transfer_nsize_t nsize)
 Update FLEXSPI DMA transfer source data transfer size(SSIZE) and destination data transfer size(DSIZE). More...
 
status_t FLEXSPI_TransferDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle, flexspi_transfer_t *xfer)
 Transfers FLEXSPI data using an dma non-blocking method. More...
 
void FLEXSPI_TransferAbortDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle)
 Aborts the transfer data using dma. More...
 
status_t FLEXSPI_TransferGetCountDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle, size_t *count)
 Gets the transferred counts of transfer. More...
 

Data Structure Documentation

struct _flexspi_dma_handle

Data Fields

dma_handle_t * txDmaHandle
 dma handler for FLEXSPI Tx. More...
 
dma_handle_t * rxDmaHandle
 dma handler for FLEXSPI Rx. More...
 
size_t transferSize
 Bytes need to transfer. More...
 
flexspi_dma_transfer_nsize_t nsize
 dma SSIZE/DSIZE in each transfer. More...
 
uint8_t nbytes
 dma minor byte transfer count initially configured. More...
 
uint8_t count
 The transfer data count in a DMA request. More...
 
uint32_t state
 Internal state for FLEXSPI dma transfer. More...
 
flexspi_dma_callback_t completionCallback
 A callback function called after the dma transfer is finished. More...
 
void * userData
 User callback parameter.
 

Field Documentation

dma_handle_t* flexspi_dma_handle_t::txDmaHandle
dma_handle_t* flexspi_dma_handle_t::rxDmaHandle
size_t flexspi_dma_handle_t::transferSize
flexspi_dma_transfer_nsize_t flexspi_dma_handle_t::nsize
uint8_t flexspi_dma_handle_t::nbytes
uint8_t flexspi_dma_handle_t::count
uint32_t flexspi_dma_handle_t::state
flexspi_dma_callback_t flexspi_dma_handle_t::completionCallback

Macro Definition Documentation

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

Enumeration Type Documentation

Enumerator
kFLEXPSI_DMAnSize1Bytes 

Source/Destination data transfer size is 1 byte every time.

kFLEXPSI_DMAnSize2Bytes 

Source/Destination data transfer size is 2 bytes every time.

kFLEXPSI_DMAnSize4Bytes 

Source/Destination data transfer size is 4 bytes every time.

kFLEXPSI_DMAnSize8Bytes 

Source/Destination data transfer size is 8 bytes every time.

kFLEXPSI_DMAnSize32Bytes 

Source/Destination data transfer size is 32 bytes every time.

Function Documentation

void FLEXSPI_TransferCreateHandleDMA ( FLEXSPI_Type *  base,
flexspi_dma_handle_t *  handle,
flexspi_dma_callback_t  callback,
void *  userData,
dma_handle_t *  txDmaHandle,
dma_handle_t *  rxDmaHandle 
)
Parameters
baseFLEXSPI peripheral base address
handlePointer to flexspi_dma_handle_t structure
callbackFLEXSPI callback, NULL means no callback.
userDataUser callback function data.
txDmaHandleUser requested DMA handle for TX DMA transfer.
rxDmaHandleUser requested DMA handle for RX DMA transfer.
void FLEXSPI_TransferUpdateSizeDMA ( FLEXSPI_Type *  base,
flexspi_dma_handle_t *  handle,
flexspi_dma_transfer_nsize_t  nsize 
)
Parameters
baseFLEXSPI peripheral base address
handlePointer to flexspi_dma_handle_t structure
nsizeFLEXSPI DMA transfer data transfer size(SSIZE/DSIZE), by default the size is kFLEXPSI_DMAnSize1Bytes(one byte).
See Also
flexspi_dma_transfer_nsize_t .
status_t FLEXSPI_TransferDMA ( FLEXSPI_Type *  base,
flexspi_dma_handle_t *  handle,
flexspi_transfer_t xfer 
)

This function writes/receives data to/from the FLEXSPI transmit/receive FIFO. This function is non-blocking.

Parameters
baseFLEXSPI peripheral base address.
handlePointer to flexspi_dma_handle_t structure
xferFLEXSPI transfer structure.
Return values
kStatus_FLEXSPI_BusyFLEXSPI is busy transfer.
kStatus_InvalidArgumentThe watermark configuration is invalid, the watermark should be power of 2 to do successfully DMA transfer.
kStatus_SuccessFLEXSPI successfully start dma transfer.
void FLEXSPI_TransferAbortDMA ( FLEXSPI_Type *  base,
flexspi_dma_handle_t *  handle 
)

This function aborts the transfer data using dma.

Parameters
baseFLEXSPI peripheral base address.
handlePointer to flexspi_dma_handle_t structure
status_t FLEXSPI_TransferGetCountDMA ( FLEXSPI_Type *  base,
flexspi_dma_handle_t *  handle,
size_t *  count 
)
Parameters
baseFLEXSPI peripheral base address.
handlePointer to flexspi_dma_handle_t structure.
countBytes transfer.
Return values
kStatus_SuccessSucceed get the transfer count.
kStatus_NoTransferInProgressThere is not a non-blocking transaction currently in progress.