S32K344 MCAL WdgModule - Question about a Wdg_SetTriggerCondition()

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

S32K344 MCAL WdgModule - Question about a Wdg_SetTriggerCondition()

跳至解决方案
1,383 次查看
Rmpr
Contributor II

Hello,

I have a doubt in some of your RTDs functions. You use the function Wdg_ChannelSetTriggerCondition(timeout) to periodically service the Wdg. In the description of the function you specify that this timeout is in miliseconds. However, in the following line:

Wdg_au32Timeout[Instance] = (uint32)(Timeout * Wdg_apConfigPtr[Instance]->Wdg_u32TriggerSourceClock) + ElapsedTime;

 

What exactly is this calculation? Shouldn't we just equal the timeout to the Wdg_au32Timeout[Instance]?

Wdg_au32Timeout[Instance] = Timeout

 

Thank you!

0 项奖励
回复
1 解答
1,348 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @Rmpr 

The equation provided in the code calculates the number of ticks required to have the defined timeout value ((milliseconds) considering the configured clock frequency and the elapsed time since the channel started with Gpt_StartTimer.

 

B.R.

VaneB

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,307 次查看
Rmpr
Contributor II

Thank you!

0 项奖励
回复
1,349 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @Rmpr 

The equation provided in the code calculates the number of ticks required to have the defined timeout value ((milliseconds) considering the configured clock frequency and the elapsed time since the channel started with Gpt_StartTimer.

 

B.R.

VaneB

0 项奖励
回复