AM263x MCU+ SDK  09.02.00

Introduction

This module contains APIs to program and use the QSPI LLD module. The APIs can be used by other drivers to get access to QSPI and also by application to initiate data transfer operation.

Files

file  qspi_lld.h
 QSPI LLD Driver API/interface 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...
 

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. 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...
 

Typedefs

typedef void * QSPI_DmaHandle
 The handle for DMA instance used with QSPI. More...
 
typedef void * 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...
 

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...
 

Chip Selects

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

Number of lines used for QSPI read transaction

#define QSPI_RX_LINES_SINGLE   (0U)
 
#define QSPI_RX_LINES_DUAL   (1U)
 
#define QSPI_RX_LINES_QUAD   (2U)
 

Frame Format

Definitions for various SPI data frame formats

POL0 = QSPICLK is held low during the INACTIVE state POL1 = QSPICLK is held high during the INACTIVE state

PHA0 = Data launch is on the falling edge of QSPICLK PHA1 = Data launch is on the rising edge of QSPICLK

#define QSPI_FF_POL0_PHA0
 
#define QSPI_FF_POL0_PHA1
 
#define QSPI_FF_POL1_PHA0
 
#define QSPI_FF_POL1_PHA1
 

Chip select polarity

Polarity of Chip Select

#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

Value of delay in data output after CS goes active.

#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

Operation Mode for read and write.

#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...
 

QSPI Driver Initialization Structure

Status codes that are set by the QSPI driver

typedef struct QSPILLD_TransactionQSPILLD_TransactionHandle
 
typedef struct QSPILLD_InitObjectQSPILLD_InitHandle
 
typedef struct QSPILLD_ObjectQSPILLD_Handle
 

Macro Definition Documentation

◆ QSPI_CS0

#define QSPI_CS0   (0U)

◆ QSPI_CS1

#define QSPI_CS1   (1U)

◆ QSPI_CS2

#define QSPI_CS2   (2U)

◆ QSPI_CS3

#define QSPI_CS3   (3U)

◆ QSPI_NOT_IN_USE

#define QSPI_NOT_IN_USE (   x)    (void) 0

NOT_IN_USE macro to highlight unused parameters.

◆ QSPI_LLD_CMD_INVALID_ADDR

#define QSPI_LLD_CMD_INVALID_ADDR   (0xFFFFFFFFU)

Macros for invalid commands.

◆ QSPI_RX_LINES_SINGLE

#define QSPI_RX_LINES_SINGLE   (0U)

◆ QSPI_RX_LINES_DUAL

#define QSPI_RX_LINES_DUAL   (1U)

◆ QSPI_RX_LINES_QUAD

#define QSPI_RX_LINES_QUAD   (2U)

◆ QSPI_FF_POL0_PHA0

#define QSPI_FF_POL0_PHA0
Value:
((CSL_QSPI_SPI_DC_REG_CKPH0_CKP_0_SHIFT_OUT_FALLING_EDGE \
<< CSL_QSPI_SPI_DC_REG_CKPH0_SHIFT) | \
(CSL_QSPI_SPI_DC_REG_CKP0_DATA_INACTIVE << \
CSL_QSPI_SPI_DC_REG_CKP0_SHIFT))

◆ QSPI_FF_POL0_PHA1

#define QSPI_FF_POL0_PHA1
Value:
((CSL_QSPI_SPI_DC_REG_CKPH0_CKP_0_SHIFT_OUT_RISING_EDGE \
<< CSL_QSPI_SPI_DC_REG_CKPH0_SHIFT) | \
(CSL_QSPI_SPI_DC_REG_CKP0_DATA_INACTIVE << \
CSL_QSPI_SPI_DC_REG_CKP0_SHIFT))

◆ QSPI_FF_POL1_PHA0

#define QSPI_FF_POL1_PHA0
Value:
((CSL_QSPI_SPI_DC_REG_CKPH0_CKP_1_SHIFT_OUT_RISING_EDGE \
<< CSL_QSPI_SPI_DC_REG_CKPH0_SHIFT) | \
(CSL_QSPI_SPI_DC_REG_CKP0_DATA_ACTIVE << \
CSL_QSPI_SPI_DC_REG_CKP0_SHIFT))

◆ QSPI_FF_POL1_PHA1

#define QSPI_FF_POL1_PHA1
Value:
((CSL_QSPI_SPI_DC_REG_CKPH0_CKP_1_SHIFT_OUT_FALLING_EDGE \
<< CSL_QSPI_SPI_DC_REG_CKPH0_SHIFT) | \
(CSL_QSPI_SPI_DC_REG_CKP0_DATA_ACTIVE << \
CSL_QSPI_SPI_DC_REG_CKP0_SHIFT))

◆ QSPI_CS_POL_ACTIVE_LOW

#define QSPI_CS_POL_ACTIVE_LOW   (CSL_QSPI_SPI_DC_REG_CSP0_ACTIVE_LOW)

◆ QSPI_CS_POL_ACTIVE_HIGH

#define QSPI_CS_POL_ACTIVE_HIGH   (CSL_QSPI_SPI_DC_REG_CSP0_ACTIVE_HIGH)

◆ QSPI_DATA_DELAY_0

#define QSPI_DATA_DELAY_0   (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_0)

◆ QSPI_DATA_DELAY_1

#define QSPI_DATA_DELAY_1   (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_1)

◆ QSPI_DATA_DELAY_2

#define QSPI_DATA_DELAY_2   (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_2)

◆ QSPI_DATA_DELAY_3

#define QSPI_DATA_DELAY_3   (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_3)

◆ QSPI_MEM_MAP_PORT_SEL_CFG_PORT

#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.

◆ QSPI_MEM_MAP_PORT_SEL_MEM_MAP_PORT

#define QSPI_MEM_MAP_PORT_SEL_MEM_MAP_PORT    (CSL_QSPI_SPI_SWITCH_REG_MMPT_S_SEL_MM_PORT)

◆ QSPI_MAX_WORD_LENGTH

#define QSPI_MAX_WORD_LENGTH   (128U)

Maximum QSPI Word length.

◆ QSPI_SYSTEM_SUCCESS

#define QSPI_SYSTEM_SUCCESS   ((int32_t )0)

Return status when the API execution was successful.

◆ QSPI_SYSTEM_FAILURE

#define QSPI_SYSTEM_FAILURE   ((int32_t)-1)

Return status when the API execution was not successful due to a failure.

◆ QSPI_TIMEOUT

#define QSPI_TIMEOUT   ((int32_t)-2)

Return status when the API execution was not successful due to a time out.

◆ QSPI_LLD_INVALID_PARAM

#define QSPI_LLD_INVALID_PARAM   ((int32_t)-3)

Return status when the API execution failed due invalid parameters.

◆ QSPI_BUSY

#define QSPI_BUSY   ((int32_t)-4)

Return status when the API execution failed due to driver busy.

◆ QSPI_INVALID_STATE

#define QSPI_INVALID_STATE   ((int32_t)-5)

Return status when the API execution failed due to invalid LLD state.

◆ QSPI_STATE_RESET

#define QSPI_STATE_RESET   (0U)

LLD is in Reset State prior to driver init and post driver deinit.

◆ QSPI_STATE_READY

#define QSPI_STATE_READY   (1U)

LLD accepts runtime APIs only Ready State, otherwise return error.

◆ QSPI_STATE_BUSY

#define QSPI_STATE_BUSY   (2U)

LLD is busy performing operation with peripherals, return error when APIs are invoked.

◆ QSPI_STATE_ERROR

#define QSPI_STATE_ERROR   (3U)

LLD ran into error, returns error for all APIs other than deinit in this state.

◆ QSPI_STATE_IDLE

#define QSPI_STATE_IDLE   (0U)

Transaction is in idle state.

◆ QSPI_STATE_ADDRESS_WRITE

#define QSPI_STATE_ADDRESS_WRITE   (1U)

This transaction state indicates address to be transferred.

◆ QSPI_STATE_DATA_WRITE

#define QSPI_STATE_DATA_WRITE   (2U)

This transaction state indicates write functionality.

◆ QSPI_STATE_DATA_READ

#define QSPI_STATE_DATA_READ   (3U)

This transaction state indicates read functionality.

Typedef Documentation

◆ QSPI_DmaHandle

typedef void* QSPI_DmaHandle

The handle for DMA instance used with QSPI.

◆ QSPI_DmaChConfig

typedef void* QSPI_DmaChConfig

A handle that holds DMA configuration parameters for QSPI.

◆ QSPI_Clock_getTicks

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.

Returns
Returns system ticks in 32-bit unsigned int format

◆ QSPI_Clock_usecToTicks

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.

Parameters
usecsMicro Seconds
Returns
Returns system ticks in 32-bit unsigned int format

◆ QSPI_lld_InterruptCallback

typedef void(* QSPI_lld_InterruptCallback) (void *args)

The definition of a interrupt completion callback function used by the QSPI driver.

Parameters
argsVoid Pointer

◆ QSPI_lld_dma_readCompleteCallback

typedef void(* QSPI_lld_dma_readCompleteCallback) (void *args)

The definition of a dma read completion callback function used by the QSPI driver.

Parameters
argsVoid Pointer

◆ QSPILLD_TransactionHandle

◆ QSPILLD_InitHandle

◆ QSPILLD_Handle

typedef struct QSPILLD_Object * QSPILLD_Handle

Function Documentation

◆ QSPI_lld_init()

int32_t QSPI_lld_init ( QSPILLD_Handle  hQspi)

This function initializes the QSPI module.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
Returns
QSPI_SYSTEM_SUCCESS on success else error on failure

◆ QSPI_lld_initDma()

int32_t QSPI_lld_initDma ( QSPILLD_Handle  hQspi)

This function initializes the QSPI module in DMA Mode.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
Returns
QSPI_SYSTEM_SUCCESS on success else error on failure

◆ QSPI_lld_deInit()

int32_t QSPI_lld_deInit ( QSPILLD_Handle  hQspi)

This function de-initializes the QSPI module.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
Returns
QSPI_SYSTEM_SUCCESS on success else error on failure

◆ QSPI_lld_deInitDma()

int32_t QSPI_lld_deInitDma ( QSPILLD_Handle  hQspi)

This function de-initializes the QSPI module in DMA Mode.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
Returns
QSPI_SYSTEM_SUCCESS on success else error on failure

◆ QSPI_lld_readCmd()

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.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
writeMsgPointer to a structure QSPILLD_WriteCmdParams contains read command OPCODE, flash memory address, buffer to store the response from flash and buffer length
Returns
QSPI_SYSTEM_SUCCESS if command read was successful; else error on failure

◆ QSPI_lld_readCmdIntr()

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.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
msgPointer to a structure QSPILLD_WriteCmdParams contains read command OPCODE, flash memory address, buffer to store the response from flash and buffer length
Returns
QSPI_SYSTEM_SUCCESS if command read was successful; else error on failure

◆ QSPI_lld_writeCmd()

int32_t QSPI_lld_writeCmd ( QSPILLD_Handle  hQspi,
QSPILLD_WriteCmdParams writeMsg 
)

Function to send specific commands and write data into flash in configuration mode.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
writeMsgPointer to a structure QSPILLD_WriteCmdParams contains write command OPCODE, flash memory address, buffer to write into flash and buffer length
Returns
QSPI_SYSTEM_SUCCESS if command read was successful; else error on failure

◆ QSPI_lld_writeCmdIntr()

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.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
msgPointer to a structure QSPILLD_WriteCmdParams contains write command OPCODE, flash memory address, buffer to write into flash and buffer length
Returns
QSPI_SYSTEM_SUCCESS if command write was successful; else error on failure

◆ QSPI_lld_read()

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.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
countNumber of bytes to be read from flash.
rxBufPointer to Receive buffer
addrOffsetAddress offset
timeoutTimeout for
Returns
QSPI_SYSTEM_SUCCESS on successful read; else error on failure

◆ QSPI_lld_readDma()

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.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
countNumber of bytes to be read from flash.
rxBufPointer to receive buffer
addrOffsetAddress offset
timeouttimeout parameter
Returns
QSPI_SYSTEM_SUCCESS on successful read; else error on failure

◆ QSPI_lld_setWriteCmd()

int32_t QSPI_lld_setWriteCmd ( QSPILLD_Handle  hQspi,
uint8_t  command 
)

Function to set write command to be used.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
commandWrite command for a particular flash
Returns
QSPI_SYSTEM_SUCCESS on success, QSPI_SYSTEM_FAILURE otherwise

◆ QSPI_lld_setReadCmd()

int32_t QSPI_lld_setReadCmd ( QSPILLD_Handle  hQspi,
uint8_t  command 
)

Function to set read command to be used.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
commandRead command for a particular flash
Returns
QSPI_SYSTEM_SUCCESS on success, QSPI_SYSTEM_FAILURE otherwise

◆ QSPI_lld_setAddressByteCount()

int32_t QSPI_lld_setAddressByteCount ( QSPILLD_Handle  hQspi,
uint32_t  count 
)

Function to set number of address bytes to be used.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
countNumber of Address Bytes. This function should always be called before accessing a memory location that doesn't fit in the current address byte range.
Returns
QSPI_SYSTEM_SUCCESS on success, QSPI_SYSTEM_FAILURE otherwise

◆ QSPI_lld_setDummyBitCount()

int32_t QSPI_lld_setDummyBitCount ( QSPILLD_Handle  hQspi,
uint32_t  count 
)

Function to set number of dummy bits to be used.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
countNumber of Dummy Bits. This should be either less than 8 or a multiple of 8, because Bit count field in setup register works only if Byte count is 0.
Returns
QSPI_SYSTEM_SUCCESS on success, QSPI_SYSTEM_FAILURE otherwise

◆ QSPI_lld_setMemAddrSpace()

int32_t QSPI_lld_setMemAddrSpace ( QSPILLD_Handle  hQspi,
uint32_t  memMappedPortSwitch 
)

This function is used to switch between memory mapped and configuration mode.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
memMappedPortSwitchFlag for switching mode.
Returns
QSPI_SYSTEM_SUCCESS on success, QSPI_SYSTEM_FAILURE otherwise

◆ QSPI_lld_setRxLines()

int32_t QSPI_lld_setRxLines ( QSPILLD_Handle  hQspi,
uint32_t  rxLines 
)

Set QSPI Rx lines in the QSPI object.

This function sets the QSPI RX lines in QSPI object so that it can be used in a subsequent read

Parameters
hQspiQSPILLD_Handle of QSPI instance.
rxLinesQSPI_TransferLines value
Returns
QSPI_SYSTEM_SUCCESS on success, QSPI_SYSTEM_FAILURE otherwise

◆ QSPI_lld_setPreScaler()

int32_t QSPI_lld_setPreScaler ( QSPILLD_Handle  hQspi,
uint32_t  clkDividerVal 
)

Set the QSPI clock register divider value.

This function sets the QSPI clock control register with serial data clock divider ratio (DCLK_DIV) according to the input clock provided and the output clock required. DCLK_DIV = ((input clock) / (output clock)) - 1. This function also enables the clock for QSPI module. This can only be done if QSPI module is not busy.

Parameters
hQspiQSPILLD_Handle of QSPI instance.
clkDividerValClock divider value to be set.
Returns
QSPI_SYSTEM_SUCCESS on success, QSPI_SYSTEM_SUCCESS otherwise

◆ QSPI_lld_getInputClk()

int32_t QSPI_lld_getInputClk ( QSPILLD_Handle  hQspi,
uint32_t *  inputClk 
)

This function returns the input clock at which QSPI was programmed.

Precondition
QSPI controller has been opened using QSPI_open()
Parameters
hQspiQSPILLD_Handle of QSPI instance.
inputClkPointer where input clock frequency will be stored.
Returns
QSPI_SYSTEM_SUCCESS on success, QSPI_SYSTEM_FAILURE otherwise
See also
QSPI_init()
QSPI_open()

◆ QSPI_lld_getRxLines()

uint32_t QSPI_lld_getRxLines ( QSPILLD_Handle  hQspi)

Get QSPI Rx lines in the QSPI object.

This function returns the QSPI RX lines in QSPI object

Parameters
hQspiQSPILLD_Handle of QSPI instance.
Returns
QSPI_SYSTEM_SUCCESS on success, QSPI_SYSTEM_FAILURE otherwise

◆ QSPI_lld_isr()

void QSPI_lld_isr ( void *  args)

QSPI ISR for Read and Write Functionality.

Parameters
argsQSPILLD_Handle of QSPI instance.

◆ QSPI_lld_readCompleteCallback()

void QSPI_lld_readCompleteCallback ( void *  args)

QSPI Read complete callback for DMA mode.

Parameters
argsQSPILLD_Handle of QSPI instance.