how to clear fccu faults

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

how to clear fccu faults

2,061 次查看
fyw
Contributor IV

my program is a little strange, i looks like this:

s1: enable SWT()

s2: wait for SWT timeout

s3: disable SWT()

s4: configure FCCU()

 

at s4 i find NCF_S0 = 0x4000, i know this means SWT has generated a fault. so i cann't configue FCCU.

I wander at this situation, how can i clear the "NCF_S0". Is there any way i can configure FCCU? 

 

Thank you very much!

标签 (1)
0 项奖励
回复
10 回复数

1,662 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hi,

You need to perform the reset in order to clear SWT fault signal to FCCU.

Otherwise you wont be able to enter FCCU Config state.

Peter

0 项奖励
回复

1,662 次查看
fyw
Contributor IV

Thank you very much Peter!

About the "reset", which "reset" should it be?  "functional reset" or "destructive rest", or either is ok?

pastedImage_1.png

0 项奖励
回复

1,662 次查看
petervlna
NXP TechSupport
NXP TechSupport

Reset to PHASE1 will clear FCCU SWT fault.

This means all resets except short functional.

0 项奖励
回复

1,662 次查看
lmonologue
Contributor I

Hi, Peter

    How  to rsest to PHASE1 to clear FCCU SWT fault,could you  provide the code for me?

  Thanks

0 项奖励
回复

1,662 次查看
petervlna
NXP TechSupport
NXP TechSupport

This is quite simple,

Just do external reset via debugger.

Or you can do SW reset via MC_ME module via mode transition to mode 0. (but your program should not get into situation when SWT expire)

Peter

0 项奖励
回复

1,663 次查看
junfeichen
Contributor I

Hi Peter,

I met the same problem about SWT reset. When SWT fault occur, and after fccu_read_fault function we can read the NCF_S0=0x4000. But after running the fccu_clear_fault function, this fault flag cannot be cleared and NCF_S0 is still 0x4000. The FCCU is normal state, not fault state. I cannot understand why not work...

From your reply above, only sw reset via MC_ME module can clear the SWT fault flag? 

Thanks.

0 项奖励
回复

1,663 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I explained it here on forum many times.

If you clear active NCF[14] it is cleared. But, as the fault source is still active (SWT still hold fault line to FCCU) the NCF[14] is immediately after clearing set again.

Only way to clear fault line between SWT and FCCU after SWT expire is RESET.

Peter

0 项奖励
回复

1,663 次查看
junfeichen
Contributor I

Hi Peter,

I use MC_ME to make a SW reset while check FCCU.NCF_S[0] = 0x4000, the result without debug tool is that the mcu is still reset. We can get a can message 0x300, cannot get a canid=0x100 message.

Thanks.

 

The code is as following:

void Sw_Reset(void)

{

MC_ME.MCTL.R = 0x5AF0;

MC_ME.MCTL.R = 0xA50F;

}

 

void main(void)

{

SWT_0.SR.R = 0xC520;

SWT_0.SR.R = 0xD928;

SWT_0.CR.B.WEN = 0;

 

SystemClock_Init();

Tim_Init();

Can_Init();

FCCU_clear_faults();

FCCU_read_faults();

if((FCCU.NCF_S[0] & 0x4000) != 0)

{

Can_SendFrame(0); //canid = 0x300

Sw_Reset();

}

FCCU_Init();

Can_SendFrame(1);//canid = 0x100

Wdg_Init();

 

for(;;)

{

}

}

0 项奖励
回复

1,663 次查看
praveenkumar123
Contributor II

Hello,

I have the similar issue. How did you fix it ?

Can you please share me the reset register settings.

0 项奖励
回复

1,664 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, pay attention to following document:

http://www.nxp.com/files/microcontrollers/doc/app_note/AN5284.pdf

Hope it helps

0 项奖励
回复