Hello,
I'm very sorry for the delay. I have already contacted you in your first case in the ticket portal.
It seems that the watchdog is not fed when the frames are not sending. However, it is hard to detect the source of the issue without the code.
Do you use internal or external watchdog?
Thank you.
Best Regards,
Diana
Hello Diana,
I am very sorry for the late reply. I am currently using internal watchdog. I have debugged the issue. After analysis I found Out the below Issue
There are 2 API’s “Wdg_ChannelTrigger” which will invoke from Gpt_Notification for every 500ms and “Wdg_ChannelSetTriggerCondition” which is invoking during WdgM_MainFunction (Which will trigger for every 10ms).
There are 2 global variables “Wdg_au16Timeout[Wdg_Instance]” and “Wdg_au16GptPeriod[Wdg_Instance]”
I am using only 1 instance (So, Wdg_Instance value is 0). During the Initialization time, “Wdg_au16Timeout[0]” is loading with 1000 and “Wdg_au16GptPeriod[0]” is loading with 500 (which is constant).
The API “Wdg_ChannelSetTriggerCondition” is invoking for 50 times for every 1 time invocation to “Wdg_ChannelTrigger”
When the First time “Wdg_ChannelSetTriggerCondition” invoked, the variable “Wdg_au16Timeout[0]” is updating with 150.
During Second time “Wdg_ChannelSetTriggerCondition” invoked, the variable “Wdg_au16Timeout[0]” is updating with 160.
..
During 50th time “Wdg_ChannelSetTriggerCondition” invoked, the variable “Wdg_au16Timeout[0]” is updating with 650.
So, the Gpt_Notification will occur at this time and it will invoke “Wdg_ChannelTrigger”. In the API “Wdg_ChannelTrigger”, there is a below condition
“if( Wdg_au16Timeout[Wdg_Instance] < Wdg_au16GptPeriod[Wdg_Instance])” if it becomes true, It will invoke “Gpt_StopTimer” and the Wdg will reset the ECU after sometime.
If the condition becomes false, it will call “Wdg_IPW_Trigger” and the Watchdog Counter will reload to zero and the Reset won’t occur.
Issue:
In the Present Condition, The Watchdog is not resetting for some time and communication is happening properly (like 3minutes, 5 minutes and 16 minutes.. time is not consistent, it varies for every time during execution). But after sometime, Communication has stopped and reset is occuring.
I have copied the “Wdg_au16Timeout[0]” in to 1 global variable in the API “Wdg_ChannelSetTriggerCondition”, and I have changed the condition like
“if( Global_Var < Wdg_au16GptPeriod[Wdg_Instance])” in the API “Wdg_ChannelTrigger”. But this time, I have observed reset is not happening and communication continues for a long time (checked more than 4 hours).
So, we are suspecting the variable “Wdg_au16Timeout[0]” is changing after sometime or may be it is getting corrupted.
Can you please help me regarding the current Issue?
Thanks and Regards,
Surya Phani Teja