Mistake on this page?
Report an issue in GitHub or email us
watchdog_timing_tests.h
1 /*
2  * Copyright (c) 2018-2019 Arm Limited and affiliates.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 /**
19  * @addtogroup hal_watchdog_tests
20  * @{
21  */
22 
23 #ifndef MBED_HAL_WATCHDOG_TIMING_TESTS_H
24 #define MBED_HAL_WATCHDOG_TIMING_TESTS_H
25 
26 #if DEVICE_WATCHDOG
27 
28 /** Test watchdog timing accuracy
29  *
30  * Phase 1.
31  * Given a watchdog timer started with a timeout value of X ms,
32  * when the time of X ms elapses,
33  * then the device is restarted by the watchdog.
34  *
35  * Phase 2.
36  * Given a device restarted by the watchdog timer,
37  * when the device receives time measurement T from the host,
38  * then X <= T < 2 * X.
39  */
40 template<uint32_t timeout_ms, uint32_t delta_ms>
41 void test_timing();
42 
43 /** Test Watchdog timeout
44  *
45  * Given a device with a Watchdog started,
46  * when the Watchdog timeout doesn't expire,
47  * then the device restart is not performed.
48  * When the Watchdog timeout does expire,
49  * then the device is restarted after the timeout and before twice the timeout value.
50  */
52 
53 #endif
54 
55 #endif
56 
57 /** @}*/
58 
void test_timing()
Test watchdog timing accuracy.
void test_timeout_lower_limit()
Test Watchdog timeout.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.