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
已解决! 转到解答。
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 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?
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 ?
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?