Zephyr API Documentation
3.5.0
A Scalable Open Source RTOS
|
|
3.5.0 |
Functions | |
void | arch_busy_wait (uint32_t usec_to_wait) |
Architecture-specific implementation of busy-waiting. | |
static uint32_t | arch_k_cycle_get_32 (void) |
Obtain the current cycle count, in units specified by CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC. | |
static uint64_t | arch_k_cycle_get_64 (void) |
As for arch_k_cycle_get_32(), but with a 64 bit return value. | |
void | arch_timing_init (void) |
Initialize the timing subsystem. | |
void | arch_timing_start (void) |
Signal the start of the timing information gathering. | |
void | arch_timing_stop (void) |
Signal the end of the timing information gathering. | |
timing_t | arch_timing_counter_get (void) |
Return timing counter. | |
uint64_t | arch_timing_cycles_get (volatile timing_t *const start, volatile timing_t *const end) |
Get number of cycles between start and end . | |
uint64_t | arch_timing_freq_get (void) |
Get frequency of counter used (in Hz). | |
uint64_t | arch_timing_cycles_to_ns (uint64_t cycles) |
Convert number of cycles into nanoseconds. | |
uint64_t | arch_timing_cycles_to_ns_avg (uint64_t cycles, uint32_t count) |
Convert number of cycles into nanoseconds with averaging. | |
uint32_t | arch_timing_freq_get_mhz (void) |
Get frequency of counter used (in MHz). | |
void arch_busy_wait | ( | uint32_t | usec_to_wait | ) |
#include </runner/_work/zephyr/zephyr/kernel/include/kernel_arch_interface.h>
Architecture-specific implementation of busy-waiting.
usec_to_wait | Wait period, in microseconds |
|
inlinestatic |
#include <zephyr/sys/arch_interface.h>
Obtain the current cycle count, in units specified by CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC.
While this is historically specified as part of the architecture API, in practice virtually all platforms forward it to the sys_clock_cycle_get_32() API provided by the timer driver.
|
inlinestatic |
#include <zephyr/sys/arch_interface.h>
As for arch_k_cycle_get_32(), but with a 64 bit return value.
Not all timer hardware has a 64 bit timer, this needs to be implemented only if CONFIG_TIMER_HAS_64BIT_CYCLE_COUNTER is set.
timing_t arch_timing_counter_get | ( | void | ) |
#include <zephyr/sys/arch_interface.h>
Return timing counter.
#include <zephyr/sys/arch_interface.h>
Get number of cycles between start
and end
.
For some architectures or SoCs, the raw numbers from counter need to be scaled to obtain actual number of cycles, or may roll over internally. This function computes a positive-definite interval between two returned cycle values.
start | Pointer to counter at start of a measured execution. |
end | Pointer to counter at stop of a measured execution. |
#include <zephyr/sys/arch_interface.h>
Convert number of cycles
into nanoseconds.
cycles | Number of cycles |
#include <zephyr/sys/arch_interface.h>
Convert number of cycles
into nanoseconds with averaging.
cycles | Number of cycles |
count | Times of accumulated cycles to average over |
uint64_t arch_timing_freq_get | ( | void | ) |
#include <zephyr/sys/arch_interface.h>
Get frequency of counter used (in Hz).
uint32_t arch_timing_freq_get_mhz | ( | void | ) |
#include <zephyr/sys/arch_interface.h>
Get frequency of counter used (in MHz).
void arch_timing_init | ( | void | ) |
#include <zephyr/sys/arch_interface.h>
Initialize the timing subsystem.
Perform the necessary steps to initialize the timing subsystem.
void arch_timing_start | ( | void | ) |
#include <zephyr/sys/arch_interface.h>
Signal the start of the timing information gathering.
Signal to the timing subsystem that timing information will be gathered from this point forward.
void arch_timing_stop | ( | void | ) |
#include <zephyr/sys/arch_interface.h>
Signal the end of the timing information gathering.
Signal to the timing subsystem that timing information is no longer being gathered from this point forward.