Gpt interrupt is the only way to reset Wdg counter in AUTOSAR 4.3.0 MCAL(iso26262)s32k14x?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Gpt interrupt is the only way to reset Wdg counter in AUTOSAR 4.3.0 MCAL(iso26262)s32k14x?

跳至解决方案
1,935 次查看
郑文豪
Contributor I

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?

0 项奖励
1 解答
1,907 次查看
hungnguyenphi
NXP Employee
NXP Employee

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.

在原帖中查看解决方案

0 项奖励
3 回复数
1,919 次查看
hungnguyenphi
NXP Employee
NXP Employee

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.

0 项奖励
1,913 次查看
郑文豪
Contributor I

Does it means chip can only reset if interrupt is stuck? What if the program stuck in task instead of interrupt?

0 项奖励
1,908 次查看
hungnguyenphi
NXP Employee
NXP Employee

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.

0 项奖励