From 68e536b3685a34a7935b3039803542e9ea47b75f Mon Sep 17 00:00:00 2001 From: Filip Jagodzinski Date: Wed, 8 May 2019 17:54:22 +0200 Subject: [PATCH] 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. --- TESTS/mbed_hal/reset_reason/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TESTS/mbed_hal/reset_reason/main.cpp b/TESTS/mbed_hal/reset_reason/main.cpp index 2dc68f6355..63136d3c0b 100644 --- a/TESTS/mbed_hal/reset_reason/main.cpp +++ b/TESTS/mbed_hal/reset_reason/main.cpp @@ -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; }