S32K344 MCAL WdgModule - Question about a Wdg_SetTriggerCondition()

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

S32K344 MCAL WdgModule - Question about a Wdg_SetTriggerCondition()

Jump to solution
235 Views
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 Kudos
Reply
1 Solution
200 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
159 Views
Rmpr
Contributor II

Thank you!

0 Kudos
Reply
201 Views
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 Kudos
Reply