ECC double bits error interrupt routine test

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ECC double bits error interrupt routine test

1,104件の閲覧回数
814420552
Contributor III

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 件の賞賛
返信
1 返信

1,056件の閲覧回数
danielmartynek
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 件の賞賛
返信