S32K344 MCAL WdgModule - Question about a Wdg_SetTriggerCondition()

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

S32K344 MCAL WdgModule - Question about a Wdg_SetTriggerCondition()

ソリューションへジャンプ
1,552件の閲覧回数
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,517件の閲覧回数
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,476件の閲覧回数
Rmpr
Contributor II

Thank you!

0 件の賞賛
返信
1,518件の閲覧回数
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 件の賞賛
返信