AM62Ax MCU+ SDK  10.01.00
Slave Timeout Gasket(STOG)

Introduction

Provides the APIs for STOG.

Sub Modules

 STOG Enumerated Data Types
 
 TOG Low-Level API
 

Data Structures

struct  SDL_TOG_errInfo
 This structure contains timeout error information. More...
 
struct  SDL_TOG_config
 This structure contains TOG configuration information. More...
 
struct  SDL_TOG_staticRegs
 Slave TOG Static Registers. More...
 

Functions

int32_t SDL_TOG_init (SDL_TOG_Inst instance, const SDL_TOG_config *pConfig)
 Initialize TOG module with respect of instance. More...
 
int32_t SDL_TOG_verifyConfig (SDL_TOG_Inst instance, const SDL_TOG_config *pConfig)
 Verifying written configuration with TOG module. More...
 
int32_t SDL_TOG_setIntrEnable (SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrcs, bool enable)
 Enable/disable interrupt source(s) More...
 
int32_t SDL_TOG_clrIntrPending (SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc)
 Clear pending interrupt source(s) More...
 
int32_t SDL_TOG_getIntrPending (SDL_TOG_Inst instance, SDL_TOG_IntrSrc *pPendInts)
 Get masked (enabled) pending interrupt sources. More...
 
int32_t SDL_TOG_ackIntr (SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t ackCnt)
 Ack interrupt source. More...
 
int32_t SDL_TOG_start (SDL_TOG_Inst instance)
 Start the timer counter. More...
 
int32_t SDL_TOG_stop (SDL_TOG_Inst instance)
 Stop the timer counter. More...
 
int32_t SDL_TOG_reset (SDL_TOG_Inst instance)
 Reset the timeout functionality. More...
 
int32_t SDL_TOG_getErrInfo (SDL_TOG_Inst instance, SDL_TOG_errInfo *pErrInfo)
 Get timeout error information. More...
 
int32_t SDL_TOG_getStaticRegisters (SDL_TOG_Inst instance, SDL_TOG_staticRegs *pStaticRegs)
 Readback Static configuration registers. More...
 
int32_t SDL_TOG_setFlushMode (SDL_TOG_Inst instance, bool enable)
 Enable/disable flush mode. More...
 
int32_t SDL_TOG_getIntrCount (SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t *pIntrCnt)
 Get interrupt count. More...
 

TOG configuration flags

This is the SDL-FL API documentation for the VBUSM Slave Timeout Gasket module.

The following procedure describes how to properly use this SDL-FL API:

  1. Call SDL_TOG_init with setting Timeout Value to configure the desired timeout counter value if you wish a shorter timeout than the default maximum timeout.
  2. Enable/disable interrupt sources as needed by calling SDL_TOG_setIntrEnable. Note that all interrupt sources are enabled by default.
  3. Call SDL_TOG_start to start the timer counting
  4. If an interrupt is signaled from the gasket, then... a) Call SDL_TOG_getIntrPending to determine the pending interrupt sources b) Clear interrupt source(s) by calling SDL_TOG_clrIntrPending c) Service the cause of the interrupt as needed. If the system determines that it needs to flush all outstanding transactions (for instance, because the main SoC is in an error condition and is going to be reset), software may do this by calling SDL_TOG_setFlushMode with true. Once all transactions are flushed, software should exit Flush mode by calling SDL_TOG_setFlushMode with false. If the destination side is in reset, this should trigger hardware flush, keeping the gasket returning any transactions that arrive. d) The SDL_TOG_getErrInfo function can be called to get detailed information about the error if needed. e) Ack the interrupt by calling SDL_TOG_getIntrCount and SDL_TOG_ackIntr
typedef uint8_t SDL_TOG_cfgCtrl
 This enumerator defines the possible configuration flags. More...
 
#define SDL_TOG_CFG_TIMEOUT   0x01U
 
#define SDL_TOG_CFG_INTR_PENDING   0x02U
 

Macro Definition Documentation

◆ SDL_TOG_CFG_TIMEOUT

#define SDL_TOG_CFG_TIMEOUT   0x01U

Timeout Configuration Flag

◆ SDL_TOG_CFG_INTR_PENDING

#define SDL_TOG_CFG_INTR_PENDING   0x02U

Pending interrupt Configuration Flag

Typedef Documentation

◆ SDL_TOG_cfgCtrl

typedef uint8_t SDL_TOG_cfgCtrl

This enumerator defines the possible configuration flags.

Function Documentation

◆ SDL_TOG_init()

int32_t SDL_TOG_init ( SDL_TOG_Inst  instance,
const SDL_TOG_config pConfig 
)

Initialize TOG module with respect of instance.

This function allows software to initialize TOG module

The pConfig contains the timeout value and interrupt source

Parameters
instance[IN] TOG instance
pConfig[IN] Pointer to store the configuration
Returns
SDL_PASS The function completed successfully SDL_EBADARGS instance is invalid or pConfig is NULL

◆ SDL_TOG_verifyConfig()

int32_t SDL_TOG_verifyConfig ( SDL_TOG_Inst  instance,
const SDL_TOG_config pConfig 
)

Verifying written configuration with TOG module.

This function allows software to verifying TOG module

The pConfig contains the timeout value and interrupt source

Parameters
instance[IN] TOG instance
pConfig[IN] Pointer to store the configuration
Returns
SDL_PASS The function completed successfully SDL_EBADARGS instance is invalid or pConfig is NULL

◆ SDL_TOG_setIntrEnable()

int32_t SDL_TOG_setIntrEnable ( SDL_TOG_Inst  instance,
SDL_TOG_IntrSrc  intrSrcs,
bool  enable 
)

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

Parameters
instance[IN] TOG instance
intrSrcs[IN] Interrupt source(s) to set or clear
enable[IN] If true, the interrupt source(s) are enabled. If false, they are disabled.
Returns
SDL_PASS The function completed successfully SDL_EBADARGS instance or intrSrcs are invalid

◆ SDL_TOG_clrIntrPending()

int32_t SDL_TOG_clrIntrPending ( SDL_TOG_Inst  instance,
SDL_TOG_IntrSrc  intrSrc 
)

Clear pending interrupt source(s)

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

The intrSrc value is composed of a logical OR of the desired interrupt sources defined in SDL_TOG_IntrSrc.

Parameters
instance[IN] TOG instance
intrSrc[IN] Interrupt source(s) to clear
Returns
SDL_PASS The function completed successfully SDL_EBADARGS instance or/and intrSrc are invalid

◆ SDL_TOG_getIntrPending()

int32_t SDL_TOG_getIntrPending ( SDL_TOG_Inst  instance,
SDL_TOG_IntrSrc 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 SDL_TOG_IntrSrc.

Parameters
instance[IN] TOG instance
pPendInts[OUT] Pointer where pending interrupt sources is returned
Returns
SDL_PASS The function completed successfully SDL_EBADARGS instance is invalid or pPendInts are NULL

◆ SDL_TOG_ackIntr()

int32_t SDL_TOG_ackIntr ( SDL_TOG_Inst  instance,
SDL_TOG_IntrSrc  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:

  • SDL_TOG_INTRSRC_TRANSACTION_TIMEOUT
  • SDL_TOG_INTRSRC_UNEXPECTED_RESPONSE

SDL_EFAIL is returned if intrSrc is:

  • SDL_TOG_INTRSRC_COMMAND_TIMEOUT
Parameters
instance[IN] TOG instance
intrSrc[IN] Interrupt source
ackCnt[IN] Decrement count
Returns
SDL_PASS The function completed successfully SDL_EBADARGS pRegs is NULL, intrSrc is invalid SDL_EFAIL ackCnt == 0 or is > # of pending interrupts

◆ SDL_TOG_start()

int32_t SDL_TOG_start ( SDL_TOG_Inst  instance)

Start the timer counter.

This function starts the timer counter.

Parameters
instance[IN] TOG instance
Returns
SDL_PASS The function completed successfully SDL_EBADARGS pRegs is NULL

◆ SDL_TOG_stop()

int32_t SDL_TOG_stop ( SDL_TOG_Inst  instance)

Stop the timer counter.

This function stops the timer counter.

Parameters
instance[IN] TOG instance
Returns
SDL_PASS The function completed successfully SDL_EBADARGS pRegs is NULL

◆ SDL_TOG_reset()

int32_t SDL_TOG_reset ( SDL_TOG_Inst  instance)

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 SDL_TOG_setTimeoutVal function is unaffected by this function.

Parameters
instance[IN] TOG instance
Returns
SDL_PASS The function completed successfully SDL_EBADARGS instance is invalid

◆ SDL_TOG_getErrInfo()

int32_t SDL_TOG_getErrInfo ( SDL_TOG_Inst  instance,
SDL_TOG_errInfo pErrInfo 
)

Get timeout error information.

This function returns information about a captured transaction.

Parameters
instance[IN] TOG instance
pErrInfo[OUT] Pointer where the current number of occupied read slots is returned
Returns
SDL_PASS The function completed successfully and pErrInfo contains valid information SDL_EBADARGS pRegs or pErrInfo are NULL SDL_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.

◆ SDL_TOG_getStaticRegisters()

int32_t SDL_TOG_getStaticRegisters ( SDL_TOG_Inst  instance,
SDL_TOG_staticRegs pStaticRegs 
)

Readback Static configuration registers.

This function reads back configuration registers that are static.

Parameters
instance[IN] TOG instance
pStaticRegs[OUT] Pointer to store the read static registers
Returns
SDL_PASS Function completed successfully SDL_EBADARGS Error with Arguments

◆ SDL_TOG_setFlushMode()

int32_t SDL_TOG_setFlushMode ( SDL_TOG_Inst  instance,
bool  enable 
)

Enable/disable flush mode.

This function allows software to enable/disable flush mode.

Parameters
instance[IN] TOG instance
enable[IN] If true, flush mode is enabled. If false, it is disabled.
Returns
SDL_PASS The function completed successfully SDL_EBADARGS pRegs is NULL

◆ SDL_TOG_getIntrCount()

int32_t SDL_TOG_getIntrCount ( SDL_TOG_Inst  instance,
SDL_TOG_IntrSrc  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:

  • SDL_TOG_INTRSRC_TRANSACTION_TIMEOUT
  • SDL_TOG_INTRSRC_UNEXPECTED_RESPONSE

SDL_EFAIL is returned if intrSrc is:

  • SDL_TOG_INTRSRC_COMMAND_TIMEOUT
Parameters
instance[IN] TOG instance
intrSrc[IN] Interrupt source
pIntrCnt[OUT] Pointer where interrupt count is returned
Returns
SDL_PASS The function completed successfully SDL_EBADARGS pIntrCnt are NULL, or instance or intrSrc are invalid