PN7462: Use of Watchdog Threshold value?

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

PN7462: Use of Watchdog Threshold value?

899 次查看
KeshavAggarwal
Contributor I

Hello There,

I'm looking to implement watchdog functionality in my app. Came across a query in phhalWdt_Start() API. As per the Doc it is declared as:

phStatus_t phhalWdt_Start(uint16_t pWdtTimeoutVal, uint16_t pWdtIntThreshVal, pphhalWdt_Handler_t pHandler, uint8_t bResetOnTimeOut);

But the use of pWdtIntThreshVal is not documented in API Guide. Also, There are no examples of WDT in the SDK.
I would be good if I can get reference example.

Regards,

Keshav Aggarwal

标记 (1)
0 项奖励
回复
2 回复数

855 次查看
KellyLi
NXP TechSupport
NXP TechSupport

Hello @KeshavAggarwal 

what is the implementation of watchdog_callback? if you don't want to reset your system and then here the count should be refreshed.

phhalWdt_Start(250, 100, watchdog_callback, 0); // here (100*21.5)ms will overflow and enter interrupt

Description for the two parameters :

1. threshold is the threshold value for WDT interrupt

2. timeout is the time for system reset, when enable resetOnTimeout, the following for your reference:

NXF92074_0-1663400484723.png

 Best Regards,

kelly

881 次查看
KeshavAggarwal
Contributor I

There is one more issue, watching is not behaving correctly-

phhalWdt_DeInit();
phhalWdt_Start(250, 100, watchdog_callback, 0);        //timeout ~ 5Secs

while(1)
{
phOsal_ThreadDelay(3500);
phhalWdt_Refresh();
}

I'm testing with this code. But getting system reboot even after resetting watchdog every 3.5 seconds.

Well I tried keeping the delay lower for testing and found watchdog doesn't reboot for delay of 2.5 seconds.

 

Any help will be appreciated

标记 (1)
0 项奖励
回复