Having issues with WDOG module - it doesnt reset the flag even though configured right. Timeout everytime no matter what I do. In the search of what causing it I've stumble on to U32CompareValue which should be >0, but in my case its always zero, which may be the problem but Im not sure. So timer doesnt reset itself (Using a FTM 5 channel 6 & 7 btw) and when value of time goes to 65535 it resets the board even though watchdog shouldnt reset. Can you help me with that? board is S32k146
已解决! 转到解答。
I've found a solution. Turns out its in architecture of ARM m7 I'm using. Problem in startup_cmx.sx file, in it they configured only 83 interrupt vectors instead 151 that s32k146 using. Switching argument in ASM_REPT to correct value solve the issue, watchdog is now working correctly
Configs did thing better, but not quite. I found a problem - Wdg_Cbk_GptNotification. It doesnt execute, which means that trigger that supposed to reset WDOG timer doesnt work too. As far as I understand Wdg_Cbk_GptNotification should execute when timer that using it as callback will overflow or over. So what happens is that without this callback Wdg is just timeouts and resets. Question is - how to fix this? Ftm timer works, its just doesnt work fast enough i guess to trigger this callback
Yeah, I've actually configured it to use lpmtr first, now ftm works. But there's another problem - au32timeout updates too slow, eventually wdg goes into timeout when number of cycles reaches au32timeout value. Is that a clock issue?
In addition to the question, trying to debug it I've stumble on the problem of Wdg_au32Timeout became 0 in first few cycles & then func Gpt_StopTimer seems to stop updating wdg so its resets after timeout. Why is that happening?