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!
Solved! Go to Solution.
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
Thank you!
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