Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

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.
 

Detailed Description

Function Documentation

◆ arch_busy_wait()

void arch_busy_wait ( uint32_t  usec_to_wait)

#include </home/runner/work/sdk-nrf/sdk-nrf/ncs/zephyr/kernel/include/kernel_arch_interface.h>

Architecture-specific implementation of busy-waiting.

Parameters
usec_to_waitWait period, in microseconds

◆ arch_k_cycle_get_32()

static uint32_t arch_k_cycle_get_32 ( void  )
inlinestatic

#include <zephyr/arch/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.

See also
k_cycle_get_32()
Returns
The current cycle time. This should count up monotonically through the full 32 bit space, wrapping at 0xffffffff. Hardware with fewer bits of precision in the timer is expected to synthesize a 32 bit count.

◆ arch_k_cycle_get_64()

static uint64_t arch_k_cycle_get_64 ( void  )
inlinestatic

#include <zephyr/arch/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.

See also
arch_k_cycle_get_32()
Returns
The current cycle time. This should count up monotonically through the full 64 bit space, wrapping at 2^64-1. Hardware with fewer bits of precision in the timer is generally not expected to implement this API.