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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jump to solution
255 Views
郑文豪
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 Kudos
1 Solution
227 Views
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.

View solution in original post

0 Kudos
3 Replies
239 Views
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 Kudos
233 Views
郑文豪
Contributor I

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

0 Kudos
228 Views
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.

View solution in original post

0 Kudos