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:
- Monitors various VBUS transaction and provide a way to detect errors
- Helps avoid the bus to be locked up due to a transaction in error.
- 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
- Configure the TOG
- Read the static registers
- Verify the written configuration
SysConfig Features
Features NOT Supported
Important Usage Guidelines
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 the below file to access the APIs
#include <sdl/sdlr_mtog.h>
Initialization structure for MCU ESM instance
{
.enableBitmap = {0x04000000u, 0x00000000u, 0x00000000u, 0x00000000u,
},
.priorityBitmap = {0x04000000u, 0x00000000u, 0x00000000u, 0x00000000u,
},
.errorpinBitmap = {0x04000000u, 0x00000000u, 0x00000000u, 0x00000000u,
},
};
Event handler API
void MTOG_eventHandler( uint32_t instanceIndex )
{
int32_t status = SDL_PASS;
if (status == SDL_PASS)
{
}
else{
}
doneFlag = true;
return;
}
ESM callback function.
int32_t SDL_ESM_applicationCallbackFunction(SDL_ESM_Inst esmInst,
SDL_ESM_IntType esmIntrType,
uint32_t grpChannel, uint32_t
index, uint32_t intSrc,
void *arg)
{
int32_t retVal = SDL_PASS;
MTOG_eventHandler(instanceIndex);
DebugP_log(
" ESM Call back function called : instType 0x%x, intType 0x%x, " \
"grpChannel 0x%x, index 0x%x, intSrc 0x%x \n",
esmInst, esmIntrType, grpChannel,
index, intSrc);
IntrDisable(intSrc);
return retVal;
}
Initialize ESM
SDL_ESM_init(SDL_ESM_INST_MCU_ESM0, &MTOG_Example_esmInitConfig_MCU, SDL_ESM_applicationCallbackFunction, &apparg);
Configure a TOG instance with a timeout value
uint32_t instance;
int32_t status=0;
uint32_t ESMEventNumber;
ESMEventNumber = SDLR_MCU_ESM0_ESM_LVL_EVENT_MCU_MASTER_SAFETY_GASKET0_TIMED_OUT_0;
if (status != SDL_PASS)
{
result = -1;
}
Call SDL API to enable Timeout Gasket
if (status != SDL_PASS)
{
result = -1;
}
Inject master timeout error
if (status != SDL_PASS)
{
result = -1;
}
Wait for MTOG Interrupt
while ((!doneFlag)
&& (timeoutCount++ < MTOG_MAX_TIMEOUT_VALUE))
{
MTOG_eventHandler(instanceIndex);
}
if(timeoutCount >= MTOG_MAX_TIMEOUT_VALUE)
{
result = -1;
}
Disable ESM Interrupts
if (status != SDL_PASS)
{
result = -1;
}
API
APIs for SDL MTOG