ECC double bits error interrupt routine test

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

ECC double bits error interrupt routine test

606 次查看
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 回复

558 次查看
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 项奖励