The cycle64 sample is intended to complement `test_clock_cycle_64()` in `tests/kernel/common`. The sample demonstrates the upper 32-bits of the 64-bit cycle counter incrementing when the bottom 32-bits roll over from `UINT32_MAX` to 0. If the upper 32-bits of the 64-bit cycle counter does not increment, then an error message is printed. ``` west build -p auto -b qemu_cortex_a53 -t run \ samples/kernel/cycle64 ... *** Booting Zephyr OS build v2.7.99-1124-gd7ba4e394832 *** wrap-around should occur in 68s [ddd:hh:mm:ss.0ms] [000:00:00:00.020]: c64: 0000000000174258 [000:00:01:08.760]: c64: 000000010027f8bb [000:00:02:17.490]: c64: 0000000200348c85 ``` Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
18 lines
342 B
YAML
18 lines
342 B
YAML
sample:
|
|
description: k_cycle_get_64() example
|
|
name: cycle64
|
|
common:
|
|
integration_platforms:
|
|
- native_posix_64
|
|
- qemu_riscv
|
|
- qemu_riscv64
|
|
tags: kernel
|
|
harness: console
|
|
harness_config:
|
|
type: one_line
|
|
regex:
|
|
- "SUCCESS"
|
|
tests:
|
|
sample.kernel.cycle64:
|
|
filter: CONFIG_TIMER_HAS_64BIT_CYCLE_COUNTER
|