FS26 S32K3 FLT_ERR_CNT cannot decrease to 0 in Sbc_fs26_InitDevice();

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

FS26 S32K3 FLT_ERR_CNT cannot decrease to 0 in Sbc_fs26_InitDevice();

跳至解决方案
1,849 次查看
kate___
Contributor II

Hi,

when i initialized FS26 with S32K311,

watchdog period = 32ms, watchdog duty cycle = 37.5%OPEN, watchdog recovery = 64ms,

but in " Decrease FLT_ERR_CNT to 0 with WD_ERR_LIMIT good WD refresh",

I got u8ErrorCounter = 1 in below codes.

kate____0-1712135589491.png

I don't know the meaning about "with WD_ERR_LIMIT good WD refresh", is that means it need to plus a WDrefresh routine code?

kate____1-1712135731347.png

Hope your answer!

 

Kate

0 项奖励
回复
1 解答
1,689 次查看
guoweisun
NXP TechSupport
NXP TechSupport

Finally you must use the normal mode not the debug mode,you can refer to below  for feed WD:

guoweisun_0-1712645513182.png

 

在原帖中查看解决方案

0 项奖励
回复
12 回复数
1,815 次查看
guoweisun
NXP TechSupport
NXP TechSupport

Hi 

For your question:

1: Is that means it need to plus a WDrefresh routine code?

[gw]Correct,you need continue to refresh WD till the fault error counter decrease into 0.

0 项奖励
回复
1,751 次查看
kate___
Contributor II

Hi guoweisun,

Thanks for your reply.

How would I continue refresh WD?

If I use a timer to count, it will shut down in Sbc_fs26_TimeWaitClearFault().

Or is there a watchdog duty open example?

In S32DK, there is only a infinite watchdog example.

标记 (1)
0 项奖励
回复
1,748 次查看
guoweisun
NXP TechSupport
NXP TechSupport

Hi 

You can refer to below:

Sequence to enter normal mode with a Watchdog Simple
//INIT FS and simple WD enabled required
//Open WD window
SET_REG:FS26:Safety:FS_WDW_DURATION:0x008B
SET_REG:FS26:Safety:FS_NOT_WDW_DURATION:0xF144
//Send 1 good wd refresh to close INIT window
SET_REG:FS26:Safety:FS_WD_ANSWER:0x5AB2
//clean fault error counter
SET_REG:FS26:Safety:FS_WD_ANSWER:0x5AB2
SET_REG:FS26:Safety:FS_WD_ANSWER:0x5AB2
SET_REG:FS26:Safety:FS_WD_ANSWER:0x5AB2
SET_REG:FS26:Safety:FS_WD_ANSWER:0x5AB2
SET_REG:FS26:Safety:FS_WD_ANSWER:0x5AB2
SET_REG:FS26:Safety:FS_WD_ANSWER:0x5AB2
//Exit dbg mode
SET_REG:FS26:Safety:FS_STATES:0x4000
//release FS0B and FS1B
SET_REG:FS26:Safety:FS_RELEASE_FS0B_FS1B:0xB2A5

 

 


Sequence to enter normal mode with a Watchdog Challenger
//INIT FS and WD Challenger required
//Open WD window
SET_REG:FS26:Safety:FS_WDW_DURATION:0x008B
SET_REG:FS26:Safety:FS_NOT_WDW_DURATION:0xF144
//Send 1 ZD refresh to close INIT window
SET_REG:FS26:Safety:FS_WD_ANSWER:0xa54d
//clean fault error counter
SET_REG:FS26:Safety:FS_WD_ANSWER:0x4a9a
SET_REG:FS26:Safety:FS_WD_ANSWER:0x9535
SET_REG:FS26:Safety:FS_WD_ANSWER:0x2a6a
SET_REG:FS26:Safety:FS_WD_ANSWER:0x54d4
SET_REG:FS26:Safety:FS_WD_ANSWER:0xa9a9
SET_REG:FS26:Safety:FS_WD_ANSWER:0x5353
//Exit dbg mode
SET_REG:FS26:Safety:FS_STATES:0x4000
//release FS0B and FS1B
SET_REG:FS26:Safety:FS_RELEASE_FS0B_FS1B:0xA565

0 项奖励
回复
1,746 次查看
kate___
Contributor II

Hi guoweisun,

I used "Sequence to enter normal mode with a Watchdog Challenger" because of S32K311.

The change timing of FS_WD_ANSWER is when Sbc_fs26_WdChangeToken be used, right?

But now my code used Sbc_fs26_WdChangeToken when Sbc_fs26_InitFSConfigure is used.

That means it just one time to change the wd answer.

Where should i add Sbc_fs26_WdChangeToken to occur the wd answer changing?

标记 (1)
0 项奖励
回复
1,743 次查看
guoweisun
NXP TechSupport
NXP TechSupport

HI Kate

Don't understand you wrote only one time to change the WD.

If you define the FS_WD_TOKEN register content, you have to calculate and feed the WD answer each time.

0 项奖励
回复
1,739 次查看
kate___
Contributor II

Hi guoweisun,

Thanks for your patience!

I means what can make FS_WD_ANSWER change.

If I just refresh one time, FS_WD_ANSWER is changed from 0xa54d to 0x4a9a.

What can I  change FS_WD_ANSWER from 0x4a9a to 0x9535?

标记 (1)
0 项奖励
回复
1,734 次查看
guoweisun
NXP TechSupport
NXP TechSupport

Please see below:

guoweisun_0-1712565103610.png

 

0 项奖励
回复
1,702 次查看
kate___
Contributor II

Hi guoweisun,

If I was in Debug mode, I can have a good WDfresh like below.

Then I can get SBC initialize OK.

kate____0-1712633757777.png

But in Normal mode, I got a bad WDfresh like below.

Then I can't initialize SBC.

kate____1-1712633851918.png

What states I need to set ?

 

0 项奖励
回复
1,690 次查看
guoweisun
NXP TechSupport
NXP TechSupport

Finally you must use the normal mode not the debug mode,you can refer to below  for feed WD:

guoweisun_0-1712645513182.png

 

0 项奖励
回复
1,685 次查看
kate___
Contributor II

Hi guoweisun,

Thanks for the description!

About the pic, open duty is 50% but there is 3/4 on the timeline.

To my understanding, if it set 50% duty , it will be 1/2 between WD refresh and WD refresh 1.

That is, if I want to set the time between WD refresh and WD refresh 1, the function must be WindowPeriod * WindowDc.

Above all, is there something wrong?

标记 (1)
0 项奖励
回复
1,682 次查看
guoweisun
NXP TechSupport
NXP TechSupport

Hi Kate

Please following the above picture to feed WD,you can try and should be no problem.

0 项奖励
回复
1,659 次查看
kate___
Contributor II

Thanks a lot !

标记 (1)
0 项奖励
回复