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: ECC Flash Test

Part Number: TMS320F280049
Other Parts Discussed in Thread: TMDSCNCD280049C, TMDSHSECDOCK

We activate the ECC feature from linker file.

After that we active the ECC register to trigger an interruot each time the ECC found an single bit error.

We inject three errors in error in command line --ecc:data_error in different parts of the code.

The problem: The interrupt is triggered just one time. When the code run the same error again the ECC count increments but the interrupt is not triggered.

Note: The interrupt code clears the interrupt flags and the ECC status.

SW Toolset:
Code Composer Studio 10.0.0.00010
C2800 Compiler Tools 20.2.1 com.ti.cgt.c2000.19.win32.feature.group  Texas Instruments
 
HW Toolset:
TMDSCNCD280049C Eval Board  + TMDSHSECDOCK
  • Jordan,

    Just to be clear:  You are able to confirm that the linker inserted all the errors in the image as expected - correct?  It is just that the interrupt is not triggered except for the first error location - correct?  Please confirm.

    What is the error threshold that you used?  

    Thanks and regards,
    Vamsi

  • Vamsi,
     
    Thanks a lot for your prompt response. 
     
    To answer your questions:
    • "You are able to confirm that the linker inserted all errors as expected?" / "Is it just that the interrupt is not triggered except for the first error?" Yes. When the first error is encountered, the interrupt flag is set and the interrupt routine is called. The interrupt flag is cleared. Debugging the code all the way to the second error, we see that the interrupt flag is set again, but the interrupt routine is not called. SInce the interrupt flag is set, the errors are inserted as expected
    We originally set up the threshold to 0. So that we were able to identify the first error found. We also tried setting the threshold to 3, the same behavior was observed (the interrupt was triggered just once).
     
    We configure single bit errors (0x40) in three different code locations using the "--ecc:data_error" option in the C2000 linker options in Code Composer. Regardless of the location of the errors, only the first error executed would trigger the interrupt. We are setting them up using function names + offset (using as example SPRU513T, section 8.4.12, where they use main+2).
     
    Please let us know if you need any additional details.

  • Jordan,

    Thank you for the info.  Threshold of 0 is correct, since you want to get an interrupt every time.  

    Can you share your ISR code (you can remove any proprietary code)?

    Thanks and regards,

    Vamsi

  • This is the ISR code:

    __interrupt void eccFlashSingleErrISR(void)
    {
        static U16 eccSingleErrCount = 0U;
        eccSingleErrCount++;
        if(NUMBER_FAILURE <= eccSingleErrCount)
        {
            while(1)
            {
                // Loop here until a WDT timeout/reset at which time the exception will be reported.
            }
        }
        //Clear the interrupt
        EALLOW;
        flash0EccRegs->ERR_INTCLR.bit.SINGLE_ERR_INTCLR = 1U;
        flash0EccRegs->ERR_STATUS_CLR.all               = 0x00030003U;
        EDIS;
        // Acknowledge this interrupt to receive more interrupts from group 11
        pieREG->PIE_O_ACK = INTERRUPT_ACK_GROUP11;
    } // end of eccFlashSingleErrISR

  • Jordan,

    Thank you. Give me a day or two.  I will review/try it and let you know.

    Thanks and regards,

    Vamsi

  • Jordan,

    1)  As per the documentation for flash single-bit error in TRM (please see below), the interrupt occurs when one more error occurs after ERR_CNT equals THRESHOLD+1.  Do you see the interrupt getting set at the first error read itself or during the second error read? Please confirm.   

    When the ERR_CNT value equals THRESHOLD+1 value and a single bit error occurs, the SINGLE_ERR_INT flag is set, and an interrupt (FLASH_CORRECTABLE_ERR on C28x PIE has to be enabled for interrupt, if needed) is fired.

    2) Could you check whether or not the below two writes went through by looking at the memory window after executing these instructions?

    flash0EccRegs->ERR_INTCLR.bit.SINGLE_ERR_INTCLR = 1U;

    pieREG->PIE_O_ACK = INTERRUPT_ACK_GROUP11;

    Thanks and regards,

    Vamsi

  • Vamsi,

    The issue was in the line:

    pieREG->PIE_O_ACK = INTERRUPT_ACK_GROUP11;

    The group of the ECC flash interrupt is 12 instead of 11.

    Thanks and regards,

    Jordan

  • Jordan,

    Glad it is the issue.  I looked at your code and it looked custom to me and hence asked to check those statements.

    Thanks and regards,
    Vamsi