QSPI LLD Driver API/interface file.
Go to the source code of this file.
Data Structures | |
| struct | QSPILLD_Transaction |
| QSPI Driver Transaction. More... | |
| struct | QSPILLD_WriteCmdParams |
| QSPI Transaction Info. More... | |
| struct | QSPILLD_InitObject |
| QSPI driver initialization object. More... | |
| struct | QSPILLD_Object |
| QSPI driver object. More... | |
Macros | |
| #define | QSPI_NOT_IN_USE(x) (void) 0 |
| NOT_IN_USE macro to highlight unused parameters. More... | |
| #define | QSPI_MAX_WORD_LENGTH (128U) |
| Maximum QSPI Word length. More... | |
| #define | QSPI_NUM_OF_DUMMY_BITS_ZERO (0U) |
| Number of Dummy Bits for QSPI read. More... | |
| #define | QSPI_CMD_ADDR_DUMMY_BYTES_LEN (5U) |
| Size of CMD, Address and Dummy bytes in SPI words for quad read. More... | |
| #define | QSPI_MAX_FRAME_LENGTH (4096U) |
| Maximum frame length for QSPI transfer. More... | |
Chip Selects | |
| #define | QSPI_CS0 (0U) |
| #define | QSPI_CS1 (1U) |
| #define | QSPI_CS2 (2U) |
| #define | QSPI_CS3 (3U) |
| #define | QSPI_LLD_CMD_INVALID_ADDR (0xFFFFFFFFU) |
| Macros for invalid commands. More... | |
Transfer Lines Number | |
| #define | QSPI_RX_LINES_SINGLE (0U) |
| #define | QSPI_RX_LINES_DUAL (1U) |
| #define | QSPI_RX_LINES_QUAD (2U) |
Frame Format | |
| #define | QSPI_FF_POL0_PHA0 |
| #define | QSPI_FF_POL0_PHA1 |
| #define | QSPI_FF_POL1_PHA0 |
| #define | QSPI_FF_POL1_PHA1 |
Chip select polarity | |
| #define | QSPI_CS_POL_ACTIVE_LOW (CSL_QSPI_SPI_DC_REG_CSP0_ACTIVE_LOW) |
| #define | QSPI_CS_POL_ACTIVE_HIGH (CSL_QSPI_SPI_DC_REG_CSP0_ACTIVE_HIGH) |
Data Delay | |
| #define | QSPI_DATA_DELAY_0 (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_0) |
| #define | QSPI_DATA_DELAY_1 (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_1) |
| #define | QSPI_DATA_DELAY_2 (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_2) |
| #define | QSPI_DATA_DELAY_3 (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_3) |
Operation Mode | |
| #define | QSPI_MEM_MAP_PORT_SEL_CFG_PORT (CSL_QSPI_SPI_SWITCH_REG_MMPT_S_SEL_CFG_PORT) |
| QSPI Operation mode- Configuration or memory mapped mode. More... | |
| #define | QSPI_MEM_MAP_PORT_SEL_MEM_MAP_PORT (CSL_QSPI_SPI_SWITCH_REG_MMPT_S_SEL_MM_PORT) |
Return status | |
| #define | QSPI_SYSTEM_SUCCESS ((int32_t )0) |
| Return status when the API execution was successful. More... | |
| #define | QSPI_SYSTEM_FAILURE ((int32_t)-1) |
| Return status when the API execution was not successful due to a failure. More... | |
| #define | QSPI_TIMEOUT ((int32_t)-2) |
| Return status when the API execution was not successful due to a time out. More... | |
| #define | QSPI_LLD_INVALID_PARAM ((int32_t)-3) |
| Return status when the API execution failed due invalid parameters. More... | |
| #define | QSPI_BUSY ((int32_t)-4) |
| Return status when the API execution failed due to driver busy. More... | |
| #define | QSPI_INVALID_STATE ((int32_t)-5) |
| Return status when the API execution failed due to invalid LLD state. More... | |
LLD (Low Level Driver) states | |
| #define | QSPI_STATE_RESET (0U) |
| LLD is in Reset State prior to driver init and post driver deinit. More... | |
| #define | QSPI_STATE_READY (1U) |
| LLD accepts runtime APIs only Ready State, otherwise return error. More... | |
| #define | QSPI_STATE_BUSY (2U) |
| LLD is busy performing operation with peripherals, return error when APIs are invoked. More... | |
| #define | QSPI_STATE_ERROR (3U) |
| LLD ran into error, returns error for all APIs other than deinit in this state. More... | |
LLD (Low Level Driver) Transaction states | |
| #define | QSPI_STATE_IDLE (0U) |
| Transaction is in idle state. More... | |
| #define | QSPI_STATE_ADDRESS_WRITE (1U) |
| This transaction state indicates address to be transferred. More... | |
| #define | QSPI_STATE_DATA_WRITE (2U) |
| This transaction state indicates write functionality. More... | |
| #define | QSPI_STATE_DATA_READ (3U) |
| This transaction state indicates read functionality. More... | |
| #define | QSPI_STATE_BLOCK (4U) |
| This transaction state indicates Block for read completion. More... | |
| #define | QSPI_STATE_NON_BLOCK (5U) |
| This transaction state indicates Don't Block for read completion. More... | |
| #define | QSPI_STATE_WRITE_DUMMY_CYCLES (6U) |
| This transaction state indicates writing dummy cycles functionality. More... | |
Typedefs | |
| typedef EDMA_Handle | QSPI_DmaHandle |
| The handle for DMA instance used with QSPI. More... | |
| typedef struct QSPI_EdmaParams_s * | QSPI_DmaChConfig |
| A handle that holds DMA configuration parameters for QSPI. More... | |
| typedef uint32_t(* | QSPI_Clock_getTicks) (void) |
| The definition of a get System Tick function used by the QSPI driver to keep track of time. More... | |
| typedef uint32_t(* | QSPI_Clock_usecToTicks) (uint64_t usecs) |
| The definition of a micro seconds to ticks function used by the QSPI driver to get ticks from microseconds. More... | |
| typedef void(* | QSPI_lld_InterruptCallback) (void *args) |
| The definition of a interrupt completion callback function used by the QSPI driver. More... | |
| typedef void(* | QSPI_lld_dma_readCompleteCallback) (void *args) |
| The definition of a dma read completion callback function used by the QSPI driver. More... | |
QSPI Driver Initialization Structure | |
| typedef struct QSPILLD_Transaction * | QSPILLD_TransactionHandle |
| typedef struct QSPILLD_InitObject * | QSPILLD_InitHandle |
| typedef struct QSPILLD_Object * | QSPILLD_Handle |
Functions | |
| int32_t | QSPI_lld_init (QSPILLD_Handle hQspi) |
| This function initializes the QSPI module. More... | |
| int32_t | QSPI_lld_initDma (QSPILLD_Handle hQspi) |
| This function initializes the QSPI module in DMA Mode. More... | |
| int32_t | QSPI_lld_deInit (QSPILLD_Handle hQspi) |
| This function de-initializes the QSPI module. More... | |
| int32_t | QSPI_lld_deInitDma (QSPILLD_Handle hQspi) |
| This function de-initializes the QSPI module in DMA Mode. More... | |
| int32_t | QSPI_lld_readCmd (QSPILLD_Handle hQspi, QSPILLD_WriteCmdParams *writeMsg) |
| Function to send specific commands and receive related data from flash in configuration mode This API is typically used for reading flash information such as manufacturer ID, SFDP data. More... | |
| int32_t | QSPI_lld_readData (QSPILLD_Handle hQspi, QSPILLD_WriteCmdParams *writeMsg) |
| Function to send specific commands and receive related data from flash in configuration mode This API is intended to read data with and without dummy cycles based on condition whether dummy bits are required or not, set from syscfg-gui. More... | |
| int32_t | QSPI_lld_readCmdIntr (QSPILLD_Handle hQspi, const QSPILLD_WriteCmdParams *msg) |
| Function to send specific commands and receive related data from flash in interrupt mode. More... | |
| int32_t | QSPI_lld_writeCmd (QSPILLD_Handle hQspi, QSPILLD_WriteCmdParams *writeMsg) |
| Function to send specific commands and write data into flash in configuration mode. More... | |
| int32_t | QSPI_lld_writeCmdIntr (QSPILLD_Handle hQspi, const QSPILLD_WriteCmdParams *msg) |
| Function to send specific commands and write data into flash in interrupt mode. More... | |
| int32_t | QSPI_lld_read (QSPILLD_Handle hQspi, uint32_t count, void *rxBuf, uint32_t addrOffset, uint32_t timeout) |
| Function to perform reads from the flash in memory map mode. More... | |
| int32_t | QSPI_lld_readDma (QSPILLD_Handle hQspi, uint32_t count, void *rxBuf, uint32_t addrOffset, uint32_t timeout) |
| Function to perform read from the flash in DMA mode. More... | |
| int32_t | QSPI_lld_setWriteCmd (QSPILLD_Handle hQspi, uint8_t command) |
| Function to set write command to be used. More... | |
| int32_t | QSPI_lld_setReadCmd (QSPILLD_Handle hQspi, uint8_t command) |
| Function to set read command to be used. More... | |
| int32_t | QSPI_lld_setAddressByteCount (QSPILLD_Handle hQspi, uint32_t count) |
| Function to set number of address bytes to be used. More... | |
| int32_t | QSPI_lld_setDummyBitCount (QSPILLD_Handle hQspi, uint32_t count) |
| Function to set number of dummy bits to be used. More... | |
| int32_t | QSPI_lld_setMemAddrSpace (QSPILLD_Handle hQspi, uint32_t memMappedPortSwitch) |
| This function is used to switch between memory mapped and configuration mode. More... | |
| int32_t | QSPI_lld_setRxLines (QSPILLD_Handle hQspi, uint32_t rxLines) |
| Set QSPI Rx lines in the QSPI object. More... | |
| int32_t | QSPI_lld_setPreScaler (QSPILLD_Handle hQspi, uint32_t clkDividerVal) |
| Set the QSPI clock register divider value. More... | |
| int32_t | QSPI_lld_getInputClk (QSPILLD_Handle hQspi, uint32_t *inputClk) |
| This function returns the input clock at which QSPI was programmed. More... | |
| uint32_t | QSPI_lld_getRxLines (QSPILLD_Handle hQspi) |
| Get QSPI Rx lines in the QSPI object. More... | |
| void | QSPI_lld_isr (void *args) |
| QSPI ISR for Read and Write Functionality. More... | |
| void | QSPI_lld_readCompleteCallback (void *args) |
| QSPI Read complete callback for DMA mode. More... | |