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

Overview

Data Structures

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

Typedefs

typedef void(* flexspi_edma_callback_t )(FLEXSPI_Type *base, flexspi_edma_handle_t *handle, status_t status, void *userData)
 FLEXSPI eDMA transfer callback function for finish and error.
 

FLEXSPI eDMA Transactional

void FLEXSPI_TransferCreateHandleEDMA (FLEXSPI_Type *base, flexspi_edma_handle_t *handle, flexspi_edma_callback_t callback, void *userData, edma_handle_t *txDmaHandle, edma_handle_t *rxDmaHandle)
 Initializes the FLEXSPI handle for transfer which is used in transactional functions and set the callback. More...
 
status_t FLEXSPI_TransferEDMA (FLEXSPI_Type *base, flexspi_edma_handle_t *handle, flexspi_transfer_t *xfer)
 Transfers FLEXSPI data using an eDMA non-blocking method. More...
 
void FLEXSPI_TransferAbortEDMA (FLEXSPI_Type *base, flexspi_edma_handle_t *handle)
 Aborts the transfer data using eDMA. More...
 
status_t FLEXSPI_TransferGetCountEDMA (FLEXSPI_Type *base, flexspi_edma_handle_t *handle, size_t *count)
 Gets the transferred counts of transfer. More...
 

Data Structure Documentation

struct _flexspi_edma_handle

Data Fields

edma_handle_ttxDmaHandle
 eDMA handler for FLEXSPI Tx. More...
 
edma_handle_trxDmaHandle
 eDMA handler for FLEXSPI Rx. More...
 
size_t transferSize
 Bytes need to transfer. More...
 
uint8_t nbytes
 eDMA 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 eDMA transfer. More...
 
flexspi_edma_callback_t completionCallback
 A callback function called after the eDMA transfer is finished. More...
 
void * userData
 User callback parameter.
 

Field Documentation

edma_handle_t* flexspi_edma_handle_t::txDmaHandle
edma_handle_t* flexspi_edma_handle_t::rxDmaHandle
size_t flexspi_edma_handle_t::transferSize
uint8_t flexspi_edma_handle_t::nbytes
uint8_t flexspi_edma_handle_t::count
uint32_t flexspi_edma_handle_t::state
flexspi_edma_callback_t flexspi_edma_handle_t::completionCallback

Function Documentation

void FLEXSPI_TransferCreateHandleEDMA ( FLEXSPI_Type *  base,
flexspi_edma_handle_t *  handle,
flexspi_edma_callback_t  callback,
void *  userData,
edma_handle_t txDmaHandle,
edma_handle_t rxDmaHandle 
)
Parameters
baseFLEXSPI peripheral base address
handlePointer to flexspi_edma_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.
status_t FLEXSPI_TransferEDMA ( FLEXSPI_Type *  base,
flexspi_edma_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_edma_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 EDMA transfer.
kStatus_SuccessFLEXSPI successfully start edma transfer.
void FLEXSPI_TransferAbortEDMA ( FLEXSPI_Type *  base,
flexspi_edma_handle_t *  handle 
)

This function aborts the transfer data using eDMA.

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