Other Parts Discussed in Thread: TMS570LC4357
Dear All,
I am planning to perform a selftest using the SL-selftest function provided by the TMS570LS3137 chip.
There are several functions in sl_selftest.c, so I'm trying to create a routine to selftest using those functions.
For the SRAM and FLASH tests, I simply called the function and confirmed that it returned TRUE, but I'm not sure how to test the CPU and clock.
1. First, I try to test the cpu test using the code below, but it doesn't work. Could you please check if my coding is correct?
-----------------------------------
boolean xBtmSdlSelfTest(void)
{
SL_SelfTest_Result flash_stResult;
SL_SelfTest_Result sram_stResult;
SL_STC_Config stcSelfTestConfig;
stcSelfTestConfig.stcClockDiv = 0; // STC Clock divider = 1
stcSelfTestConfig.intervalCount = 1; //One interval only
stcSelfTestConfig.restartInterval0 = TRUE; // Start from interval 0
stcSelfTestConfig.timeoutCounter = 0xFFFFFFFF; //Timeout counter
if((SL_SelfTest_STC(STC_RUN, TRUE, &stcSelfTestConfig) == TRUE) &&
(SL_SelfTest_Flash(FLASH_ECC_TEST_MODE_1BIT, TRUE, &flash_stResult) == TRUE) &&
(SL_SelfTest_SRAM(SRAM_ECC_ERROR_FORCING_1BIT, TRUE, &sram_stResult) == TRUE)) {
return TRUE;
}else {
return FALSE;
}
}
------------------------------------
2. Can you show me some example code to see what API should be used for the clock test?
Best Regards,
IBLEE