Zephyr timer is based on system ticks, there usually exists some time drift due to round up/down errors between cycles, ticks and time delay, we need to add those expected time drift into the bound calculation for running this test. Add a new config TIMER_TEST_PERIOD_MAX_DRIFT_PERCENT for users to set expected maximum drift percentage for the timer period. Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
29 lines
702 B
Plaintext
29 lines
702 B
Plaintext
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (c) 2022 Intel Corporation
|
|
|
|
mainmenu "Timer Behavior Test"
|
|
|
|
source "Kconfig.zephyr"
|
|
|
|
config TIMER_TEST_SAMPLES
|
|
int "The number of timer samples to gather for statistics"
|
|
default 10000
|
|
|
|
config TIMER_TEST_PERIOD
|
|
int "The number of microseconds to for the timer period"
|
|
default 1000
|
|
|
|
config TIMER_TEST_MAX_STDDEV
|
|
int "Maximum standard deviation in microseconds allowed"
|
|
default 10
|
|
|
|
config TIMER_TEST_MAX_DRIFT
|
|
int "Maximum drift in microseconds allowed (should be about 1 period allowance)"
|
|
default 1000
|
|
|
|
config TIMER_TEST_PERIOD_MAX_DRIFT_PERCENT
|
|
int "Maximum drift percentage for the timer period"
|
|
default 10
|
|
help
|
|
A value of 10 means 10%.
|