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.

TMS320F280049: Testing RAM ECC

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Dear Champs,

I am asking this for our customer.

The user has tested RAM parity without problem, but the user has problems on testing ECC RAM and Data.

The user is referring to 

C:\ti\c2000\C2000Ware_3_01_00_00\libraries\diagnostic\f28004x\examples\sdl_ex_ram_ecc_parity_test

Questions:

1) The user tested as follows. It was successful in testing RAM parity, but fails in ECC and DATA. Would you please show us if there is anything wrong?

// Testing PARITY

#pragma DATA_SECTION(Ls2_Ram_1_U32,          "ramls2");

volatile U32 Ls2_Ram_1_U32              = 0x00000000U;

MemCfg_setTestMode(MEMCFG_SECT_LS2, MEMCFG_TEST_WRITE_PARITY);

Ls2_Ram_1_U32 = 0x00000001U;

MemCfg_setTestMode(MEMCFG_SECT_LS2, MEMCFG_TEST_FUNCTIONAL);

Read_Back_Data_U32 = Ls2_Ram_1_U32;

 

// Testing DATA

#pragma DATA_SECTION(Ls2_Ram_1_U32,          "ramls2");

volatile U32 Ls2_Ram_1_U32              = 0x00000000U;

MemCfg_setTestMode(MEMCFG_SECT_LS2, MEMCFG_TEST_WRITE_DATA);

Ls2_Ram_1_U32 = 0x00000001U;

MemCfg_setTestMode(MEMCFG_SECT_LS2, MEMCFG_TEST_FUNCTIONAL);

Read_Back_Data_U32 = Ls2_Ram_1_U32;

 

// Testing ECC

#pragma DATA_SECTION(M1_Ram_1_U32,           "ramm1");

volatile U32 M1_Ram_1_U32               = 0x00000000U;

MemCfg_setTestMode(MEMCFG_SECT_M1, MEMCFG_TEST_WRITE_ECC);

M1_Ram_1_U32 = 0x00000001U;

MemCfg_setTestMode(MEMCFG_SECT_M1, MEMCFG_TEST_FUNCTIONAL);

Read_Back_Data_U32 = M1_Ram_1_U32;

2) During RAM ECC testing, PC ran to Line 65 (below fig. 1), the user tried to use MemCfg_setTestMode() to change memory M1 to "functional" mode, UCERRFLG.CPURDERR was triggered. And then the user was trying to stepped into function MemCfg_setTestMode(), UCERRFLG.CPURDERR was triggered when the user stepped to Line 400 (below Fig. 2). DXTEST.TEST_M1 was cleared to 00b at Line 399 and then set to 10b at Line 400.

Would you please help us clarify why and how this happened?

Fig. 1

Fig 2.

Wayne Huang

  • HI Wayne,

    Not clear what is the exact issue here. If user is testing the ECC, then UCERRFLG.CPURDERR flag will be set. Is the issue being, when user trying to use MemCfg_setTestMode() function to change memory M1 to "functional" mode (code at line # 65), it is not happening? Did user check the register value in CCS register expression view after executing the function and verified the same ?

    Regards,

    Vivek Singh

  • Dear Vivek,

    Let me describe it in more detail.

    From Table 3-12, 

    single-bit error should be related to CERRFLG.CPURDERR

    double-bit error should be related to UCERRFLG.CPURDERR

    The user was testing "single-bit error".

    When the user stepped over Line 63 and Line 64, everything seemed as expected.

    It was still as expected when he stepped into Line 65 and then stepped into memcfg.c to Line 399.

    But there was something wrong when he stepped over Line 400.

    DXTEST.TEST_M1 could not be restored to MEMCFG_TEST_FUNCTION

    UCERRFLG.CPURDERR was set to 1.

    In his expectation, CERRFLG.CPURDERR should happen after reading M1 because he was testing ECC single-bit error.

    Would you please help clarify if there is something wrong or if our understanding is not correct?

    Wayne Huang

  • Wayne,

    To create single bit error, user need to do read modify write and make sure only one bit get inverted. In the code at line #64 absolute value is getting written to ECC (test mode is selected as "MEMCFG_TEST_WRITE_ECC") which can flip multiple bits hence generate uncorrectable error instead of correctable error. Please change that code to read the ECC value and then flip one bit only.

    Regards,

    Vivek Singh

  • Dear Vivek,

    We are still confused.

    In the first post, you can see the user declare memory content as 0x00000000, and then write 0x00000001 at line #64.

    #pragma DATA_SECTION(M1_Ram_1_U32,           "ramm1");

    volatile U32 M1_Ram_1_U32               = 0x00000000U;

    MemCfg_setTestMode(MEMCFG_SECT_M1, MEMCFG_TEST_WRITE_ECC);

    M1_Ram_1_U32 = 0x00000001U;

    MemCfg_setTestMode(MEMCFG_SECT_M1, MEMCFG_TEST_FUNCTIONAL);

    Read_Back_Data_U32 = M1_Ram_1_U32;

    Doesn't this mean only one bit is changed?

    Would you please help us clarify in more detail?

    Or show us codes to exemplify what you said in your last post?

    Wayne Huang

  • Wayne,

    The function "MemCfg_setTestMode(MEMCFG_SECT_M1, MEMCFG_TEST_WRITE_ECC);" is setting the TEST MODE as ECC which means next line of code is updating the ECC value not data and that is not just one bit. If you want to update the data then please change the TEST MODE to DATA (MemCfg_setTestMode(MEMCFG_SECT_M1, MEMCFG_TEST_WRITE_DATA) and that should fix the issue.

    Please see below the definition of these defines in memcfg.h file -

    typedef enum
    {
        //! Functional mode
        MEMCFG_TEST_FUNCTIONAL   = 0,
        //! Writes allowed to data only
        MEMCFG_TEST_WRITE_DATA   = 1,
        //! Writes allowed to ECC only (for DxRAM)
        MEMCFG_TEST_WRITE_ECC    = 2,
        //! Writes allowed to parity only (for LSxRAM, GSxRAM, and MSGxRAM)
        MEMCFG_TEST_WRITE_PARITY = 2
    } MemCfg_TestMode;

    Regards,

    Vivek Singh