diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2016-07-18 15:12:32 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-07-29 15:02:44 -0700 |
commit | b517067a418e1551f7c70cc32840f10845003934 (patch) | |
tree | 581f7e1c55fe0a4f29d900b6d880c46cb20a7b97 /cts/build.mk | |
parent | 4a72f8f60750ff43c0cffb4735a6279db25c1d67 (diff) | |
download | chrome-ec-b517067a418e1551f7c70cc32840f10845003934.tar.gz |
cts: Add timer test
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
Diffstat (limited to 'cts/build.mk')
-rw-r--r-- | cts/build.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cts/build.mk b/cts/build.mk index 59fa85547c..8d132e8da2 100644 --- a/cts/build.mk +++ b/cts/build.mk @@ -5,6 +5,10 @@ CFLAGS_CTS=-DCTS_MODULE -DCTS_TASKFILE=cts.tasklist +ifeq "$(CTS_MODULE)" "gpio" +CFLAGS_CTS+=-DCTS_MODULE_GPIO +endif + ifeq ($(BOARD),stm32l476g-eval) cts-y+=$(CTS_MODULE)/th.o cts-y+=common/th_common.o |