When I use s32k14x mcal(iso26262) Wdg module, I find only one way to reset watchdog counter is calling Wdg_Cbk_GptNotification0 function by Gpt interrupt. I want to reset watchdog counter in a periodic task rather than Gpt interrupt,how can I do?
Solved! Go to Solution.
Does it means chip can only reset if interrupt is stuck? What if the program stuck in task instead of interrupt?
[Hung] No it is not, the Wdg have a function Wdg_SetTriggerCondition(it will be called by WDM"Watchdog Manager"). After a several times the "reset watchdog counter" happen, if the Wdg_SetTriggerCondition does not call to update the trigger condition, then the watchdog counter will not be reset( reset will happen).
Best regards,
Hung.
Hello 郑文豪,
As the autosar specification, we cannot reset watchdog counter in a periodic task. It will violate the requirement SWS_Wdg_00162 and SWS_Wdg_00166.
[SWS_Wdg_00162] ⌈The routine servicing an external watchdog shall be
implemented by usage of an own internal hardware timer to be independent from
other peripherals or by using a GPT driver callback ⌋
[SWS_Wdg_00166] ⌈The routine servicing an internal watchdog shall be
implemented as an interrupt routine driven by a hardware timer⌋
Best regards,
Hung.
Does it means chip can only reset if interrupt is stuck? What if the program stuck in task instead of interrupt?
Does it means chip can only reset if interrupt is stuck? What if the program stuck in task instead of interrupt?
[Hung] No it is not, the Wdg have a function Wdg_SetTriggerCondition(it will be called by WDM"Watchdog Manager"). After a several times the "reset watchdog counter" happen, if the Wdg_SetTriggerCondition does not call to update the trigger condition, then the watchdog counter will not be reset( reset will happen).
Best regards,
Hung.