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.

Flash ECC and RAM ECC Test

Other Parts Discussed in Thread: RM48L530

Hello:

I want to test Flash ECC, Ram ECC and FEE .etc. However, when I use fault_inject, the test type, I can't find any change in the ESM register. Is the way right? Is there any document about the test?

best regards

Jeffer 

  • In addition, my CPU is RM48L920 and RM48L530
  • Hi Jeffer,
    Can you tell me the sequence how you are testing them?
  • Hi Charles,

    I run the code as below :

    retVal = SL_SelfTest_SRAM(SRAM_ECC_1BIT_FAULT_INJECTION, TRUE, &failInfoTCMRAM);
    retval = ((esmREG->SR1[1U] >> ESM_G1ERR_B0TCM_CORRERR)&0x01);

    The retval = 1, therefore I can believe that the SRAM 1bit error has been injected. Then I run:

    retVal = SL_SelfTest_SRAM(SRAM_ECC_ERROR_FORCING_1BIT, TRUE, &failInfoTCMRAM);
    retval = ((esmREG->SR1[1U] >> ESM_G1ERR_B0TCM_CORRERR) & 0x01);

    Now the retval = 0, which means the falut has been corrected. Is that right?

    Samething, when I run the code like:

    retVal = SL_SelfTest_Flash(FLASH_ADDRESS_ECC_FAULT_INJECT, TRUE, &failInfoFlash);

    Then I observe the ESM register. However nothing changes.

    I think that if I use the fault inject test type, like FLASH_ADDRESS_ECC_FAULT_INJECT,
    FLASH_ADDRESS_PARITY_FAULT_INJECT , FLASH_ECC_TEST_MODE_2BIT_FAULT_INJECT, the fault should be found. The value of ESM register should be changed.

    For RAM test, only when I use the SRAM_ECC_1BIT_FAULT_INJECTION, the ESM register will be changed. However, when I use SRAM_ECC_2BIT_FAULT_INJECT, SRAM_ECC_ERROR_PROFILING_FAULT_INJECT, the ESM register is same as before.

    Is that right? Why the ESM register value doesn't change? How can I inject ECC fault in Flash and Ram? How to test the function?

    Best Regards,

    Jeffer
  • Hi Jeffer,
    Did you enable the ECC checking in the CPU? Please check bit27,26,25 of the Auxillary Control Register in the CPU? They should be set when you run the test.
  • Hi Calrles,

    Yes, I have set the bit27,26,25, 00, 01, 02 of the Auxillary Control Register in the CPU. Therefore, when I run the code:
    retVal = SL_SelfTest_SRAM(SRAM_ECC_1BIT_FAULT_INJECTION, TRUE, &failInfoTCMRAM);
    The value of ESM Register stat1 changes from 0x0 to 0x14000000.

    But when I run the codes :

    retVal = SL_SelfTest_SRAM(SRAM_ECC_2BIT_FAULT_INJECT, TRUE, &failInfoTCMRAM);

    and:

    retVal = SL_SelfTest_SRAM(SRAM_ECC_ERROR_PROFILING_FAULT_INJECT, TRUE,
    &failInfoTCMRAM);

    and:
    retVal = SL_SelfTest_Flash(FLASH_ADDRESS_ECC_FAULT_INJECT, TRUE, &failInfoFlash);

    and:

    retVal = SL_SelfTest_Flash(FLASH_ADDRESS_PARITY_FAULT_INJECT, TRUE, &failInfoFlash);

    and:

    retVal = SL_SelfTest_Flash(FLASH_ECC_TEST_MODE_2BIT_FAULT_INJECT, TRUE, &failInfoFlash);

    respectively. The value of ESM register still equele to 0x0. Why? Is that right?

    Best regards

    Jeffer
  • Hi Jeffer,
    Did you check the ESMSR2 and ESMSR3 registers too? Are they also 0 when you run all these different tests? For example, if you have a ECC 2-bit error on the SRAM then it should set ESMSR3 bit 3 or bit 5 depending which TCM interface you access. The CPU will also abort. If you place a breakpoint at 0x10 of the vector table you should see the CPU taking the exception for a double bit ECC error.
  • Hi Charles,

    As u said, I can find the ESMSR3 changes to 1. But it will be cleared in the ramErrorFound at once. That's why I can't find the ESMSR3 changes after running the code.

    How about the flash? Are they same? How can I inject fault?

    Another question is if I want to use external RAM, can use the Pbist program to test the external RAM? How can I do Pbist on the extenal RAM?

    Best Regards

    Jeffer
  • Hi Jeffer,

    The SL_SelfTest_Flash() will enable the corresponding diagnostic mode in the flash controller and perform the fault injection. You should see the ESM errors too.

    The diagnostic test does not cover external memory. You will need to come up with your own test for them.

    Please also take a look at the below two posts that might provide more insights.

    e2e.ti.com/.../497979
    e2e.ti.com/.../1800406