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.

TCRAM ECC: Unexpected DATA ABORT



Test 1:

To insert a single bit error and expecting an interrupt.

The below is the test sequence followed:

  1. Disable ECC in CPU by using the code given by the TI
  2. Disable ECC in EVEN RAM WRAPPER (0xFFFF F800) and enable ‘ECC WR EN’. Modifying from ‘0x0000 000A’ to ‘0x0000 0105’.
  3. Modify the RAM ECC DATA to ‘0x6E6E 6E6E’ from ‘0x0C0C 0C0C’. Note modified 64bit data.
  4. Enable ECC in RAM WRAPPER (0xFFFF F800) and disable ‘ECC WR EN’. Modifying from ‘0x0000 0105’ to ‘0x0000 000A’.
  5. Enable ECC in CPU by using the code given by TI. The below are the observations observed while executing this step.
    1. After the step ‘MCR     P15, #0, R4, C1, C0, #1’ observed that the RAM DATA and the RAM ECC are modified as ‘0xADOB ADOB 0x0000 0001’ and ‘0xADOB ADOB 0x6E6E 6E6F’ respectively.
    2. The next step is ‘ISB’, after this step the RAM DATA modified as ‘0x0000 0000 0x0000 0001’. But the ECC DATA is still wrong.

Note: Move to step 7 to avoid the DATA ABORT.

        6.  Read ECC and observed DATA ABORT.
        7.  Disable ECC in CPU by using the code given by the TI. The below are the observations observed while executing this step.
                     a.  After the step ‘MCR     P15, #0, R4, C1, C0, #1’  observed that the ECC modified to the correct value as ‘0x6E6E 6E6E 0x6E6E 6E6E’
        8.  Disable ECC in ODDRAM WRAPPER (0xFFFF F900) and enable ‘ECC WR EN’. Modifying from ‘0x0000 000A’ to ‘0x0000 0105’.
        9.  Repeat the steps 3 to 6 and observed the same behavior.

If tries to read the ECC then observing the DATA ABORT. If not read the ECC observed that the ESM handler is taking care of the single bit error.

 

Test 2:

I created a pre-defined ECC table by using walking 1’s on a particular RAM location and noted the corresponding ECC. During normal operation, I am trying to change a RAM location with walking 1’s and expecting the corresponding ECC to be calculated and comparing the calculated ECC with the predefined table.

Observations:

  1. Modified the RAM Location from ‘0x0000 0000 to 0x0000 0001’. Then the corresponding ECC modified as ‘0xADOB ADOB 0x6E6E 6E6F’.
  2. Then if tries to read the ECC location then observed the DATA ABORT.
  3. When the software hits the Boot DABT handler then the corresponding ECC modified as ‘0x6E6E 6E6E 0x6E6E 6E6E’.

 

The below is the code snippet followed to Enable and Disable the ECC respectively.

 

Enable ECC

    ; Enable Events on Event Bus

    MRC     P15, #0, R4, C9, C12, #0       

    ORR     R4,  R4, #0x00000010

    MCR     P15, #0, R4, C9, C12, #0

 

    ; Enable ECC for Memories

    MRC     P15, #0, R4, C1, C0, #1

    ORR     R4,  R4, #0x1 <<26

    DMB

    MCR     P15, #0, R4, C1, C0, #1                 “Step 5.a”

    ISB                                                                      “Step 5.b”

    MRC     P15, #0, R4, C1, C0, #1

    ORR     R4,  R4, #0x1 <<27

    DMB

    MCR     P15, #0, R4, C1, C0, #1

    ISB

    BX      LR  

 

Disable ECC

    ; Disbale ECC for Memories

    MRC     P15, #0, R4, C1, C0, #1

    MVN     R5,  #0x1 <<26

    AND     R4,  R4, R5

    MVN     R5,  #0x1 <<27

    AND     R4,  R4, R5

    DMB

    MCR     P15, #0, R4, C1, C0, #1                 “Step 7.a”

    ISB

 

    MRC     P15, #0, R4, C1, C0, #1

    DMB

    MCR     P15, #0, R4, C1, C0, #1

    ISB

    ; Disable Events on Event bus

    MRC     P15, #0, R4, C9, C12, #0

    MVN     R5,  #0x00000010

    AND     R4,  R4, R5

    DMB

    MCR     P15, #0, R4, C9, C12, #0

    ISB               

    BX      LR  

 

   

  • Krishna,

    I am not able to follow your steps. You mention:

    1. Disable ECC in CPU by using the code given by the TI
    2. Disable ECC in EVEN RAM WRAPPER (0xFFFF F800) and enable ‘ECC WR EN’. Modifying from ‘0x0000 000A’ to ‘0x0000 0105’.
    3. Modify the RAM ECC DATA to ‘0x6E6E 6E6E’ from ‘0x0C0C 0C0C’. Note modified 64bit data.
    4. Enable ECC in RAM WRAPPER (0xFFFF F800) and disable ‘ECC WR EN’. Modifying from ‘0x0000 0105’ to ‘0x0000 000A’.
    5. Enable ECC in CPU by using the code given by TI. The below are the observations observed while executing this step.
      1. After the step ‘MCR     P15, #0, R4, C1, C0, #1’ observed that the RAM DATA and the RAM ECC are modified as ‘0xADOB ADOB 0x0000 0001’ and ‘0xADOB ADOB 0x6E6E 6E6F’ respectively.
      2. The next step is ‘ISB’, after this step the RAM DATA modified as ‘0x0000 0000 0x0000 0001’. But the ECC DATA is still wrong.

    Note: Move to step 7 to avoid the DATA ABORT.  - What is this step 7?

    1. Read ECC and observed DATA ABORT.
    2. Disable ECC in CPU by using the code given by the TI. The below are the observations observed while executing this step.
      1. After the step ‘MCR     P15, #0, R4, C1, C0, #1’  observed that the ECC modified to the correct value as ‘0x6E6E 6E6E 0x6E6E 6E6E’
      2. Disable ECC in ODDRAM WRAPPER (0xFFFF F900) and enable ‘ECC WR EN’. Modifying from ‘0x0000 000A’ to ‘0x0000 0105’.
      3. Repeat the steps 3 to 6 and observed the same behavior.

    Are you sure you are inserting only a single bit error in the data section? (I am not sure " ‘0x6E6E 6E6E’ from ‘0x0C0C 0C0C’ " is a single bit error)

    Regards,

    Abhishek

  • Hi Abhishek,

    I updated the post. Please check the sequence of steps now. I regret for the late reply.

    Thanks & Regards

    Krishna B

  • Hi abhishek,

    Can you please respond to this post. I did not hear anything regarding this post since a month.

    Thanks & Regards

    Krishna B

  • Krishna,

    I think there is some confusion on expected error response.

    As noted in the ARM Cortex R4 TRM, the expected behavior for a flash or SRAM ECC error is not an interrupt, but an abort.  The ECC controllers are tightly integrated to the CPU and will directly respond with either data abort (data access) or prefetch abort (instruction access) when a fault is detected.

    If ECC events are exported from CPU and the SRAM wrapper is enabled to manage them, then the event can also result in an ESM managed response.  We give you the option to provide an error pin or interrupt response.  Most of our customers do not wish to have both an abort and an interrupt (but some do for testing purposes), so the response is software configurable.

    Best Regards,

    Karl Greb

  • Hi Krishna,

    TMS570PSFC62 is not a publicly released device and as such the details we've discussed here may not be relevant.  Please follow up with your local FAE.

    Regards,

    Karl

  • Hello Karl,

    In your Post dated Feb. 6, 2012 9:47 AM, you have mentioned the last sentence as shown below:

    "so the response is software configurable"

    Question is what is configurable?

    ESM Error Interrupt as well as ABORT from CPU or only ESM Error Interrupt?

    If ABORT from CPU is configurable, can you please tell me how to configure?

    Thank you.

    Regards

    Pashan

     

  • Hello Pashan,

    What is configurable is whether you select to send the error response to ESM.  You will always get an abort, but you can configure via the SRAM wrapper whether notification also goes to ESM and thus causes a pin response (and/or interrupt).

    Technically you can also remove the abort by disabling the diagnostic, but then there is no checking and no error response.

    Regards,

    Karl