PDK API Guide for J721E
SLV_TOG Functions

Introduction

===========================================================================

Functions

int32_t CSL_slvTogGetRevision (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, uint32_t *pRev)
 Get module revision information. More...
 
int32_t CSL_slvTogGetCfg (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, uint32_t *pTotalReads, uint32_t *pTotalWrites)
 Get module configuration information. More...
 
int32_t CSL_slvTogGetStatus (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, uint32_t *pCurrReads, uint32_t *pCurrWrites)
 Get module status information. More...
 
int32_t CSL_slvTogGetErrInfo (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, CSL_SlvTogErrInfo *pErrInfo)
 Get timeout error information. More...
 
int32_t CSL_slvTogGetIntrPending (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, uint32_t *pPendInts)
 Get masked (enabled) pending interrupt sources. More...
 
int32_t CSL_slvTogGetRawIntrPending (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, uint32_t *pRawPendInts)
 Get raw pending interrupt sources. More...
 
int32_t CSL_slvTogSetIntrPending (CSL_ksbus_vbusm_to_gasketRegs *pRegs, CSL_SlvTogIntrSrc intrSrcs)
 Set interrupt source(s) More...
 
int32_t CSL_slvTogClrIntrPending (CSL_ksbus_vbusm_to_gasketRegs *pRegs, CSL_SlvTogIntrSrc intrSrcs)
 Clear pending interrupt source(s) More...
 
int32_t CSL_slvTogSetIntrEnable (CSL_ksbus_vbusm_to_gasketRegs *pRegs, CSL_SlvTogIntrSrc intrSrcs, bool bEnable)
 Enable/disable interrupt source(s) More...
 
int32_t CSL_slvTogVerifyIntrEnable (CSL_ksbus_vbusm_to_gasketRegs *pRegs, CSL_SlvTogIntrSrc intrSrcs, bool bEnable)
 Verify Enable/disable interrupt source(s) More...
 
int32_t CSL_slvTogGetIntrCount (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, CSL_SlvTogIntrSrc intrSrc, uint32_t *pIntrCnt)
 Get interrupt count. More...
 
int32_t CSL_slvTogAckIntr (CSL_ksbus_vbusm_to_gasketRegs *pRegs, CSL_SlvTogIntrSrc intrSrc, uint32_t ackCnt)
 Ack interrupt source. More...
 
int32_t CSL_slvTogSetTimeoutVal (CSL_ksbus_vbusm_to_gasketRegs *pRegs, uint32_t timeoutVal)
 Set the timeout value. More...
 
int32_t CSL_slvTogVerifyTimeoutVal (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, uint32_t timeoutVal)
 Verify the set timeout value. More...
 
int32_t CSL_slvTogStart (CSL_ksbus_vbusm_to_gasketRegs *pRegs)
 Start the timer counter. More...
 
int32_t CSL_slvTogStop (CSL_ksbus_vbusm_to_gasketRegs *pRegs)
 Stop the timer counter. More...
 
int32_t CSL_slvTogReset (CSL_ksbus_vbusm_to_gasketRegs *pRegs)
 Reset the timeout functionality. More...
 
int32_t CSL_slvTogGetCurrTimerCnt (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, uint32_t *pTimerCnt)
 Get the current timer count value. More...
 
int32_t CSL_slvTogSetFlushModeEnable (CSL_ksbus_vbusm_to_gasketRegs *pRegs, bool bEnable)
 Enable/disable flush mode. More...
 
int32_t CSL_slvTogVerifyFlushModeEnable (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, bool bEnable)
 Verify Enable/disable flush mode. More...
 
int32_t CSL_slvTogReadBackStaticRegisters (const CSL_ksbus_vbusm_to_gasketRegs *pRegs, CSL_SlvTog_staticRegs *pStaticRegs)
 Readback Static configuration registers. More...
 

Function Documentation

◆ CSL_slvTogGetRevision()

int32_t CSL_slvTogGetRevision ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
uint32_t *  pRev 
)

Get module revision information.

This function returns the revision information for the module.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
pRev[OUT] Pointer where revision value is returned
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs or pRev are NULL

◆ CSL_slvTogGetCfg()

int32_t CSL_slvTogGetCfg ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
uint32_t *  pTotalReads,
uint32_t *  pTotalWrites 
)

Get module configuration information.

This function returns the total number of read and write scoreboard slots configured in the module.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
pTotalReads[OUT] Pointer where the total number of read slots is returned
pTotalWrites[OUT] Pointer where the total number of write slots is returned
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs, pTotalReads, or pTotalWrites are NULL

◆ CSL_slvTogGetStatus()

int32_t CSL_slvTogGetStatus ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
uint32_t *  pCurrReads,
uint32_t *  pCurrWrites 
)

Get module status information.

This function returns the current number of occupied read and write scoreboard slots.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
pCurrReads[OUT] Pointer where the current number of occupied read slots is returned
pCurrWrites[OUT] Pointer where the current number of occupied write slots is returned
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs, pCurrReads, or pCurrWrites are NULL

◆ CSL_slvTogGetErrInfo()

int32_t CSL_slvTogGetErrInfo ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
CSL_SlvTogErrInfo pErrInfo 
)

Get timeout error information.

This function returns information about a captured transaction.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
pErrInfo[OUT] Pointer where the current number of occupied read slots is returned
Returns
CSL_PASS The function completed successfully and pErrInfo contains valid information CSL_EBADARGS pRegs or pErrInfo are NULL CSL_EFAIL The function failed and there is no valid information in pErrInfo. This is because... a) there is no error pending b) the error pending did not have any captured information because there was an error pending in front of it that had already captured information.

◆ CSL_slvTogGetIntrPending()

int32_t CSL_slvTogGetIntrPending ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
uint32_t *  pPendInts 
)

Get masked (enabled) pending interrupt sources.

This function returns the masked (enabled) pending interrupt sources.

The value returned is a logical OR of the masked pending interrupt sources defined in CSL_SlvTogIntrSrc.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
pPendInts[OUT] Pointer where pending interrupt sources is returned
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs or pPendInts are NULL

◆ CSL_slvTogGetRawIntrPending()

int32_t CSL_slvTogGetRawIntrPending ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
uint32_t *  pRawPendInts 
)

Get raw pending interrupt sources.

This function returns the raw pending interrupt sources.

The value returned is a logical OR of the raw pending interrupt sources defined in CSL_SlvTogIntrSrc.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
pRawPendInts[OUT] Pointer where raw pending interrupt sources is returned
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs or pRawPendInts are NULL

◆ CSL_slvTogSetIntrPending()

int32_t CSL_slvTogSetIntrPending ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
CSL_SlvTogIntrSrc  intrSrcs 
)

Set interrupt source(s)

This function allows software to set the specified interrupt source(s).

The intrSrcs value is composed of a logical OR of the desired interrupt sources defined in CSL_SlvTogIntrSrc.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
intrSrcs[IN] Interrupt source(s) to set
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL or intrSrcs is invalid

◆ CSL_slvTogClrIntrPending()

int32_t CSL_slvTogClrIntrPending ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
CSL_SlvTogIntrSrc  intrSrcs 
)

Clear pending interrupt source(s)

This function allows software to clear the specified pending interrupt source(s).

The intrSrcs value is composed of a logical OR of the desired interrupt sources defined in CSL_SlvTogIntrSrc.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
intrSrcs[IN] Interrupt source(s) to clear
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL or intrSrcs is invalid

◆ CSL_slvTogSetIntrEnable()

int32_t CSL_slvTogSetIntrEnable ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
CSL_SlvTogIntrSrc  intrSrcs,
bool  bEnable 
)

Enable/disable interrupt source(s)

This function allows software to enable or disable the specified interrupt source(s).

The intrSrcs value is composed of a logical OR of the desired interrupt sources defined in CSL_SlvTogIntrSrc.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
intrSrcs[IN] Interrupt source(s) to clear
bEnable[IN] If true, the interrupt source(s) are enabled. If false, they are disabled.
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL or intrSrcs is invalid

◆ CSL_slvTogVerifyIntrEnable()

int32_t CSL_slvTogVerifyIntrEnable ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
CSL_SlvTogIntrSrc  intrSrcs,
bool  bEnable 
)

Verify Enable/disable interrupt source(s)

This function reads back registers to check enable or disable the specified interrupt source(s).

The intrSrcs value is composed of a logical OR of the desired interrupt sources defined in CSL_SlvTogIntrSrc.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
intrSrcs[IN] Interrupt source(s) to clear
bEnable[IN] If true, the interrupt source(s) are enabled. If false, they are disabled.
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL or intrSrcs is invalid CSL_EFAIL Verification failed

◆ CSL_slvTogGetIntrCount()

int32_t CSL_slvTogGetIntrCount ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
CSL_SlvTogIntrSrc  intrSrc,
uint32_t *  pIntrCnt 
)

Get interrupt count.

This function returns the number of pending interrupts corresponding to the specified interrupt source intrSrc as follows: 0 = No pending interrupts 1 = One pending interrupt 2 = Two pending interrupts 3 = Three or more pending interrupts

Valid values of intrSrc are:

  • CSL_SLV_TOG_INTRSRC_TRANSACTION_TIMEOUT
  • CSL_SLV_TOG_INTRSRC_UNEXPECTED_RESPONSE

CSL_EFAIL is returned if intrSrc is:

  • CSL_SLV_TOG_INTRSRC_COMMAND_TIMEOUT
Parameters
pRegs[IN] Pointer to the Timeout gasket registers
intrSrc[IN] Interrupt source
pIntrCnt[OUT] Pointer where interrupt count is returned
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs or pIntrCnt are NULL, or intrSrc is invalid

◆ CSL_slvTogAckIntr()

int32_t CSL_slvTogAckIntr ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
CSL_SlvTogIntrSrc  intrSrc,
uint32_t  ackCnt 
)

Ack interrupt source.

This function acknowledges an interrupt source by decrementing the number of pending interrupts corresponding to the specified interrupt source intrSrc by the specified ackCnt count.

Valid values of intrSrc are:

  • CSL_SLV_TOG_INTRSRC_TRANSACTION_TIMEOUT
  • CSL_SLV_TOG_INTRSRC_UNEXPECTED_RESPONSE

CSL_EFAIL is returned if intrSrc is:

  • CSL_SLV_TOG_INTRSRC_COMMAND_TIMEOUT
Parameters
pRegs[IN] Pointer to the Timeout gasket registers
intrSrc[IN] Interrupt source
ackCnt[IN] Decrement count
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL, intrSrc is invalid CSL_EFAIL ackCnt == 0 or is > # of pending interrupts

◆ CSL_slvTogSetTimeoutVal()

int32_t CSL_slvTogSetTimeoutVal ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
uint32_t  timeoutVal 
)

Set the timeout value.

This function sets the desired timeout value. Note the Timer runs on the VBUS clock and that determines the actual time.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
timeoutVal[IN] Timeout count value
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL

◆ CSL_slvTogVerifyTimeoutVal()

int32_t CSL_slvTogVerifyTimeoutVal ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
uint32_t  timeoutVal 
)

Verify the set timeout value.

This function reads the timeout register and checks the desired timeout value.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
timeoutVal[IN] Timeout count value
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL CSL_EFAIL Verification failed

◆ CSL_slvTogStart()

int32_t CSL_slvTogStart ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs)

Start the timer counter.

This function starts the timer counter.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL

◆ CSL_slvTogStop()

int32_t CSL_slvTogStop ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs)

Stop the timer counter.

This function stops the timer counter.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL

◆ CSL_slvTogReset()

int32_t CSL_slvTogReset ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs)

Reset the timeout functionality.

This function resets the timeout functionality by stopping the timer counter and clearing the timer and eon counters to 0. Note the eon bits represents the number of times free-running counter reached the configured timeout

Note that the timeout value set via the CSL_slvTogSetTimeoutVal function is unaffected by this function.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL

◆ CSL_slvTogGetCurrTimerCnt()

int32_t CSL_slvTogGetCurrTimerCnt ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
uint32_t *  pTimerCnt 
)

Get the current timer count value.

This function returns the current timer count value. This value includes the eon value in bits [31:30] and the free-running counter in bits [29:0]. Note the eon bits represents the number of times free-running counter reached the configured timeout

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
pTimerCnt[OUT] Pointer where the current timer count value is returned
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs or pTimerCnt are NULL

◆ CSL_slvTogSetFlushModeEnable()

int32_t CSL_slvTogSetFlushModeEnable ( CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
bool  bEnable 
)

Enable/disable flush mode.

This function allows software to enable/disable flush mode.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
bEnable[IN] If true, flush mode is enabled. If false, it is disabled.
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL

◆ CSL_slvTogVerifyFlushModeEnable()

int32_t CSL_slvTogVerifyFlushModeEnable ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
bool  bEnable 
)

Verify Enable/disable flush mode.

This function reads the register and checks enable/disable flush mode.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
bEnable[IN] If true, flush mode is enabled. If false, it is disabled.
Returns
CSL_PASS The function completed successfully CSL_EBADARGS pRegs is NULL

◆ CSL_slvTogReadBackStaticRegisters()

int32_t CSL_slvTogReadBackStaticRegisters ( const CSL_ksbus_vbusm_to_gasketRegs *  pRegs,
CSL_SlvTog_staticRegs pStaticRegs 
)

Readback Static configuration registers.

This function reads back configuration registers that are static.

Parameters
pRegs[IN] Pointer to the Timeout gasket registers
pStaticRegs[IN] Pointer to store the read static registers
Returns
CSL_PASS Function completed successfully CSL_EBADARGS Error with Arguments