Test: update HAL reset_reason test

Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
pull/10902/head
Filip Jagodzinski 2019-05-08 17:54:22 +02:00 committed by Martin Kojtal
parent b3d45c5eef
commit 68e536b368
1 changed files with 1 additions and 2 deletions

View File

@ -29,7 +29,6 @@
#define MSG_VALUE_WATCHDOG_STATUS "wdg_present"
#define WDG_TIMEOUT_MS 50UL
#define WDG_TIMEOUT_DELTA_MS 50UL
#else
#define MSG_VALUE_WATCHDOG_STATUS "no_wdg"
@ -115,7 +114,7 @@ static cmd_status_t handle_command(const char *key, const char *value)
TEST_ASSERT_MESSAGE(0, "hal_watchdog_init() error.");
return CMD_STATUS_ERROR;
}
wait_ms(WDG_TIMEOUT_MS + WDG_TIMEOUT_DELTA_MS);
wait_ms(2 * WDG_TIMEOUT_MS); // Watchdog should fire before twice the timeout value.
TEST_ASSERT_MESSAGE(0, "Watchdog did not reset the device as expected.");
return CMD_STATUS_ERROR;
}