This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: Is there example code for self-testing the new peripheral ECC RAM?

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

I have a couple of projects based on the TMS570LS3137, and the original TI-example software for this processor had many peripheral-RAM-parity self-test functions. On my new TMS570LC4357 project, I have gotten the Parity-self-test functions to work with minor modifications, but I have not been able to get the peripheral ECC self-tests to work (like CAN, DMA, or MIBSPI). The only example code I have found is in C:\ti\Hercules\Hercules Safety MCU Demos\4.0.0\TMS570LC43x_target_sources or what is generated by HalCoGen. The Safety-demo-code includes some function-prototypes for dmaECCCheck and canXECCCheck, but no source. And I could not find any configuration in HalCoGen to cause it to generate any Parity/ECC self-test code. 

Is there any example-code for these DMA, CAN, and/or MIBSPI ECC-self-test features?

Thanks,

Jim

  • Hello Jim,

    You can use the APIs of SafeTI Diagnostic Library (SDL) for peripheral selftest.

    1. DMA: 

            SL_SelfTest_DMA(DMA_ECC_TEST_MODE_1BIT);

            SL_SelfTest_DMA(DMA_ECC_TEST_MODE_2BIT);

            SL_SelfTest_DMA(DMA_ECC_TEST_MODE_1BIT_FAULT_INJECT);

            SL_SelfTest_DMA(DMA_ECC_TEST_MODE_2BIT_FAULT_INJECT);

    2. CAN:

            SL_SelfTest_CAN(CAN_ECC_TEST_MODE_1BIT, SL_DCAN1);

            SL_SelfTest_CAN(CAN_ECC_TEST_MODE_2BIT, SL_DCAN1);

            SL_SelfTest_CAN(CAN_ECC_TEST_MODE_1BIT_FAULT_INJECT, SL_DCAN1);

            SL_SelfTest_CAN(CAN_ECC_TEST_MODE_2BIT_FAULT_INJECT, SL_DCAN1);

    3. MibSPI:

            SL_SelfTest_MibSPI(MIBSPI_ECC_TEST_MODE_1BIT, SL_MIBSPI1);

            SL_SelfTest_MibSPI(MIBSPI_ECC_TEST_MODE_2BIT, SL_MIBSPI1);

            SL_SelfTest_MibSPI(MIBSPI_ECC_TEST_MODE_1BIT_FAULT_INJECT, SL_MIBSPI1);                   

            SL_SelfTest_MibSPI(MIBSPI_ECC_TEST_MODE_2BIT_FAULT_INJECT, SL_MIBSPI1);

    Please read the demo code of SDL.