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.
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?
Hope your answer!
Kate
Solved! Go to Solution.
Finally you must use the normal mode not the debug mode,you can refer to below for feed WD:
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.
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.
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
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?
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.
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?
Please see below:
Hi guoweisun,
If I was in Debug mode, I can have a good WDfresh like below.
Then I can get SBC initialize OK.
But in Normal mode, I got a bad WDfresh like below.
Then I can't initialize SBC.
What states I need to set ?
Finally you must use the normal mode not the debug mode,you can refer to below for feed WD:
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?
Hi Kate
Please following the above picture to feed WD,you can try and should be no problem.