Callisto4Bootloader: drivers/fsl_flexspi.h File Reference

Callisto4Bootloader

Data Structures | Macros | Typedefs | Enumerations | Functions
fsl_flexspi.h File Reference
`#include "fsl_common.h"`

Go to the source code of this file.

## Data Structures

struct | _lut_sequence
| FlexSPI LUT Sequence structure. More...
struct | flexspi_dll_time_t
struct | _FlexSPIConfig
| FlexSPI Memory Configuration Block. More...
struct | _FlexSpiXfer
| FlexSPI Transfer Context. More...

## Macros

#define | FlexSPI_LUT_COUNT (64)
#define | FlexSPI_AHB_RX_BUF_COUNT (4U)
#define | FlexSPI_AHB_RX_BUF_DEPTH (512U)
#define | FlexSPI_AHB_TX_BUF_DEPTH (32U)
#define | FlexSPI_IP_RX_BUF_DEPTH (256U)
#define | FlexSPI_IP_TX_BUF_DEPTH (256U)
#define | FLEXSPI_CFG_BLK_TAG (0x42464346UL)
#define | FLEXSPI_CFG_BLK_VERSION (0x56010400UL)
#define | FLEXSPI_CFG_BLK_SIZE (512)
#define | FLEXSPI_FEATURE_HAS_PARALLEL_MODE 1
#define | CMD_INDEX_READ 0
#define | CMD_INDEX_READSTATUS 1
#define | CMD_INDEX_WRITEENABLE 2
#define | CMD_INDEX_WRITE 4
#define | CMD_LUT_SEQ_IDX_READ 0
#define | CMD_LUT_SEQ_IDX_READSTATUS 1
#define | CMD_LUT_SEQ_IDX_WRITEENABLE 3
#define | CMD_LUT_SEQ_IDX_WRITE 9
#define | CMD_SDR 0x01
#define | CMD_DDR 0x21
#define | RADDR_SDR 0x02
#define | RADDR_DDR 0x22
#define | CADDR_SDR 0x03
#define | CADDR_DDR 0x23
#define | MODE1_SDR 0x04
#define | MODE1_DDR 0x24
#define | MODE2_SDR 0x05
#define | MODE2_DDR 0x25
#define | MODE4_SDR 0x06
#define | MODE4_DDR 0x26
#define | MODE8_SDR 0x07
#define | MODE8_DDR 0x27
#define | WRITE_SDR 0x08
#define | WRITE_DDR 0x28
#define | READ_SDR 0x09
#define | READ_DDR 0x29
#define | LEARN_SDR 0x0A
#define | LEARN_DDR 0x2A
#define | DATSZ_SDR 0x0B
#define | DATSZ_DDR 0x2B
#define | DUMMY_SDR 0x0C
#define | DUMMY_DDR 0x2C
#define | DUMMY_RWDS_SDR 0x0D
#define | DUMMY_RWDS_DDR 0x2D
#define | JMP_ON_CS 0x1F
#define | STOP 0
#define | FLEXSPI_1PAD 0
#define | FLEXSPI_2PAD 1
#define | FLEXSPI_4PAD 2
#define | FLEXSPI_8PAD 3
#define | FLEXSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1)
#define | FLEXSPI_BITMASK(bit_offset) (1u << (bit_offset))
| Generate bit mask. More...

## Typedefs

typedef enum _FlashReadSampleClkSource | flexspi_read_sample_clk_t
| FlexSPI Read Sample Clock Source definition. More...
typedef enum _FlexSpiIpCmdError | flexspi_ipcmd_error_t
| FlexSPI IP Error codes. More...
typedef struct _lut_sequence | flexspi_lut_seq_t
| FlexSPI LUT Sequence structure. More...
typedef struct _FlexSPIConfig | flexspi_mem_config_t
| FlexSPI Memory Configuration Block. More...
typedef enum _FlexSPIOperationType | flexspi_operation_t
typedef struct _FlexSpiXfer | flexspi_xfer_t
| FlexSPI Transfer Context. More...

## Enumerations

enum | { kFlexSpiSerialClk_SafeFreq = 1 }
| Defintions for FlexSPI Serial Clock Frequency. More...
enum | { kFlexSpiClk_SDR, kFlexSpiClk_DDR }
| FlexSPI clock configuration type. More...
enum | _FlashReadSampleClkSource { kFlexSPIReadSampleClk_LoopbackInternally = 0, kFlexSPIReadSampleClk_LoopbackFromDqsPad = 1, kFlexSPIReadSampleClk_LoopbackFromSckPad = 2, kFlexSPIReadSampleClk_ExternalInputFromDqsPad = 3 }
| FlexSPI Read Sample Clock Source definition. More...

enum

_FlexSpiIpCmdError {
kFlexSpiIpCmdError_NoError = 0, kFlexSpiIpCmdError_DataSizeNotEvenUnderParallelMode = 1, kFlexSpiIpCmdError_JumpOnCsInIpCmd = 2, kFlexSpiIpCmdError_UnknownOpCode = 3,
kFlexSpiIpCmdError_SdrDummyInDdrSequence = 4, kFlexSpiIpCmdError_DDRDummyInSdrSequence = 5, kFlexSpiIpCmdError_InvalidAddress = 6, kFlexSpiIpCmdError_SequenceExecutionTimeout = 0x0E,
kFlexSpiIpCmdError_FlashBoundaryAcrosss = 0x0F
}

| FlexSPI IP Error codes. More...
enum | _flexspi_status { kStatus_FLEXSPI_SequenceExecutionTimeout, kStatus_FLEXSPI_InvalidSequence = MAKE_STATUS(kStatusGroup_FLEXSPI, 1), kStatus_FLEXSPI_DeviceTimeout = MAKE_STATUS(kStatusGroup_FLEXSPI, 2) }

enum

{
kFlexSpiMiscOffset_DiffClkEnable = 0, kFlexSpiMiscOffset_Ck2Enable = 1, kFlexSpiMiscOffset_ParallelEnable = 2, kFlexSpiMiscOffset_WordAddressableEnable = 3,
kFlexSpiMiscOffset_SafeConfigFreqEnable = 4, kFlexSpiMiscOffset_PadSettingOverrideEnable = 5, kFlexSpiMiscOffset_DdrModeEnable = 6, kFlexSpiMiscOffset_UseValidTimeForAllFreq = 7,
kFlexSpiMiscOffset_SecondPinMux = 8
}

| Misc feature bit definitions. More...
enum | { kFlexSpiDeviceType_SerialNOR = 1, kFlexSpiDeviceType_SerialNAND = 2, kFlexSpiDeviceType_SerialRAM = 3, kFlexSpiDeviceType_MCP_NOR_NAND = 0x12, kFlexSpiDeviceType_MCP_NOR_RAM = 0x13 }
| Flash Type Definition. More...
enum | { kSerialFlash_1Pad = 1, kSerialFlash_2Pads = 2, kSerialFlash_4Pads = 4, kSerialFlash_8Pads = 8 }
| Flash Pad Definitions. More...
enum | { kDeviceConfigCmdType_Generic, kDeviceConfigCmdType_QuadEnable, kDeviceConfigCmdType_Spi2Xpi, kDeviceConfigCmdType_Xpi2Spi, kDeviceConfigCmdType_Spi2NoCmd, kDeviceConfigCmdType_Reset }
| Flash Configuration Command Type. More...
enum | _FlexSPIOperationType { kFlexSpiOperation_Command, kFlexSpiOperation_Config, kFlexSpiOperation_Write, kFlexSpiOperation_Read, kFlexSpiOperation_End = kFlexSpiOperation_Read }
enum | flexspi_clock_type_t { kFlexSpiClock_CoreClock, kFlexSpiClock_AhbClock, kFlexSpiClock_SerialRootClock, kFlexSpiClock_IpgClock }
| FlexSPI Clock Type. More...

## Functions

status_t | flexspi_init (uint32_t instance, flexspi_mem_config_t *config)
| Initialize FlexSPI. More...
status_t | flexspi_device_write_enable (uint32_t instance, flexspi_mem_config_t *config, bool isParallelMode, uint32_t baseAddr)
| Send Write enable command to Serial Memory device. More...
status_t | flexspi_device_wait_busy (uint32_t instance, flexspi_mem_config_t *config, bool isParallelMode, uint32_t baseAddr)
| Wait until device is idle. More...
status_t | flexspi_update_lut (uint32_t instance, uint32_t seqIndex, const uint32_t *lutBase, uint32_t numberOfSeq)
| Configure FlexSPI Lookup table. More...
status_t | flexspi_command_xfer (uint32_t instance, flexspi_xfer_t *xfer)
| Perform FlexSPI command. More...
status_t | flexspi_get_clock (uint32_t instance, flexspi_clock_type_t type, uint32_t *freq)
| Get FlexSPI Clock frequency. More...
void | flexspi_wait_idle (uint32_t instance)
| Wait until FlexSPI controller becomes idle. More...
void | flexspi_clear_cache (uint32_t instance)
| Clear FlexSPI cache. More...
void | flexspi_clear_sequence_pointer (uint32_t instance)
| Clear FlexSPI sequence pointer. More...
void | flexspi_clock_gate_enable (uint32_t instance)
| Enable clock gate of FlexSPI. More...
void | flexspi_clock_gate_disable (uint32_t instance)
| Disable clock gate of FlexSPI. More...
void | flexspi_iomux_config (uint32_t instance, flexspi_mem_config_t *config)
| Configure IOMUX for FlexSPI. More...
void | flexspi_clock_config (uint32_t instance, uint32_t freq, uint32_t sampleClkMode)
| Configure Clock for FlexSPI. More...
bool | flexspi_is_padsetting_override_enable (flexspi_mem_config_t *config)
| Check whether Pad Setting Override feature is enabled. More...
bool | flexspi_is_differential_clock_enable (flexspi_mem_config_t *config)
| Check whether Differential clock feature is enabled. More...
bool | flexspi_is_ddr_mode_enable (flexspi_mem_config_t *config)
| Check whether DDR mode feature is enabled. More...
bool | flexspi_is_ck2_enabled (flexspi_mem_config_t *config)
| Check whether CK2 feature is enabled. More...
bool | flexspi_is_parallel_mode (flexspi_mem_config_t *config)
| Check whether Parallel mode feature is enabled. More...
bool | flexspi_is_word_addressable (flexspi_mem_config_t *config)
| Check whether device works under word addressable mode. More...
status_t | flexspi_configure_dll (uint32_t instance, flexspi_mem_config_t *config)
| Configure FlexSPI DLL register. More...
void | flexspi_half_clock_control (uint32_t instance, uint32_t option)
| Half FlexSPI Clock. More...
status_t | flexspi_set_failsafe_setting (flexspi_mem_config_t *config)
| Set Failfase setting info. More...
status_t | flexspi_get_max_supported_freq (uint32_t instance, uint32_t *freq, uint32_t clkMode)
| Get Maximumn clock frequency. More...
void | flexspi_sw_delay_us (uint64_t us)
void | flexspi_update_padsetting (flexspi_mem_config_t *config, uint32_t driveStrength)

## Macro Definition Documentation

## ◆ CADDR_DDR

#define CADDR_DDR 0x23

Definition at line 54 of file fsl_flexspi.h.

## ◆ CADDR_SDR

#define CADDR_SDR 0x03

Definition at line 53 of file fsl_flexspi.h.

## ◆ CMD_DDR

#define CMD_DDR 0x21

Definition at line 50 of file fsl_flexspi.h.

## ◆ CMD_INDEX_READ

#define CMD_INDEX_READ 0

Definition at line 39 of file fsl_flexspi.h.

## ◆ CMD_INDEX_READSTATUS

#define CMD_INDEX_READSTATUS 1

Definition at line 40 of file fsl_flexspi.h.

## ◆ CMD_INDEX_WRITE

#define CMD_INDEX_WRITE 4

Definition at line 42 of file fsl_flexspi.h.

## ◆ CMD_INDEX_WRITEENABLE

#define CMD_INDEX_WRITEENABLE 2

Definition at line 41 of file fsl_flexspi.h.

## ◆ CMD_LUT_SEQ_IDX_READ

#define CMD_LUT_SEQ_IDX_READ 0

Definition at line 44 of file fsl_flexspi.h.

## ◆ CMD_LUT_SEQ_IDX_READSTATUS

#define CMD_LUT_SEQ_IDX_READSTATUS 1

Definition at line 45 of file fsl_flexspi.h.

## ◆ CMD_LUT_SEQ_IDX_WRITE

#define CMD_LUT_SEQ_IDX_WRITE 9

Definition at line 47 of file fsl_flexspi.h.

## ◆ CMD_LUT_SEQ_IDX_WRITEENABLE

#define CMD_LUT_SEQ_IDX_WRITEENABLE 3

Definition at line 46 of file fsl_flexspi.h.

## ◆ CMD_SDR

#define CMD_SDR 0x01

Definition at line 49 of file fsl_flexspi.h.

## ◆ DATSZ_DDR

#define DATSZ_DDR 0x2B

Definition at line 70 of file fsl_flexspi.h.

## ◆ DATSZ_SDR

#define DATSZ_SDR 0x0B

Definition at line 69 of file fsl_flexspi.h.

## ◆ DUMMY_DDR

#define DUMMY_DDR 0x2C

Definition at line 72 of file fsl_flexspi.h.

## ◆ DUMMY_RWDS_DDR

#define DUMMY_RWDS_DDR 0x2D

Definition at line 74 of file fsl_flexspi.h.

## ◆ DUMMY_RWDS_SDR

#define DUMMY_RWDS_SDR 0x0D

Definition at line 73 of file fsl_flexspi.h.

## ◆ DUMMY_SDR

#define DUMMY_SDR 0x0C

Definition at line 71 of file fsl_flexspi.h.

## ◆ FLEXSPI_1PAD

#define FLEXSPI_1PAD 0

Definition at line 78 of file fsl_flexspi.h.

## ◆ FLEXSPI_2PAD

#define FLEXSPI_2PAD 1

Definition at line 79 of file fsl_flexspi.h.

## ◆ FLEXSPI_4PAD

#define FLEXSPI_4PAD 2

Definition at line 80 of file fsl_flexspi.h.

## ◆ FLEXSPI_8PAD

#define FLEXSPI_8PAD 3

Definition at line 81 of file fsl_flexspi.h.

## ◆ FlexSPI_AHB_RX_BUF_COUNT

#define FlexSPI_AHB_RX_BUF_COUNT (4U)

Definition at line 20 of file fsl_flexspi.h.

## ◆ FlexSPI_AHB_RX_BUF_DEPTH

#define FlexSPI_AHB_RX_BUF_DEPTH (512U)

Definition at line 22 of file fsl_flexspi.h.

## ◆ FlexSPI_AHB_TX_BUF_DEPTH

#define FlexSPI_AHB_TX_BUF_DEPTH (32U)

Definition at line 24 of file fsl_flexspi.h.

## ◆ FLEXSPI_BITMASK

#define FLEXSPI_BITMASK | ( |  | bit_offset | ) | (1u << (bit_offset))

Generate bit mask.

Definition at line 281 of file fsl_flexspi.h.

## ◆ FLEXSPI_CFG_BLK_SIZE

#define FLEXSPI_CFG_BLK_SIZE (512)

Definition at line 33 of file fsl_flexspi.h.

## ◆ FLEXSPI_CFG_BLK_TAG

#define FLEXSPI_CFG_BLK_TAG (0x42464346UL)

Definition at line 31 of file fsl_flexspi.h.

## ◆ FLEXSPI_CFG_BLK_VERSION

#define FLEXSPI_CFG_BLK_VERSION (0x56010400UL)

Definition at line 32 of file fsl_flexspi.h.

## ◆ FLEXSPI_FEATURE_HAS_PARALLEL_MODE

#define FLEXSPI_FEATURE_HAS_PARALLEL_MODE 1

Definition at line 36 of file fsl_flexspi.h.

## ◆ FlexSPI_IP_RX_BUF_DEPTH

#define FlexSPI_IP_RX_BUF_DEPTH (256U)

Definition at line 26 of file fsl_flexspi.h.

## ◆ FlexSPI_IP_TX_BUF_DEPTH

#define FlexSPI_IP_TX_BUF_DEPTH (256U)

Definition at line 28 of file fsl_flexspi.h.

## ◆ FlexSPI_LUT_COUNT

#define FlexSPI_LUT_COUNT (64)

Definition at line 18 of file fsl_flexspi.h.

## ◆ FLEXSPI_LUT_SEQ

#define FLEXSPI_LUT_SEQ | ( |  | cmd0,
|  |  | pad0,
|  |  | op0,
|  |  | cmd1,
|  |  | pad1,
|  |  | op1
| ) |  |

Value:
(FLEXSPI_LUT_OPERAND0(op0) | FLEXSPI_LUT_NUM_PADS0(pad0) | FLEXSPI_LUT_OPCODE0(cmd0) | FLEXSPI_LUT_OPERAND1(op1) | \
FLEXSPI_LUT_NUM_PADS1(pad1) | FLEXSPI_LUT_OPCODE1(cmd1))

Definition at line 83 of file fsl_flexspi.h.

## ◆ JMP_ON_CS

#define JMP_ON_CS 0x1F

Definition at line 75 of file fsl_flexspi.h.

## ◆ LEARN_DDR

#define LEARN_DDR 0x2A

Definition at line 68 of file fsl_flexspi.h.

## ◆ LEARN_SDR

#define LEARN_SDR 0x0A

Definition at line 67 of file fsl_flexspi.h.

## ◆ MODE1_DDR

#define MODE1_DDR 0x24

Definition at line 56 of file fsl_flexspi.h.

## ◆ MODE1_SDR

#define MODE1_SDR 0x04

Definition at line 55 of file fsl_flexspi.h.

## ◆ MODE2_DDR

#define MODE2_DDR 0x25

Definition at line 58 of file fsl_flexspi.h.

## ◆ MODE2_SDR

#define MODE2_SDR 0x05

Definition at line 57 of file fsl_flexspi.h.

## ◆ MODE4_DDR

#define MODE4_DDR 0x26

Definition at line 60 of file fsl_flexspi.h.

## ◆ MODE4_SDR

#define MODE4_SDR 0x06

Definition at line 59 of file fsl_flexspi.h.

## ◆ MODE8_DDR

#define MODE8_DDR 0x27

Definition at line 62 of file fsl_flexspi.h.

## ◆ MODE8_SDR

#define MODE8_SDR 0x07

Definition at line 61 of file fsl_flexspi.h.

## ◆ RADDR_DDR

#define RADDR_DDR 0x22

Definition at line 52 of file fsl_flexspi.h.

## ◆ RADDR_SDR

#define RADDR_SDR 0x02

Definition at line 51 of file fsl_flexspi.h.

## ◆ READ_DDR

#define READ_DDR 0x29

Definition at line 66 of file fsl_flexspi.h.

## ◆ READ_SDR

#define READ_SDR 0x09

Definition at line 65 of file fsl_flexspi.h.

## ◆ STOP

#define STOP 0

Definition at line 76 of file fsl_flexspi.h.

## ◆ WRITE_DDR

#define WRITE_DDR 0x28

Definition at line 64 of file fsl_flexspi.h.

## ◆ WRITE_SDR

#define WRITE_SDR 0x08

Definition at line 63 of file fsl_flexspi.h.

## Typedef Documentation

## ◆ flexspi_ipcmd_error_t

typedef enum _FlexSpiIpCmdError flexspi_ipcmd_error_t

FlexSPI IP Error codes.

## ◆ flexspi_lut_seq_t

typedef struct _lut_sequence flexspi_lut_seq_t

FlexSPI LUT Sequence structure.

## ◆ flexspi_mem_config_t

typedef struct _FlexSPIConfig flexspi_mem_config_t

FlexSPI Memory Configuration Block.

## ◆ flexspi_operation_t

typedef enum _FlexSPIOperationType flexspi_operation_t

## ◆ flexspi_read_sample_clk_t

typedef enum _FlashReadSampleClkSource flexspi_read_sample_clk_t

FlexSPI Read Sample Clock Source definition.

## ◆ flexspi_xfer_t

typedef struct _FlexSpiXfer flexspi_xfer_t

FlexSPI Transfer Context.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Defintions for FlexSPI Serial Clock Frequency.

Enumerator
kFlexSpiSerialClk_SafeFreq |

Definition at line 88 of file fsl_flexspi.h.

## ◆ anonymous enum

anonymous enum

FlexSPI clock configuration type.

Enumerator
kFlexSpiClk_SDR | Clock configure for SDR mode.
kFlexSpiClk_DDR | Clock configurat for DDR mode.

Definition at line 94 of file fsl_flexspi.h.

## ◆ anonymous enum

anonymous enum

Misc feature bit definitions.

Enumerator
kFlexSpiMiscOffset_DiffClkEnable | Bit for Differential clock enable.
kFlexSpiMiscOffset_Ck2Enable | Bit for CK2 enable.
kFlexSpiMiscOffset_ParallelEnable | Bit for Parallel mode enable.
kFlexSpiMiscOffset_WordAddressableEnable | Bit for Word Addressable enable.
kFlexSpiMiscOffset_SafeConfigFreqEnable | Bit for Safe Configuration Frequency enable.
kFlexSpiMiscOffset_PadSettingOverrideEnable | Bit for Pad setting override enable.
kFlexSpiMiscOffset_DdrModeEnable | Bit for DDR clock confiuration indication.
kFlexSpiMiscOffset_UseValidTimeForAllFreq | Bit for DLLCR settings under all modes.
kFlexSpiMiscOffset_SecondPinMux | Bit for Second Pinmux group.

Definition at line 133 of file fsl_flexspi.h.

## ◆ anonymous enum

anonymous enum

Flash Type Definition.

Enumerator
kFlexSpiDeviceType_SerialNOR | Flash devices are Serial NOR.
kFlexSpiDeviceType_SerialNAND | Flash devices are Serial NAND.
kFlexSpiDeviceType_SerialRAM | Flash devices are Serial RAM/HyperFLASH.
kFlexSpiDeviceType_MCP_NOR_NAND | Flash device is MCP device, A1 is Serial NOR, A2 is Serial NAND.
kFlexSpiDeviceType_MCP_NOR_RAM | Flash deivce is MCP device, A1 is Serial NOR, A2 is Serial RAMs.

Definition at line 147 of file fsl_flexspi.h.

## ◆ anonymous enum

anonymous enum

Flash Pad Definitions.

Enumerator
kSerialFlash_1Pad |
kSerialFlash_2Pads |
kSerialFlash_4Pads |
kSerialFlash_8Pads |

Definition at line 157 of file fsl_flexspi.h.

## ◆ anonymous enum

anonymous enum

Flash Configuration Command Type.

Enumerator
kDeviceConfigCmdType_Generic | Generic command, for example: configure dummy cycles, drive strength, etc.
kDeviceConfigCmdType_QuadEnable | Quad Enable command.
kDeviceConfigCmdType_Spi2Xpi | Switch from SPI to DPI/QPI/OPI mode.
kDeviceConfigCmdType_Xpi2Spi | Switch from DPI/QPI/OPI to SPI mode.
kDeviceConfigCmdType_Spi2NoCmd | Switch to 0-4-4/0-8-8 mode.
kDeviceConfigCmdType_Reset | Reset device command.

Definition at line 174 of file fsl_flexspi.h.

## ◆ _FlashReadSampleClkSource

enum _FlashReadSampleClkSource

FlexSPI Read Sample Clock Source definition.

Enumerator
kFlexSPIReadSampleClk_LoopbackInternally |
kFlexSPIReadSampleClk_LoopbackFromDqsPad |
kFlexSPIReadSampleClk_LoopbackFromSckPad |
kFlexSPIReadSampleClk_ExternalInputFromDqsPad |

Definition at line 101 of file fsl_flexspi.h.

## ◆ _flexspi_status

enum _flexspi_status

Enumerator
kStatus_FLEXSPI_SequenceExecutionTimeout | Status for Sequence Execution timeout.
kStatus_FLEXSPI_InvalidSequence | Status for Invalid Sequence.
kStatus_FLEXSPI_DeviceTimeout | Status for Device timeout.

Definition at line 124 of file fsl_flexspi.h.

## ◆ _FlexSpiIpCmdError

enum _FlexSpiIpCmdError

FlexSPI IP Error codes.

Enumerator
kFlexSpiIpCmdError_NoError |
kFlexSpiIpCmdError_DataSizeNotEvenUnderParallelMode |
kFlexSpiIpCmdError_JumpOnCsInIpCmd |
kFlexSpiIpCmdError_UnknownOpCode |
kFlexSpiIpCmdError_SdrDummyInDdrSequence |
kFlexSpiIpCmdError_DDRDummyInSdrSequence |
kFlexSpiIpCmdError_InvalidAddress |
kFlexSpiIpCmdError_SequenceExecutionTimeout |
kFlexSpiIpCmdError_FlashBoundaryAcrosss |

Definition at line 110 of file fsl_flexspi.h.

## ◆ _FlexSPIOperationType

enum _FlexSPIOperationType

Enumerator
kFlexSpiOperation_Command | FlexSPI operation: Only command, both TX and
kFlexSpiOperation_Config | RX buffer are ignored. FlexSPI operation: Configure device mode, the
kFlexSpiOperation_Write | TX FIFO size is fixed in LUT. FlexSPI operation: Write, only TX buffer is
kFlexSpiOperation_Read | effective FlexSPI operation: Read, only Rx Buffer is
kFlexSpiOperation_End | effective.

Definition at line 244 of file fsl_flexspi.h.

## ◆ flexspi_clock_type_t

enum flexspi_clock_type_t

FlexSPI Clock Type.

Enumerator
kFlexSpiClock_CoreClock | ARM Core Clock.
kFlexSpiClock_AhbClock | AHB clock.
kFlexSpiClock_SerialRootClock | Serial Root Clock.
kFlexSpiClock_IpgClock | IPG clock.

Definition at line 272 of file fsl_flexspi.h.

## Function Documentation

## ◆ flexspi_clear_cache()

void flexspi_clear_cache | ( | uint32_t | instance | ) |

Clear FlexSPI cache.

Definition at line 1189 of file fsl_flexspi.c.

## ◆ flexspi_clear_sequence_pointer()

void flexspi_clear_sequence_pointer | ( | uint32_t | instance | ) |

Clear FlexSPI sequence pointer.

Definition at line 1340 of file fsl_flexspi.c.

## ◆ flexspi_clock_config()

void flexspi_clock_config | ( | uint32_t | instance,
|  | uint32_t | freq,
|  | uint32_t | sampleClkMode
| ) |  |

Configure Clock for FlexSPI.

## ◆ flexspi_clock_gate_disable()

void flexspi_clock_gate_disable | ( | uint32_t | instance | ) |

Disable clock gate of FlexSPI.

## ◆ flexspi_clock_gate_enable()

void flexspi_clock_gate_enable | ( | uint32_t | instance | ) |

Enable clock gate of FlexSPI.

## ◆ flexspi_command_xfer()

status_t flexspi_command_xfer | ( | uint32_t | instance,
|  | flexspi_xfer_t * | xfer
| ) |  |

Perform FlexSPI command.

Definition at line 965 of file fsl_flexspi.c.

## ◆ flexspi_configure_dll()

status_t flexspi_configure_dll | ( | uint32_t | instance,
|  | flexspi_mem_config_t * | config
| ) |  |

Configure FlexSPI DLL register.

Configure FlexSPI DLL register.

Definition at line 168 of file fsl_flexspi.c.

## ◆ flexspi_device_wait_busy()

status_t flexspi_device_wait_busy | ( | uint32_t | instance,
|  | flexspi_mem_config_t * | config,
|  | bool | isParallelMode,
|  | uint32_t | baseAddr
| ) |  |

Wait until device is idle.

Definition at line 1233 of file fsl_flexspi.c.

## ◆ flexspi_device_write_enable()

status_t flexspi_device_write_enable | ( | uint32_t | instance,
|  | flexspi_mem_config_t * | config,
|  | bool | isParallelMode,
|  | uint32_t | baseAddr
| ) |  |

Send Write enable command to Serial Memory device.

Definition at line 543 of file fsl_flexspi.c.

## ◆ flexspi_get_clock()

status_t flexspi_get_clock | ( | uint32_t | instance,
|  | flexspi_clock_type_t | type,
|  | uint32_t * | freq
| ) |  |

Get FlexSPI Clock frequency.

## ◆ flexspi_get_max_supported_freq()

status_t flexspi_get_max_supported_freq | ( | uint32_t | instance,
|  | uint32_t * | freq,
|  | uint32_t | clkMode
| ) |  |

Get Maximumn clock frequency.

## ◆ flexspi_half_clock_control()

void flexspi_half_clock_control | ( | uint32_t | instance,
|  | uint32_t | option
| ) |  |

Half FlexSPI Clock.

Definition at line 1360 of file fsl_flexspi.c.

## ◆ flexspi_init()

status_t flexspi_init | ( | uint32_t | instance,
|  | flexspi_mem_config_t * | config
| ) |  |

Initialize FlexSPI.

Definition at line 769 of file fsl_flexspi.c.

## ◆ flexspi_iomux_config()

void flexspi_iomux_config | ( | uint32_t | instance,
|  | flexspi_mem_config_t * | config
| ) |  |

Configure IOMUX for FlexSPI.

## ◆ flexspi_is_ck2_enabled()

bool flexspi_is_ck2_enabled | ( | flexspi_mem_config_t * | config | ) |

Check whether CK2 feature is enabled.

Definition at line 143 of file fsl_flexspi.c.

## ◆ flexspi_is_ddr_mode_enable()

bool flexspi_is_ddr_mode_enable | ( | flexspi_mem_config_t * | config | ) |

Check whether DDR mode feature is enabled.

Definition at line 155 of file fsl_flexspi.c.

## ◆ flexspi_is_differential_clock_enable()

bool flexspi_is_differential_clock_enable | ( | flexspi_mem_config_t * | config | ) |

Check whether Differential clock feature is enabled.

Definition at line 119 of file fsl_flexspi.c.

## ◆ flexspi_is_padsetting_override_enable()

bool flexspi_is_padsetting_override_enable | ( | flexspi_mem_config_t * | config | ) |

Check whether Pad Setting Override feature is enabled.

Definition at line 107 of file fsl_flexspi.c.

## ◆ flexspi_is_parallel_mode()

bool flexspi_is_parallel_mode | ( | flexspi_mem_config_t * | config | ) |

Check whether Parallel mode feature is enabled.

Definition at line 95 of file fsl_flexspi.c.

## ◆ flexspi_is_word_addressable()

bool flexspi_is_word_addressable | ( | flexspi_mem_config_t * | config | ) |

Check whether device works under word addressable mode.

Definition at line 131 of file fsl_flexspi.c.

## ◆ flexspi_set_failsafe_setting()

status_t flexspi_set_failsafe_setting | ( | flexspi_mem_config_t * | config | ) |

Set Failfase setting info.

## ◆ flexspi_sw_delay_us()

void flexspi_sw_delay_us | ( | uint64_t | us | ) |

## ◆ flexspi_update_lut()

status_t flexspi_update_lut | ( | uint32_t | instance,
|  | uint32_t | seqIndex,
|  | const uint32_t * | lutBase,
|  | uint32_t | numberOfSeq
| ) |  |

Configure FlexSPI Lookup table.

Definition at line 924 of file fsl_flexspi.c.

## ◆ flexspi_update_padsetting()

void flexspi_update_padsetting | ( | flexspi_mem_config_t * | config,
|  | uint32_t | driveStrength
| ) |  |

## ◆ flexspi_wait_idle()

void flexspi_wait_idle | ( | uint32_t | instance | ) |

Wait until FlexSPI controller becomes idle.

Definition at line 1171 of file fsl_flexspi.c.

FLEXSPI_LUT_OPERAND1
#define FLEXSPI_LUT_OPERAND1(x)
Definition: MIMXRT1062.h:20130
FLEXSPI_LUT_OPCODE0
#define FLEXSPI_LUT_OPCODE0(x)
Definition: MIMXRT1062.h:20125
FLEXSPI_LUT_NUM_PADS0
#define FLEXSPI_LUT_NUM_PADS0(x)
Definition: MIMXRT1062.h:20120
FLEXSPI_LUT_OPCODE1
#define FLEXSPI_LUT_OPCODE1(x)
Definition: MIMXRT1062.h:20140
FLEXSPI_LUT_OPERAND0
#define FLEXSPI_LUT_OPERAND0(x)
Definition: MIMXRT1062.h:20115