mirror of https://github.com/ARMmbed/mbed-os.git
Test: Watchdog: Update the deepsleep wait
Extend the deepsleep wait up to 220% of the Watchdog timeout. One of the current Watchdog timing requirements is to fire BEFORE twice the timeout value, but at least one target (K64F) is expected to fire EXACTLY at a doubled timeout value in deepsleep mode. This patch updates the test to cope with a new deepsleep timing requirement.pull/11773/head
parent
945a9b3ad5
commit
55e1a760cb
|
@ -197,8 +197,12 @@ void test_deepsleep_reset()
|
|||
if (!sleep_manager_can_deep_sleep()) {
|
||||
TEST_ASSERT_MESSAGE(0, "Deepsleep should be allowed.");
|
||||
}
|
||||
// Watchdog should fire before twice the timeout value.
|
||||
ThisThread::sleep_for(2 * TIMEOUT_MS); // Device reset expected.
|
||||
|
||||
// The Watchdog reset is allowed to be delayed up to twice the timeout
|
||||
// value when the deepsleep mode is active.
|
||||
// To make the test less sensitive to clock/wait accuracy, add 20% extra
|
||||
// (making tha whole deepsleep wait equal to 2.2 * timeout).
|
||||
ThisThread::sleep_for(220 * TIMEOUT_MS / 100); // Device reset expected.
|
||||
|
||||
// Watchdog reset should have occurred during the deepsleep above.
|
||||
|
||||
|
|
|
@ -188,8 +188,12 @@ void test_deepsleep_reset()
|
|||
if (!sleep_manager_can_deep_sleep()) {
|
||||
TEST_ASSERT_MESSAGE(0, "Deepsleep should be allowed.");
|
||||
}
|
||||
// Watchdog should fire before twice the timeout value.
|
||||
ThisThread::sleep_for(2 * TIMEOUT_MS); // Device reset expected.
|
||||
|
||||
// The Watchdog reset is allowed to be delayed up to twice the timeout
|
||||
// value when the deepsleep mode is active.
|
||||
// To make the test less sensitive to clock/wait accuracy, add 20% extra
|
||||
// (making tha whole deepsleep wait equal to 2.2 * timeout).
|
||||
ThisThread::sleep_for(220 * TIMEOUT_MS / 100); // Device reset expected.
|
||||
|
||||
// Watchdog reset should have occurred during the deepsleep above.
|
||||
|
||||
|
|
Loading…
Reference in New Issue