Delay in updating U32CompareValue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delay in updating U32CompareValue

Jump to solution
3,647 Views
Kanaqw
Contributor III

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

0 Kudos
1 Solution
3,153 Views
Kanaqw
Contributor III

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

View solution in original post

27 Replies
421 Views
Kanaqw
Contributor III

Sure

0 Kudos
673 Views
Kanaqw
Contributor III

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

0 Kudos
670 Views
Kanaqw
Contributor III

Thank you. Now, how do I test it? Using infinite cycle to cause delay between CP will do the trick?

0 Kudos
770 Views
Kanaqw
Contributor III

Kanaqw_0-1632998137972.png

the problem is that in gpt_Ipw switch case skips FTM and goes to empty, even though FTM is active as a GPT timer

 

770 Views
Kanaqw
Contributor III

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?

0 Kudos
741 Views
Kanaqw
Contributor III

Kanaqw_0-1632980320647.png

Wdog enabled in cs. Didnt get the question about drivers though, you mean version or what?

0 Kudos
754 Views
Kanaqw
Contributor III

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? 

0 Kudos