Delay in updating U32CompareValue

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

Delay in updating U32CompareValue

跳至解决方案
8,324 次查看
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 项奖励
回复
1 解答
7,830 次查看
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

在原帖中查看解决方案

27 回复数
1,330 次查看
Kanaqw
Contributor III

Sure

0 项奖励
回复
1,582 次查看
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 项奖励
回复
1,579 次查看
Kanaqw
Contributor III

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

0 项奖励
回复
1,679 次查看
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

 

1,679 次查看
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 项奖励
回复
1,650 次查看
Kanaqw
Contributor III

Kanaqw_0-1632980320647.png

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

0 项奖励
回复
1,663 次查看
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 项奖励
回复