Other Parts Discussed in Thread: Z-STACK
Hi, Ryan & YK,
I have been enable watchdog in Zstack 3.0.2 through defined macro WDT_IN_PM1,and then feed watchdog in osal_start_system() function as following code segment,but whenever does steering call bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_STEERING),the watchdog timeout unexpected,as we all known,the maximum is 1 seconds,what's wrong with me?
void osal_start_system( void )
{
#ifdef USE_ICALL
/* Kick off timer service in order to allocate resources upfront.
* The first timeout is required to schedule next OSAL timer event
* as well. */
ICall_Errno errno = ICall_setTimer(1, osal_msec_timer_cback,
(void *) osal_msec_timer_seq,
&osal_timerid_msec_timer);
if (errno != ICALL_ERRNO_SUCCESS)
{
ICall_abort();
}
#endif /* USE_ICALL */
#if !defined ( ZBIT ) && !defined ( UBIT )
for(;;) // Forever Loop
#endif
{
osal_run_system();
#ifdef WDT_IN_PM1
WD_KICK(); //feed watchdog
#endif
#ifdef USE_ICALL
ICall_wait(ICALL_TIMEOUT_FOREVER);
#endif /* USE_ICALL */
}
}