AM64x MCU+ SDK  09.02.00
STOG

The Interconnect Isolation Gasket is a TI proprietary IP that is used to prevent a hang caused by target, which can hold up the interconnect and terminate such a transaction safely. It tracks transactions, and times out if outstanding too long, and reports the error via interrupt that can be monitored.

The TOGs help to achieve Freedom From Interference by monitoring the various VBUS transactions and providing a way to detect any errors, and helping to avoid the bus to be locked up due to a transaction error.

Features Supported

These TOGs have the following functions, to avoid these concerns:

  1. Monitors various VBUS transaction and provide a way to detect errors
  2. Helps avoid the bus to be locked up due to a transaction in error.
  3. Tracks outstanding transactions and allows for timeout/recovery.

Each of the Timeout gaskets can be programmed to a specific timeout and any transaction exceeding the timeout will result in abort of the transaction. This will also result in an error event triggered through ESM, which will in turn can be programmed to interrupt the CPU.

In addition the timeout gasket can be stopped, started and reset at anytime.

Safety diagnostics are provided for TOG module through API’s

  1. Configure the TOG
  2. Read the static registers
  3. Verify the written configuration

SysConfig Features

  • None

Features NOT Supported

  • None

Important Usage Guidelines

  • None

Example Usage

The following shows an example of SDL TOG API usage by the application to set up the TOG for monitoring for events. Events can be monitored by enabling the events in the associated ESM instance.

#include <sdl/sdlr_tog.h>

Configure a TOG instance with a timeout value

SDL_TOG_Inst instance;
int32_t status;
cfg.timeoutVal = TOG_TEST_TIMEOUTVAL;
status = SDL_TOG_init(instance, &cfg);
if (status != SDL_PASS)
{
// init failed
}

Enable the TOG interrupts

SDL_TOG_Inst instance;
int32_t status;
/* Enable interrupts */
status = SDL_TOG_setIntrEnable(instance, SDL_TOG_INTRSRC_ALL, true);
if (status != SDL_PASS)
{
// interrupt enable failed
}

Start the TOG

/* Call SDL API to enable Timeout Gasket */
status = SDL_TOG_start(instance);
if (status != SDL_PASS)
{
// start failed
}

Stop the TOG

SDL_TOG_Inst instance;
SDL_TOG_stop(instance);

Reset the TOG

/* Reset the Timeout gasket */
SDL_TOG_reset( instance );

Get the Error Information (can be called when an error occurs)

SDL_TOG_Inst instance;
/* Read error info */
status = SDL_TOG_getErrInfo(instance, &errInfo)

Acknowledge the interrupts for an interrupt source

SDL_TOG_Inst instance;
uint32_t intCount;
/* Get Transaction timeout interrupt count */
/* Clear Transaction timeout interrupt events */
if ((status == SDL_PASS) && (intCount != 0))
{
TEST_ASSERT_EQUAL_INT32(SDL_PASS, status);
}

Clear the pending interrupts for an interrupt source

API

Slave Timeout Gasket(STOG)

SDL_TOG_getIntrCount
int32_t SDL_TOG_getIntrCount(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t *pIntrCnt)
Get interrupt count.
sdlr_tog.h
SDL_TOG_ackIntr
int32_t SDL_TOG_ackIntr(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t ackCnt)
Ack interrupt source.
SDL_TOG_clrIntrPending
int32_t SDL_TOG_clrIntrPending(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc)
Clear pending interrupt source(s)
SDL_TOG_getErrInfo
int32_t SDL_TOG_getErrInfo(SDL_TOG_Inst instance, SDL_TOG_errInfo *pErrInfo)
Get timeout error information.
SDL_TOG_config
This structure contains TOG configuration information.
Definition: sdl_tog.h:159
SDL_TOG_reset
int32_t SDL_TOG_reset(SDL_TOG_Inst instance)
Reset the timeout functionality.
SDL_TOG_config::timeoutVal
uint32_t timeoutVal
Definition: sdl_tog.h:161
SDL_TOG_setIntrEnable
int32_t SDL_TOG_setIntrEnable(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrcs, bool enable)
Enable/disable interrupt source(s)
SDL_TOG_stop
int32_t SDL_TOG_stop(SDL_TOG_Inst instance)
Stop the timer counter.
SDL_TOG_INTRSRC_TRANSACTION_TIMEOUT
#define SDL_TOG_INTRSRC_TRANSACTION_TIMEOUT
Definition: sdl_ip_tog.h:110
SDL_TOG_init
int32_t SDL_TOG_init(SDL_TOG_Inst instance, const SDL_TOG_config *pConfig)
Initialize TOG module with respect of instance.
SDL_TOG_errInfo
This structure contains timeout error information.
Definition: sdl_tog.h:127
SDL_TOG_start
int32_t SDL_TOG_start(SDL_TOG_Inst instance)
Start the timer counter.
SDL_TOG_Inst
uint8_t SDL_TOG_Inst
Definition: sdl_soc_tog.h:61
SDL_TOG_INTRSRC_ALL
#define SDL_TOG_INTRSRC_ALL
Definition: sdl_ip_tog.h:116