Zephyr Project API
3.3.0
A Scalable Open Source RTOS
|
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <zephyr/kernel.h>
#include <zephyr/tc_util.h>
#include <zephyr/ztest.h>
Functions | |
K_SEM_DEFINE (periodic_sem, 0, 1) | |
void | periodic_fn (struct k_timer *t) |
uint64_t | periodic_diff (uint64_t later, uint64_t earlier) |
double | cycles_to_us (double cycles) |
ZTEST (timer_jitter_drift, test_jitter_drift) | |
Test a timers jitter and drift over time. More... | |
ZTEST_SUITE (timer_jitter_drift, NULL, NULL, NULL, NULL, NULL) | |
Variables | |
static uint32_t | periodic_idx |
static uint32_t | periodic_rollovers |
static uint64_t | periodic_data [CONFIG_TIMER_TEST_SAMPLES+1] |
static uint64_t | periodic_start |
static uint64_t | periodic_end |
static struct k_timer | periodic_timer |
double cycles_to_us | ( | double | cycles | ) |
K_SEM_DEFINE | ( | periodic_sem | , |
0 | , | ||
1 | |||
) |
void periodic_fn | ( | struct k_timer * | t | ) |
ZTEST | ( | timer_jitter_drift | , |
test_jitter_drift | |||
) |
Test a timers jitter and drift over time.
Named alpha_jitter_drift as this test requires ideally no clock counter roll overs while running on Arm and should be the first test in the suite to run
ZTEST_SUITE | ( | timer_jitter_drift | , |
NULL | , | ||
NULL | , | ||
NULL | , | ||
NULL | , | ||
NULL | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |