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
Do you have properly configured FCCU module?
Pay attention to following appnote:
https://www.nxp.com/docs/en/application-note/AN5284.pdf
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 ?
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.
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;
}
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:
However in flash you may create ECC error also by over-programming as I described in AN13179:
It is probably reset by FCCU. Do you have set FCCU reset reaction for MEMU input? Have you investigated reset reason (RGM module)?