Delay in updating U32CompareValue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Delay in updating U32CompareValue

ソリューションへジャンプ
5,018件の閲覧回数
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 解決策
4,524件の閲覧回数
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 返答(返信)
714件の閲覧回数
Kanaqw
Contributor III

Sure

0 件の賞賛
返信
966件の閲覧回数
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 件の賞賛
返信
963件の閲覧回数
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,063件の閲覧回数
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,063件の閲覧回数
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,034件の閲覧回数
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,047件の閲覧回数
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 件の賞賛
返信