iLLD_TC29x  1.0
How to use the Mtu driver?
Collaboration diagram for How to use the Mtu driver?:

The Memory Test Unit (MTU) controls and monitors the test, initialization and data integrity checking functions of the various internal memories in the device

The Mtu driver provides set of routines for various Mbist operations

In the following sections it will be described, how to integrate the Mtu driver into the application framework.

Sram Initialisation

Include Files

Include following header file into your C code:

#include <Mtu/IfxMtu.h>

Clear Sram (Synchronous polling mode)

The Sram initialisation in synchronous polling mode (i.e wait till the complete operation is done) can be used as:

Clear Sram (Asynchronous polling mode)

The Sram initialisation can be triggered by calling IfxMtu_clearSramStart() function, then can be queried for completion in a task using IfxMtu_isMbistDone. Once it's completed, then IfxMtu_clearSramContinue() has to be called. Note: The Safety Endinit watchdog has to be cleared before and set after for the IfxMtu_clearSramStart() and IfxMtu_clearSramContinue() functions.

Following code triggers Sram initilisation.

uint16 password = 0;
// Clear EndInit
// Set EndInit Watchdog

Sram initialisation status can be queried in a task and once done complete the operation using:

{
// Sram Clear operation done
// Clear EndInit
// Set EndInit Watchdog
}
else
{
// Sram operation is still in progress
}

Sram Error tracking

Example usage of Sram Error tracking

IfxMtu_MbistSel mbistSel = IfxMtu_MbistSel_cpu1Dspr;
Ifx_MC *mc = (Ifx_MC *)(IFXMTU_MC_ADDRESS_BASE + 0x100 * mbistSel);
// for auto-init memories: wait for the end of the clear operation
while (IfxMtu_isAutoInitRunning(mbistSel))
{}
uint32 numEtrr = 5;
// print tracked error address
{
Ifx_MC_ETRR trackedSramAddresses[IFXMTU_MAX_TRACKED_ADDRESSES];
uint8 numTrackedAddresses = IfxMtu_getTrackedSramAddresses(mbistSel, trackedSramAddresses);
for(uint32 i=0; i<numEtrr; ++i) {
printf("%d: Error Address:0x%04x, Error System Address:0x%04x \n",
i,
trackedSramAddresses[i].B.ADDR,
IfxMtu_getSystemAddress(mbistSel, trackedSramAddresses[i]));
}
}
}

Memory Tests

Non Destructive Inversion Test

Usage Example:

// Enable MTU clock
{
}
{
uint16 errAddr = 0;
// run Non distructive inversion test for cpu0 DSPR memory (Range selection disabled)
}

Checker Board Test

Usage Example:

// Enable MTU clock
{
}
{
uint16 errAddr = 0;
// run checkerboard test for cpu0 DSPR memory (Range selection disabled)
}

MarchU Test

Usage Example:

// Enable MTU clock
{
}
{
uint16 errAddr = 0;
// run March U test for cpu0 DSPR memory (Range selection disabled)
}