mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-31 02:51:26 +00:00
The timer test checks the accuracy of the internal timer. After sync, DUT and TH start counting down one second. After one second, DUT raises GPIO level. TH determines whether the test passes or not based on how much more or less time elapsed than one second, assuming its clock is calibrated. This test takes advantage of TH running on a bare chip. If the host were measuring (instead of TH), the timing would be affected by many software and hardware layers (e.g. UART drivers on DUT and host, python interpreter, etc.). BUG=chromium:624520 BRANCH=none TEST=cts.py --module timer && cts.py --module gpio && make buildall Change-Id: I535e7772b4d93f1f5d248506f7ea167429a50174 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/361384
20 lines
616 B
Plaintext
20 lines
616 B
Plaintext
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/*
|
|
* Test timer accuracy
|
|
*
|
|
* After sync, DUT and TH start counting down one second. After one second,
|
|
* DUT raises GPIO level, which triggers an interrupt on TH. TH determines
|
|
* whether the test passes or not based on how much more or less time elapsed
|
|
* than one second.
|
|
*
|
|
* Requirements:
|
|
* - Sync connection
|
|
* - GPIO_OUTPUT connection for sending notification from DUT
|
|
* - Calibrated TH timer
|
|
*/
|
|
CTS_TEST(timer_calibration_test)
|