For the project "ble_app_barebone", I have changed the watchdog from "#undef CFG_WDOG" into "#define CFG_WDOG" in the "da1458x_config_basic.h". Then I write the following code into "app_task.c", then I find after it running for a while, the program stops. It looks like the watchdog is not running. Could you please help? Thank you very much again.
// device configuration updated
case GAPM_SET_DEV_CONFIG:
{
if(param->status != GAP_ERR_NO_ERROR)
{
ASSERT_ERR(0); // unexpected error
}
else
{
if( 7 == current_role)
{
#if DEBUG_LOG
printf_string("\r\n Adv1\r\n");
uart2_init(UART_BAUDRATE_115K2, 3);
#endif
while(1)
{
#if DEBUG_LOG
printf_string("\r\n WD T");
if (USE_WDOG)
{
printf_string(" 1");
wdg_reload(WATCHDOG_DEFAULT_PERIOD);
wdg_resume ();
}
if (DEVELOPMENT_DEBUG)
{
printf_string(" 2");
}
printf_string(" \r\n");
uart2_init(UART_BAUDRATE_115K2, 3);
#endif
}
record2(current_role);
EXECUTE_CALLBACK_VOID(app_on_set_dev_config_complete);
}
else
{
#if DEBUG_LOG
printf_string("\r\n Adv2\r\n");
uart2_init(UART_BAUDRATE_115K2, 3);
#endif
record2(current_role);
}
ke_timer_set(APP_SWITCH_ROLE_TIMER, TASK_APP, 10); //10*10ms
}
}
break;