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.

How to test and confirm ECC-RAM works on TMS320F28377D !

Other Parts Discussed in Thread: TMS320F28377D

Hello, 

I am trying to test and confirm  ECC works on TMS320F28377D processor.

In my case, I have the application code in flash and want to add this ECC test feature to it . Am not sure if ECC-flash feature can work ,but surely test on  ECC-RAM should work.   

I think testing ECC in RAM would be easy rather than to check in flash.

Can I test ECC-RAM feature while my application code is in flash ??

I read  few posts , TRM and tried the ECC-RAM test feature during run-time.But its not working.

Any example code will help me a lot,

I  require your help/guidance.

Thank you, 

Prashanth

 

  • Hi Prashanth,
    I will move your post to the C2000 group where they can best help answer your question.
  • Hi Prashanth,

    Need some more clarification on the requirement.

    ECC logic on flash and RAM is separate and testing ECC logic on RAM does not cover logic on Flash.

    Let us know which logic you want to test.

    Regards,

    Vivek Singh

  • Thanks Vivek for your swift reply !
    I would like to test ECC logic on RAM, since my application code is running on flash.


    Thanks,
    Prashanth
  • Prashanth,

    Can I test ECC-RAM feature while my application code is in flash ??

    Yes, this should be fine.

    I read  few posts , TRM and tried the ECC-RAM test feature during run-time.But its not working.

    Any example code will help me a lot,

    We do not have example code for this. If you can explain the issue or send me your code, I can see if there is something missing.

    Regards,

    Vivek Singh

  • Prashanth, Were you able to run this?
  • No I am not able to run this.
    Here is my code -

    const Uint32 pattern = 0;


    DINT;

    InitPieCtrl();

    IER = 0x0000;
    IFR = 0x0000;

    //InitPieVectTable();
    PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
    EINT;
    ERTM;


    DINT;

    InitPieCtrl();

    IER = 0x0000;
    IFR = 0x0000;

    //InitPieVectTable();
    PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
    EINT;
    ERTM;

    int bv = 0;

    volatile Uint32* addr = (volatile Uint32*)(0xB000); // D01

    Uint32 value_saved = HWREG(addr);

    for(bv = 0; bv < 10; bv++)
    {

    // Set a word of memory to a known value
    HWREG(addr) = pattern;

    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");

    // Change the memory mapping of ECC RAM from Functional Mode to Data or Parity Mode using the DxTEST register
    EALLOW;
    MemCfgRegs.DxTEST.bit.TEST_D0 = 0x1; // Data Mode

    MemCfgRegs.DxTEST.bit.TEST_D1 = 0x1; // Data Mode


    HWREG(addr) = HWREG(addr) ^ 0x1;

    // MemCfgRegs.DxTEST.bit.TEST_D0 = 0x2; //Parity Mode

    // MemCfgRegs.DxTEST.bit.TEST_D1 = 0x2;

    // HWREG(addr) = HWREG(addr) ^ 0x1;

    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    // Change the memory mapping back to Functional Mode
    //EALLOW;
    MemCfgRegs.DxTEST.bit.TEST_D0 = 0x0;
    MemCfgRegs.DxTEST.bit.TEST_D1 = 0x0;

    //EDIS;

    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");

    }
    uint32_t temp = HWREG(addr);


    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");
    __asm(" NOP");


    if((MemoryErrorRegs.CERRFLG.bit.CPURDERR == 1 ) || ( MemoryErrorRegs.UCERRFLG.bit.CPURDERR == 1 ))
    {
    SCIWriteString("\n\r memory ECC test completed\n\r");

    }
    else
    {
    SCIWriteString("\n\r memory ECC test not completed\n\r");
    }



    MemCfgRegs.DxTEST.bit.TEST_D0 = 0x1; // Data Mode

    MemCfgRegs.DxTEST.bit.TEST_D1 = 0x1; // Data Mode

    HWREG(addr) = value_saved;

    MemCfgRegs.DxTEST.bit.TEST_D0 = 0x0; // Data Mode

    MemCfgRegs.DxTEST.bit.TEST_D1 = 0x0; // Data Mode

    EDIS;



    Thanks
    Prashanth
  • Please refer following E2E post on similar issue -

    Regards,

    Vivek Singh

  • Did it help you in resolving the issue?
  • Closing the thread assuming issue is resolved. If you still have issues, please reopen it or start a new post.