Injecting ECC Fault to trace MEMU and FCCU path

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Injecting ECC Fault to trace MEMU and FCCU path

677 Views
NileshDharap
Contributor II

Hello, I am working on Chapter 5.2.26 Error reporting path tests from Safety Manual for MPC5746C.

I need to inject ECC fault and check whether it reports to FCCU through MEMU as a Power on Test. I have configured FCCU to read status.

I was referring to AN13179, I am trying with reading UTest area address 0x0400040 and 0x0400080 code, ECC error is injected but only reported via C55FMC module and not to FCCU.

If I read 0x0400060 controller triggers soft reset, when I checked in trace32 the memory dump showed '??' - Bus error.

How can I proceed to inject ECC fault and read via FCCU status ? 

Is it necessary to configure some fault reaction for NCFs of MEMU to be able to update in FCCU Status register?
Thank you

Error Correction Codes Implemented on MPC5744P

0 Kudos
Reply
7 Replies

647 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Do you have properly configured FCCU module?

Pay attention to following appnote:

https://www.nxp.com/docs/en/application-note/AN5284.pdf

 

0 Kudos
Reply

587 Views
NileshDharap
Contributor II

Yes, I have configured FCCU according to 6. CONFIG State of the application note.
How can I perform fault injecting for ECC path check from MEMU to FCCU ?

0 Kudos
Reply

557 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

This device does not have Error Injection Module, but flash errors from UTEST should be propagated over MEMU to FCCU. There is no enable option in MEMU, it is always enabled. You have to have properly configure FCCU fault reaction.

0 Kudos
Reply

490 Views
NileshDharap
Contributor II

Can you share me any AN or any sample code, to inject ECC error. I have to check MEMU and FCCU status as a Power on Test after injecting fault.
Reading UTest Area is one method I tried
0x0400040, 0x0400060 and 0x0400080 is what I am reading. With 0x0400060 controller performs resets and with other addresses reads it is not reflecting in MEMU and FCCU.

Is there any other method you can help me with? or we need to read UTest area itself.


Pasting the functions below:

uint8_t FCCU_Configure(void)

{

    uint32_t elapsed_time = 0;

    // Unlock configuration

    FCCU.TRANS_LOCK.R = FCCU_TRANS_LOCK_KEY;

    // Provide configuration state key

    FCCU.CTRLK.R = FCCU_CONFIG_KEY;

    // Enter configuration state (OP1)

    FCCU.CTRL.R = FCCU_OP_CONFIG;

    // Wait for successful state transition

    while (FCCU.CTRL.B.OPS != 0x3)

    {

        elapsed_time++;

        if (elapsed_time > 100) // Timeout

        {

            return FCCU_ERROR;

        }

    }

    elapsed_time = 0; // Reset elapsed time for the next operation

    // Example: Disable reset for PLL failure

    FCCU.NCFS_CFG[2].R = 0x00;

    // Transition to normal mode

    FCCU.CTRLK.R = FCCU_NORMAL_KEY;

    FCCU.CTRL.R = FCCU_OP_NORMAL;

    // Wait for successful state transition

    while (FCCU.CTRL.B.OPS != 0x3)

    {

        elapsed_time++;

        if (elapsed_time > 100) // Timeout

        {

            return FCCU_ERROR;

        }

    }

    return FCCU_SUCCESS;

}



uint8_t FCCU_ReadFaults(void)

{

    uint32_t elapsed_time = 0;

    // Enter fault reading mode (OP10)

    FCCU.CTRL.R = FCCU_OP_READ;

    // Wait for successful operation

    while (FCCU.CTRL.B.OPS != 0x3)

    {

        elapsed_time++;

        if (elapsed_time > 100) // Timeout

        {

            return FCCU_ERROR;

        }

    }

    // Read fault status registers

    FCCU_faultStatus[0] = FCCU.NCF_S[0].R;

    FCCU_faultStatus[1] = FCCU.NCF_S[1].R;

    FCCU_faultStatus[2] = FCCU.NCF_S[2].R;

    return FCCU_SUCCESS;

}



uint8_t FCCU_ClearFaults(void)

{

    uint32_t elapsed_time = 0;

    // Clear fault status in NCF_S[0]

    FCCU.NCFK.R = FCCU_CLEAR_FAULT_KEY;

    FCCU.NCF_S[0].R = 0xFFFFFFFF;

    // Wait for successful operation

    while (FCCU.CTRL.B.OPS != 0x3)

    {

        elapsed_time++;

        if (elapsed_time > 100) // Timeout

        {

            return FCCU_ERROR;

        }

    }

    // Clear fault status in NCF_S[1]

    elapsed_time = 0; // Reset elapsed time

    FCCU.NCFK.R = FCCU_CLEAR_FAULT_KEY;

    FCCU.NCF_S[1].R = 0xFFFFFFFF;

    // Wait for successful operation

    while (FCCU.CTRL.B.OPS != 0x3)

    {

        elapsed_time++;

        if (elapsed_time > 100) // Timeout

        {

            return FCCU_ERROR;

        }

    }

    // Clear fault status in NCF_S[2]

    elapsed_time = 0; // Reset elapsed time

    FCCU.NCFK.R = FCCU_CLEAR_FAULT_KEY;

    FCCU.NCF_S[2].R = 0xFFFFFFFF;

    // Wait for successful operation

    while (FCCU.CTRL.B.OPS != 0x3)

    {

        elapsed_time++;

        if (elapsed_time > 100) // Timeout

        {

            return FCCU_ERROR;

        }

    }

    return FCCU_SUCCESS;

}
0 Kudos
Reply

442 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I would recommend to debug FCCU content. As registers are accessed indirectly using keys and commands, following tool could be useful if you are using TRACE32 environment:

https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/MPC57xx-FCCU-Utility-scripts-for-Lauterbach-debu...

However in flash you may create ECC error also by over-programming as I described in AN13179:

davidtosenovjan_0-1750837556962.png

 

0 Kudos
Reply

249 Views
NileshDharap
Contributor II
I am referring the code you had shared in some other query for generating ECC error.

MPC5777C-1b+2b_FLASH_ECC_error_injection-v0_0-GHS614

I tried with the functions stand alone in my code: Generate_noncorrectable_FLASH_ECC_error and Generate_1bit_FLASH_ECC_error

What I observed is that memory area is not getting written second time I execute these functions. Controller performs a reset if we read the memory address in flash (0x00FC0000).

Since I need to perform this test at every PowerOnTest, I need this function to run quite frequently.
I was not able to check whether ECC error is injected or not - I will let you know on that.

I want to check can I refer that piece of code in my usecase ?
0 Kudos
Reply

189 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

It is probably reset by FCCU. Do you have set FCCU reset reaction for MEMU input? Have you investigated reset reason (RGM module)?

0 Kudos
Reply