RTEMS 6.1-rc6
|
Data Structures | |
struct | _flexspi_ahbBuffer_config |
struct | _flexspi_config |
FLEXSPI configuration structure. More... | |
struct | _flexspi_device_config |
External device configuration items. More... | |
struct | _flexspi_transfer |
Transfer structure for FLEXSPI. More... | |
struct | _flexspi_handle |
Transfer handle structure for FLEXSPI. More... | |
Driver version | |
enum | { kStatus_FLEXSPI_Busy = MAKE_STATUS(kStatusGroup_FLEXSPI, 0) , kStatus_FLEXSPI_SequenceExecutionTimeout = MAKE_STATUS(kStatusGroup_FLEXSPI, 1) , kStatus_FLEXSPI_IpCommandSequenceError = MAKE_STATUS(kStatusGroup_FLEXSPI, 2) , kStatus_FLEXSPI_IpCommandGrantTimeout = MAKE_STATUS(kStatusGroup_FLEXSPI, 3) } |
Status structure of FLEXSPI. More... | |
enum | { kFLEXSPI_Command_STOP = 0x00U , kFLEXSPI_Command_SDR = 0x01U , kFLEXSPI_Command_RADDR_SDR = 0x02U , kFLEXSPI_Command_CADDR_SDR = 0x03U , kFLEXSPI_Command_MODE1_SDR = 0x04U , kFLEXSPI_Command_MODE2_SDR = 0x05U , kFLEXSPI_Command_MODE4_SDR = 0x06U , kFLEXSPI_Command_MODE8_SDR = 0x07U , kFLEXSPI_Command_WRITE_SDR = 0x08U , kFLEXSPI_Command_READ_SDR = 0x09U , kFLEXSPI_Command_LEARN_SDR = 0x0AU , kFLEXSPI_Command_DATSZ_SDR = 0x0BU , kFLEXSPI_Command_DUMMY_SDR = 0x0CU , kFLEXSPI_Command_DUMMY_RWDS_SDR = 0x0DU , kFLEXSPI_Command_DDR = 0x21U , kFLEXSPI_Command_RADDR_DDR = 0x22U , kFLEXSPI_Command_CADDR_DDR = 0x23U , kFLEXSPI_Command_MODE1_DDR = 0x24U , kFLEXSPI_Command_MODE2_DDR = 0x25U , kFLEXSPI_Command_MODE4_DDR = 0x26U , kFLEXSPI_Command_MODE8_DDR = 0x27U , kFLEXSPI_Command_WRITE_DDR = 0x28U , kFLEXSPI_Command_READ_DDR = 0x29U , kFLEXSPI_Command_LEARN_DDR = 0x2AU , kFLEXSPI_Command_DATSZ_DDR = 0x2BU , kFLEXSPI_Command_DUMMY_DDR = 0x2CU , kFLEXSPI_Command_DUMMY_RWDS_DDR = 0x2DU , kFLEXSPI_Command_JUMP_ON_CS = 0x1FU } |
CMD definition of FLEXSPI, use to form LUT instruction, _flexspi_command. More... | |
enum | _flexspi_pad { kFLEXSPI_1PAD = 0x00U , kFLEXSPI_2PAD = 0x01U , kFLEXSPI_4PAD = 0x02U , kFLEXSPI_8PAD = 0x03U } |
pad definition of FLEXSPI, use to form LUT instruction. More... | |
enum | _flexspi_flags { kFLEXSPI_SequenceExecutionTimeoutFlag = FLEXSPI_INTEN_SEQTIMEOUTEN_MASK , kFLEXSPI_AhbBusTimeoutFlag = FLEXSPI_INTEN_AHBBUSTIMEOUTEN_MASK , kFLEXSPI_SckStoppedBecauseTxEmptyFlag , kFLEXSPI_SckStoppedBecauseRxFullFlag , kFLEXSPI_DataLearningFailedFlag = FLEXSPI_INTEN_DATALEARNFAILEN_MASK , kFLEXSPI_IpTxFifoWatermarkEmptyFlag = FLEXSPI_INTEN_IPTXWEEN_MASK , kFLEXSPI_IpRxFifoWatermarkAvailableFlag = FLEXSPI_INTEN_IPRXWAEN_MASK , kFLEXSPI_AhbCommandSequenceErrorFlag , kFLEXSPI_IpCommandSequenceErrorFlag = FLEXSPI_INTEN_IPCMDERREN_MASK , kFLEXSPI_AhbCommandGrantTimeoutFlag , kFLEXSPI_IpCommandGrantTimeoutFlag , kFLEXSPI_IpCommandExecutionDoneFlag , kFLEXSPI_AllInterruptFlags = 0xFFFU } |
FLEXSPI interrupt status flags. More... | |
enum | _flexspi_read_sample_clock { kFLEXSPI_ReadSampleClkLoopbackInternally = 0x0U , kFLEXSPI_ReadSampleClkLoopbackFromDqsPad = 0x1U , kFLEXSPI_ReadSampleClkLoopbackFromSckPad = 0x2U , kFLEXSPI_ReadSampleClkExternalInputFromDqsPad = 0x3U } |
FLEXSPI sample clock source selection for Flash Reading. More... | |
enum | _flexspi_cs_interval_cycle_unit { kFLEXSPI_CsIntervalUnit1SckCycle = 0x0U , kFLEXSPI_CsIntervalUnit256SckCycle = 0x1U } |
FLEXSPI interval unit for flash device select. More... | |
enum | _flexspi_ahb_write_wait_unit { kFLEXSPI_AhbWriteWaitUnit2AhbCycle = 0x0U , kFLEXSPI_AhbWriteWaitUnit8AhbCycle = 0x1U , kFLEXSPI_AhbWriteWaitUnit32AhbCycle = 0x2U , kFLEXSPI_AhbWriteWaitUnit128AhbCycle = 0x3U , kFLEXSPI_AhbWriteWaitUnit512AhbCycle = 0x4U , kFLEXSPI_AhbWriteWaitUnit2048AhbCycle = 0x5U , kFLEXSPI_AhbWriteWaitUnit8192AhbCycle = 0x6U , kFLEXSPI_AhbWriteWaitUnit32768AhbCycle = 0x7U } |
FLEXSPI AHB wait interval unit for writing. More... | |
enum | _flexspi_ip_error_code { kFLEXSPI_IpCmdErrorNoError = 0x0U , kFLEXSPI_IpCmdErrorJumpOnCsInIpCmd = 0x2U , kFLEXSPI_IpCmdErrorUnknownOpCode = 0x3U , kFLEXSPI_IpCmdErrorSdrDummyInDdrSequence = 0x4U , kFLEXSPI_IpCmdErrorDdrDummyInSdrSequence = 0x5U , kFLEXSPI_IpCmdErrorInvalidAddress = 0x6U , kFLEXSPI_IpCmdErrorSequenceExecutionTimeout = 0xEU , kFLEXSPI_IpCmdErrorFlashBoundaryAcrosss = 0xFU } |
Error Code when IP command Error detected. More... | |
enum | _flexspi_ahb_error_code { kFLEXSPI_AhbCmdErrorNoError = 0x0U , kFLEXSPI_AhbCmdErrorJumpOnCsInWriteCmd = 0x2U , kFLEXSPI_AhbCmdErrorUnknownOpCode = 0x3U , kFLEXSPI_AhbCmdErrorSdrDummyInDdrSequence = 0x4U , kFLEXSPI_AhbCmdErrorDdrDummyInSdrSequence = 0x5U , kFLEXSPI_AhbCmdSequenceExecutionTimeout = 0x6U } |
Error Code when AHB command Error detected. More... | |
enum | _flexspi_port { kFLEXSPI_PortA1 = 0x0U , kFLEXSPI_PortA2 , kFLEXSPI_PortB1 , kFLEXSPI_PortB2 , kFLEXSPI_PortCount } |
FLEXSPI operation port select. More... | |
enum | _flexspi_arb_command_source { kFLEXSPI_AhbReadCommand = 0x0U , kFLEXSPI_AhbWriteCommand = 0x1U , kFLEXSPI_IpCommand = 0x2U , kFLEXSPI_SuspendedCommand = 0x3U } |
Trigger source of current command sequence granted by arbitrator. | |
enum | _flexspi_command_type { kFLEXSPI_Command , kFLEXSPI_Config , kFLEXSPI_Read , kFLEXSPI_Write } |
Command type. More... | |
typedef enum _flexspi_pad | flexspi_pad_t |
pad definition of FLEXSPI, use to form LUT instruction. | |
typedef enum _flexspi_flags | flexspi_flags_t |
FLEXSPI interrupt status flags. | |
typedef enum _flexspi_read_sample_clock | flexspi_read_sample_clock_t |
FLEXSPI sample clock source selection for Flash Reading. | |
typedef enum _flexspi_cs_interval_cycle_unit | flexspi_cs_interval_cycle_unit_t |
FLEXSPI interval unit for flash device select. | |
typedef enum _flexspi_ahb_write_wait_unit | flexspi_ahb_write_wait_unit_t |
FLEXSPI AHB wait interval unit for writing. | |
typedef enum _flexspi_ip_error_code | flexspi_ip_error_code_t |
Error Code when IP command Error detected. | |
typedef enum _flexspi_ahb_error_code | flexspi_ahb_error_code_t |
Error Code when AHB command Error detected. | |
typedef enum _flexspi_port | flexspi_port_t |
FLEXSPI operation port select. | |
typedef enum _flexspi_arb_command_source | flexspi_arb_command_source_t |
Trigger source of current command sequence granted by arbitrator. | |
typedef enum _flexspi_command_type | flexspi_command_type_t |
Command type. | |
typedef struct _flexspi_ahbBuffer_config | flexspi_ahbBuffer_config_t |
typedef struct _flexspi_config | flexspi_config_t |
FLEXSPI configuration structure. | |
typedef struct _flexspi_device_config | flexspi_device_config_t |
External device configuration items. | |
typedef struct _flexspi_transfer | flexspi_transfer_t |
Transfer structure for FLEXSPI. | |
typedef struct _flexspi_handle | flexspi_handle_t |
typedef void(* | flexspi_transfer_callback_t) (FLEXSPI_Type *base, flexspi_handle_t *handle, status_t status, void *userData) |
FLEXSPI transfer callback function. | |
#define | FSL_FLEXSPI_DRIVER_VERSION (MAKE_VERSION(2, 5, 0)) |
FLEXSPI driver version. | |
#define | FSL_FEATURE_FLEXSPI_AHB_BUFFER_COUNT FSL_FEATURE_FLEXSPI_AHB_BUFFER_COUNTn(0) |
#define | FLEXSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1) |
Formula to form FLEXSPI instructions in LUT table. | |
Initialization and deinitialization | |
uint32_t | FLEXSPI_GetInstance (FLEXSPI_Type *base) |
Get the instance number for FLEXSPI. | |
status_t | FLEXSPI_CheckAndClearError (FLEXSPI_Type *base, uint32_t status) |
Check and clear IP command execution errors. | |
void | FLEXSPI_Init (FLEXSPI_Type *base, const flexspi_config_t *config) |
Initializes the FLEXSPI module and internal state. | |
void | FLEXSPI_GetDefaultConfig (flexspi_config_t *config) |
Gets default settings for FLEXSPI. | |
void | FLEXSPI_Deinit (FLEXSPI_Type *base) |
Deinitializes the FLEXSPI module. | |
void | FLEXSPI_UpdateDllValue (FLEXSPI_Type *base, flexspi_device_config_t *config, flexspi_port_t port) |
Update FLEXSPI DLL value depending on currently flexspi root clock. | |
void | FLEXSPI_SetFlashConfig (FLEXSPI_Type *base, flexspi_device_config_t *config, flexspi_port_t port) |
Configures the connected device parameter. | |
Bus Operations | |
void | FLEXSPI_UpdateRxSampleClock (FLEXSPI_Type *base, flexspi_read_sample_clock_t clockSource) |
Update read sample clock source. | |
void | FLEXSPI_UpdateLUT (FLEXSPI_Type *base, uint32_t index, const uint32_t *cmd, uint32_t count) |
Updates the LUT table. | |
status_t | FLEXSPI_WriteBlocking (FLEXSPI_Type *base, uint8_t *buffer, size_t size) |
Sends a buffer of data bytes using blocking method. | |
status_t | FLEXSPI_ReadBlocking (FLEXSPI_Type *base, uint8_t *buffer, size_t size) |
Receives a buffer of data bytes using a blocking method. | |
status_t | FLEXSPI_TransferBlocking (FLEXSPI_Type *base, flexspi_transfer_t *xfer) |
Execute command to transfer a buffer data bytes using a blocking method. | |
Transactional | |
void | FLEXSPI_TransferCreateHandle (FLEXSPI_Type *base, flexspi_handle_t *handle, flexspi_transfer_callback_t callback, void *userData) |
Initializes the FLEXSPI handle which is used in transactional functions. | |
status_t | FLEXSPI_TransferNonBlocking (FLEXSPI_Type *base, flexspi_handle_t *handle, flexspi_transfer_t *xfer) |
Performs a interrupt non-blocking transfer on the FLEXSPI bus. | |
status_t | FLEXSPI_TransferGetCount (FLEXSPI_Type *base, flexspi_handle_t *handle, size_t *count) |
Gets the master transfer status during a interrupt non-blocking transfer. | |
void | FLEXSPI_TransferAbort (FLEXSPI_Type *base, flexspi_handle_t *handle) |
Aborts an interrupt non-blocking transfer early. | |
void | FLEXSPI_TransferHandleIRQ (FLEXSPI_Type *base, flexspi_handle_t *handle) |
Master interrupt handler. | |
#define FLEXSPI_LUT_SEQ | ( | cmd0, | |
pad0, | |||
op0, | |||
cmd1, | |||
pad1, | |||
op1 | |||
) |
Formula to form FLEXSPI instructions in LUT table.
anonymous enum |
Status structure of FLEXSPI.
anonymous enum |
CMD definition of FLEXSPI, use to form LUT instruction, _flexspi_command.
Error Code when AHB command Error detected.
FLEXSPI AHB wait interval unit for writing.
enum _flexspi_flags |
FLEXSPI interrupt status flags.
Error Code when IP command Error detected.
enum _flexspi_pad |
pad definition of FLEXSPI, use to form LUT instruction.
enum _flexspi_port |
FLEXSPI sample clock source selection for Flash Reading.
status_t FLEXSPI_CheckAndClearError | ( | FLEXSPI_Type * | base, |
uint32_t | status | ||
) |
Check and clear IP command execution errors.
base | FLEXSPI base pointer. |
status | interrupt status. |
void FLEXSPI_Deinit | ( | FLEXSPI_Type * | base | ) |
Deinitializes the FLEXSPI module.
Clears the FLEXSPI state and FLEXSPI module registers.
base | FLEXSPI peripheral base address. |
brief Deinitializes the FLEXSPI module.
Clears the FLEXSPI state and FLEXSPI module registers. param base FLEXSPI peripheral base address.
void FLEXSPI_GetDefaultConfig | ( | flexspi_config_t * | config | ) |
Gets default settings for FLEXSPI.
config | FLEXSPI configuration structure. |
brief Gets default settings for FLEXSPI.
param config FLEXSPI configuration structure.
uint32_t FLEXSPI_GetInstance | ( | FLEXSPI_Type * | base | ) |
Get the instance number for FLEXSPI.
base | FLEXSPI base pointer. |
void FLEXSPI_Init | ( | FLEXSPI_Type * | base, |
const flexspi_config_t * | config | ||
) |
Initializes the FLEXSPI module and internal state.
This function enables the clock for FLEXSPI and also configures the FLEXSPI with the input configure parameters. Users should call this function before any FLEXSPI operations.
base | FLEXSPI peripheral base address. |
config | FLEXSPI configure structure. |
brief Initializes the FLEXSPI module and internal state.
This function enables the clock for FLEXSPI and also configures the FLEXSPI with the input configure parameters. Users should call this function before any FLEXSPI operations.
param base FLEXSPI peripheral base address. param config FLEXSPI configure structure.
status_t FLEXSPI_ReadBlocking | ( | FLEXSPI_Type * | base, |
uint8_t * | buffer, | ||
size_t | size | ||
) |
Receives a buffer of data bytes using a blocking method.
base | FLEXSPI peripheral base address |
buffer | The data bytes to send |
size | The number of data bytes to receive |
kStatus_Success | read success without error |
kStatus_FLEXSPI_SequenceExecutionTimeout | sequence execution timeout |
kStatus_FLEXSPI_IpCommandSequenceError | IP command sequencen error detected |
kStatus_FLEXSPI_IpCommandGrantTimeout | IP command grant timeout detected |
brief Receives a buffer of data bytes using a blocking method. note This function blocks via polling until all bytes have been sent. param base FLEXSPI peripheral base address param buffer The data bytes to send param size The number of data bytes to receive retval kStatus_Success read success without error retval kStatus_FLEXSPI_SequenceExecutionTimeout sequence execution timeout retval kStatus_FLEXSPI_IpCommandSequenceError IP command sequence error detected retval kStatus_FLEXSPI_IpCommandGrantTimeout IP command grant timeout detected
void FLEXSPI_SetFlashConfig | ( | FLEXSPI_Type * | base, |
flexspi_device_config_t * | config, | ||
flexspi_port_t | port | ||
) |
Configures the connected device parameter.
This function configures the connected device relevant parameters, such as the size, command, and so on. The flash configuration value cannot have a default value. The user needs to configure it according to the connected device.
base | FLEXSPI peripheral base address. |
config | Flash configuration parameters. |
port | FLEXSPI Operation port. |
brief Configures the connected device parameter.
This function configures the connected device relevant parameters, such as the size, command, and so on. The flash configuration value cannot have a default value. The user needs to configure it according to the connected device.
param base FLEXSPI peripheral base address. param config Flash configuration parameters. param port FLEXSPI Operation port.
void FLEXSPI_TransferAbort | ( | FLEXSPI_Type * | base, |
flexspi_handle_t * | handle | ||
) |
Aborts an interrupt non-blocking transfer early.
base | FLEXSPI peripheral base address. |
handle | pointer to flexspi_handle_t structure which stores the transfer state |
brief Aborts an interrupt non-blocking transfer early.
note This API can be called at any time when an interrupt non-blocking transfer initiates to abort the transfer early.
param base FLEXSPI peripheral base address. param handle pointer to flexspi_handle_t structure which stores the transfer state
status_t FLEXSPI_TransferBlocking | ( | FLEXSPI_Type * | base, |
flexspi_transfer_t * | xfer | ||
) |
Execute command to transfer a buffer data bytes using a blocking method.
base | FLEXSPI peripheral base address |
xfer | pointer to the transfer structure. |
kStatus_Success | command transfer success without error |
kStatus_FLEXSPI_SequenceExecutionTimeout | sequence execution timeout |
kStatus_FLEXSPI_IpCommandSequenceError | IP command sequence error detected |
kStatus_FLEXSPI_IpCommandGrantTimeout | IP command grant timeout detected |
brief Execute command to transfer a buffer data bytes using a blocking method. param base FLEXSPI peripheral base address param xfer pointer to the transfer structure. retval kStatus_Success command transfer success without error retval kStatus_FLEXSPI_SequenceExecutionTimeout sequence execution timeout retval kStatus_FLEXSPI_IpCommandSequenceError IP command sequence error detected retval kStatus_FLEXSPI_IpCommandGrantTimeout IP command grant timeout detected
void FLEXSPI_TransferCreateHandle | ( | FLEXSPI_Type * | base, |
flexspi_handle_t * | handle, | ||
flexspi_transfer_callback_t | callback, | ||
void * | userData | ||
) |
Initializes the FLEXSPI handle which is used in transactional functions.
base | FLEXSPI peripheral base address. |
handle | pointer to flexspi_handle_t structure to store the transfer state. |
callback | pointer to user callback function. |
userData | user parameter passed to the callback function. |
brief Initializes the FLEXSPI handle which is used in transactional functions.
param base FLEXSPI peripheral base address. param handle pointer to flexspi_handle_t structure to store the transfer state. param callback pointer to user callback function. param userData user parameter passed to the callback function.
status_t FLEXSPI_TransferGetCount | ( | FLEXSPI_Type * | base, |
flexspi_handle_t * | handle, | ||
size_t * | count | ||
) |
Gets the master transfer status during a interrupt non-blocking transfer.
base | FLEXSPI peripheral base address. |
handle | pointer to flexspi_handle_t structure which stores the transfer state. |
count | Number of bytes transferred so far by the non-blocking transaction. |
kStatus_InvalidArgument | count is Invalid. |
kStatus_Success | Successfully return the count. |
brief Gets the master transfer status during a interrupt non-blocking transfer.
param base FLEXSPI peripheral base address. param handle pointer to flexspi_handle_t structure which stores the transfer state. param count Number of bytes transferred so far by the non-blocking transaction. retval kStatus_InvalidArgument count is Invalid. retval kStatus_Success Successfully return the count.
void FLEXSPI_TransferHandleIRQ | ( | FLEXSPI_Type * | base, |
flexspi_handle_t * | handle | ||
) |
Master interrupt handler.
base | FLEXSPI peripheral base address. |
handle | pointer to flexspi_handle_t structure. |
brief Master interrupt handler.
param base FLEXSPI peripheral base address. param handle pointer to flexspi_handle_t structure.
status_t FLEXSPI_TransferNonBlocking | ( | FLEXSPI_Type * | base, |
flexspi_handle_t * | handle, | ||
flexspi_transfer_t * | xfer | ||
) |
Performs a interrupt non-blocking transfer on the FLEXSPI bus.
base | FLEXSPI peripheral base address. |
handle | pointer to flexspi_handle_t structure which stores the transfer state. |
xfer | pointer to flexspi_transfer_t structure. |
kStatus_Success | Successfully start the data transmission. |
kStatus_FLEXSPI_Busy | Previous transmission still not finished. |
brief Performs a interrupt non-blocking transfer on the FLEXSPI bus.
note Calling the API returns immediately after transfer initiates. The user needs to call FLEXSPI_GetTransferCount to poll the transfer status to check whether the transfer is finished. If the return status is not kStatus_FLEXSPI_Busy, the transfer is finished. For FLEXSPI_Read, the dataSize should be multiple of rx watermark level, or FLEXSPI could not read data properly.
param base FLEXSPI peripheral base address. param handle pointer to flexspi_handle_t structure which stores the transfer state. param xfer pointer to flexspi_transfer_t structure. retval kStatus_Success Successfully start the data transmission. retval kStatus_FLEXSPI_Busy Previous transmission still not finished.
void FLEXSPI_UpdateDllValue | ( | FLEXSPI_Type * | base, |
flexspi_device_config_t * | config, | ||
flexspi_port_t | port | ||
) |
Update FLEXSPI DLL value depending on currently flexspi root clock.
base | FLEXSPI peripheral base address. |
config | Flash configuration parameters. |
port | FLEXSPI Operation port. |
brief Update FLEXSPI DLL value depending on currently flexspi root clock.
param base FLEXSPI peripheral base address. param config Flash configuration parameters. param port FLEXSPI Operation port.
void FLEXSPI_UpdateLUT | ( | FLEXSPI_Type * | base, |
uint32_t | index, | ||
const uint32_t * | cmd, | ||
uint32_t | count | ||
) |
Updates the LUT table.
base | FLEXSPI peripheral base address. |
index | From which index start to update. It could be any index of the LUT table, which also allows user to update command content inside a command. Each command consists of up to 8 instructions and occupy 4*32-bit memory. |
cmd | Command sequence array. |
count | Number of sequences. |
brief Updates the LUT table.
param base FLEXSPI peripheral base address. param index From which index start to update. It could be any index of the LUT table, which also allows user to update command content inside a command. Each command consists of up to 8 instructions and occupy 4*32-bit memory. param cmd Command sequence array. param count Number of sequences.
void FLEXSPI_UpdateRxSampleClock | ( | FLEXSPI_Type * | base, |
flexspi_read_sample_clock_t | clockSource | ||
) |
Update read sample clock source.
base | FLEXSPI peripheral base address. |
clockSource | clockSource of type flexspi_read_sample_clock_t |
brief Update read sample clock source
param base FLEXSPI peripheral base address. param clockSource clockSource of type flexspi_read_sample_clock_t
status_t FLEXSPI_WriteBlocking | ( | FLEXSPI_Type * | base, |
uint8_t * | buffer, | ||
size_t | size | ||
) |
Sends a buffer of data bytes using blocking method.
base | FLEXSPI peripheral base address |
buffer | The data bytes to send |
size | The number of data bytes to send |
kStatus_Success | write success without error |
kStatus_FLEXSPI_SequenceExecutionTimeout | sequence execution timeout |
kStatus_FLEXSPI_IpCommandSequenceError | IP command sequence error detected |
kStatus_FLEXSPI_IpCommandGrantTimeout | IP command grant timeout detected |
brief Sends a buffer of data bytes using blocking method. note This function blocks via polling until all bytes have been sent. param base FLEXSPI peripheral base address param buffer The data bytes to send param size The number of data bytes to send retval kStatus_Success write success without error retval kStatus_FLEXSPI_SequenceExecutionTimeout sequence execution timeout retval kStatus_FLEXSPI_IpCommandSequenceError IP command sequence error detected retval kStatus_FLEXSPI_IpCommandGrantTimeout IP command grant timeout detected
uint16_t _flexspi_config::ahbBusTimeoutCycle |
Timeout wait cycle for AHB read/write access, timeout after ahbBusTimeoutCycle*1024 AHB clock cycles.
uint16_t { ... } ::ahbBusTimeoutCycle |
Timeout wait cycle for AHB read/write access, timeout after ahbBusTimeoutCycle*1024 AHB clock cycles.
uint8_t _flexspi_config::ahbGrantTimeoutCycle |
Timeout wait cycle for AHB command grant, timeout after ahbGrantTimeoutCyle*1024 AHB clock cycles.
uint8_t { ... } ::ahbGrantTimeoutCycle |
Timeout wait cycle for AHB command grant, timeout after ahbGrantTimeoutCyle*1024 AHB clock cycles.
uint16_t _flexspi_device_config::AHBWriteWaitInterval |
AHB write wait interval, multiply AHB write interval unit to get the AHB write wait cycles.
flexspi_ahb_write_wait_unit_t _flexspi_device_config::AHBWriteWaitUnit |
AHB write wait unit.
uint8_t _flexspi_device_config::ARDSeqIndex |
Sequence ID for AHB read command.
uint8_t _flexspi_device_config::ARDSeqNumber |
Sequence number for AHB read command.
uint8_t _flexspi_device_config::AWRSeqIndex |
Sequence ID for AHB write command.
uint8_t _flexspi_device_config::AWRSeqNumber |
Sequence number for AHB write command.
flexspi_ahbBuffer_config_t _flexspi_config::buffer[FSL_FEATURE_FLEXSPI_AHB_BUFFER_COUNT] |
AHB buffer size.
flexspi_ahbBuffer_config_t { ... } ::buffer[FSL_FEATURE_FLEXSPI_AHB_BUFFER_COUNT] |
AHB buffer size.
uint16_t _flexspi_ahbBuffer_config::bufferSize |
AHB buffer size in byte.
flexspi_command_type_t _flexspi_transfer::cmdType |
Execution command type.
uint8_t _flexspi_device_config::columnspace |
Column space size.
flexspi_transfer_callback_t _flexspi_handle::completionCallback |
Callback for users while transfer finish or error occurred
uint8_t _flexspi_device_config::CSHoldTime |
CS line hold time.
uint16_t _flexspi_device_config::CSInterval |
CS line assert interval, multiply CS interval unit to get the CS line assert interval cycles.
flexspi_cs_interval_cycle_unit_t _flexspi_device_config::CSIntervalUnit |
CS interval unit, 1 or 256 cycle.
uint8_t _flexspi_device_config::CSSetupTime |
CS line setup time.
uint32_t* _flexspi_transfer::data |
Data buffer.
uint8_t* _flexspi_handle::data |
Data buffer.
size_t _flexspi_transfer::dataSize |
Data size in bytes.
size_t _flexspi_handle::dataSize |
Remaining Data size in bytes.
uint8_t _flexspi_device_config::dataValidTime |
Data valid time for external device.
uint32_t _flexspi_transfer::deviceAddress |
Operation device address.
bool { ... } ::enableAHBBufferable |
Enable/disable AHB bufferable write access support, when enabled, FLEXSPI return before waiting for command execution finished.
bool _flexspi_config::enableAHBBufferable |
Enable/disable AHB bufferable write access support, when enabled, FLEXSPI return before waiting for command execution finished.
bool _flexspi_config::enableAHBCachable |
Enable AHB bus cachable read access support.
bool { ... } ::enableAHBCachable |
Enable AHB bus cachable read access support.
bool _flexspi_config::enableAHBPrefetch |
Enable/disable AHB read prefetch feature, when enabled, FLEXSPI will fetch more data than current AHB burst.
bool { ... } ::enableAHBPrefetch |
Enable/disable AHB read prefetch feature, when enabled, FLEXSPI will fetch more data than current AHB burst.
bool { ... } ::enableAHBWriteIpRxFifo |
Enable AHB bus write access to IP RX FIFO.
bool _flexspi_config::enableAHBWriteIpRxFifo |
Enable AHB bus write access to IP RX FIFO.
bool { ... } ::enableAHBWriteIpTxFifo |
Enable AHB bus write access to IP TX FIFO.
bool _flexspi_config::enableAHBWriteIpTxFifo |
Enable AHB bus write access to IP TX FIFO.
bool _flexspi_config::enableClearAHBBufferOpt |
Enable/disable automatically clean AHB RX Buffer and TX Buffer when FLEXSPI returns STOP mode ACK.
bool { ... } ::enableClearAHBBufferOpt |
Enable/disable automatically clean AHB RX Buffer and TX Buffer when FLEXSPI returns STOP mode ACK.
bool _flexspi_config::enableCombination |
Enable/disable combining PORT A and B Data Pins (SIOA[3:0] and SIOB[3:0]) to support Flash Octal mode.
bool _flexspi_config::enableDoze |
Enable/disable doze mode support.
bool _flexspi_config::enableHalfSpeedAccess |
Enable/disable divide by 2 of the clock for half speed commands.
bool _flexspi_ahbBuffer_config::enablePrefetch |
AHB Read Prefetch Enable for current AHB RX Buffer corresponding Master, allows prefetch disable/enable separately for each master.
bool _flexspi_config::enableReadAddressOpt |
Enable/disable remove AHB read burst start address alignment limitation. when enable, there is no AHB read burst start address alignment limitation.
bool { ... } ::enableReadAddressOpt |
Enable/disable remove AHB read burst start address alignment limitation. when enable, there is no AHB read burst start address alignment limitation.
bool _flexspi_config::enableSameConfigForAll |
Enable/disable same configuration for all connected devices when enabled, same configuration in FLASHA1CRx is applied to all.
bool _flexspi_config::enableSckBDiffOpt |
Enable/disable SCKB pad use as SCKA differential clock output, when enable, Port B flash access is not available.
bool _flexspi_config::enableSckFreeRunning |
Enable/disable SCK output free-running.
bool _flexspi_device_config::enableWordAddress |
If enable word address.
bool _flexspi_device_config::enableWriteMask |
Enable/Disable FLEXSPI drive DQS pin as write mask when writing to external device.
uint32_t _flexspi_device_config::flashSize |
Flash size in KByte.
uint32_t _flexspi_device_config::flexspiRootClk |
FLEXSPI serial root clock.
uint8_t _flexspi_config::ipGrantTimeoutCycle |
Timeout wait cycle for IP command grant, timeout after ipGrantTimeoutCycle*1024 AHB clock cycles.
bool _flexspi_device_config::isSck2Enabled |
FLEXSPI use SCK2.
uint8_t _flexspi_ahbBuffer_config::masterIndex |
AHB Master ID the AHB RX Buffer is assigned.
flexspi_port_t _flexspi_transfer::port |
Operation port.
uint8_t _flexspi_ahbBuffer_config::priority |
This priority for AHB Master Read which this AHB RX Buffer is assigned.
uint8_t { ... } ::resumeWaitCycle |
Wait cycle for idle state before suspended command sequence resume, timeout after ahbBusTimeoutCycle AHB clock cycles.
uint8_t _flexspi_config::resumeWaitCycle |
Wait cycle for idle state before suspended command sequence resume, timeout after ahbBusTimeoutCycle AHB clock cycles.
flexspi_read_sample_clock_t _flexspi_config::rxSampleClock |
Sample Clock source selection for Flash Reading.
uint8_t _flexspi_config::rxWatermark |
FLEXSPI receive watermark value.
uint8_t _flexspi_transfer::seqIndex |
Sequence ID for command.
uint8_t _flexspi_transfer::SeqNumber |
Sequence number for command.
uint16_t _flexspi_config::seqTimeoutCycle |
Timeout wait cycle for command sequence execution, timeout after ahbGrantTimeoutCyle*1024 serial root clock cycles.
uint32_t _flexspi_handle::state |
Internal state for FLEXSPI transfer
size_t _flexspi_handle::transferTotalSize |
Total Data size in bytes.
uint8_t _flexspi_config::txWatermark |
FLEXSPI IP transmit watermark value.
void* _flexspi_handle::userData |
FLEXSPI callback function parameter.