ECC double bits error interrupt routine test

cancel
Showing results for 
Search instead for 
Did you mean: 

ECC double bits error interrupt routine test

69 Views
Contributor II

hello .

 for FTFC ECC doule bits error interrupt toutine test code is as the following

  

FTFC->FERCNFG |= 0x02;//DFDIE
FTFC->FERCNFG |= 0x20; //FDFD
INT_SYS_EnableIRQ(FTFC_Fault_IRQn);

i = *(uint32_t *)0x6000;

and interrupt entry function is 

void FTFC_Fault_IRQHandler(void)
{
FTFC->FERSTAT |= 0x20;

}

when Flash boot  after execute INT_SYS_EnableIRQ(FTFC_Fault_IRQn);   it will  enter FTFC_Fault_IRQHandler.  but if RAM boot  ,execute the same code it will not enter FTFC_Fault_IRQHandler.

why is this different  between two boot mode?

comment: my device is S32K146 and my compile tool is S32K DS.

0 Kudos
1 Reply

21 Views
NXP TechSupport
NXP TechSupport

Hello 814420552@qq.com

When FDFD = 1, any valid flash read access sets the DFDIF flag.
I guess the INT_SYS_EnableIRQ() function actually sets the flag when the function is in the flash, not the pointer.
Please read the DFDIF flag in EmbSys_Register view while stepping through the code.

You can put the function before this line:
FTFC->FERCNFG |= 0x20; //FDFD

Also, the i variable might be optimized out by the compiler.

Regards,

Daniel

0 Kudos