RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Files | Data Structures | Macros | Functions
Armv7-AR/AArch64 Generic Timer Clock Driver

This group contains the Armv7-AR/AArch64 Generic Timer Clock Driver implementation. More...

Files

file  arm-generic-timer.c
 This source file contains a Clock Driver implementation using Armv7-AR/AArch64 Generic Timer.
 

Data Structures

struct  arm_gt_clock_context
 

Macros

#define Clock_driver_support_at_tick(arg)    arm_gt_clock_at_tick(arg)
 
#define Clock_driver_support_initialize_hardware()    arm_gt_clock_initialize()
 
#define Clock_driver_support_install_isr(isr)    arm_gt_clock_handler_install(isr)
 

Functions

uint32_t _CPU_Counter_frequency (void)
 Gets the current CPU counter frequency in Hz.
 
CPU_Counter_ticks _CPU_Counter_read (void)
 Gets the current CPU counter value.
 
 RTEMS_SYSINIT_ITEM (arm_gt_clock_early_init, RTEMS_SYSINIT_CPU_COUNTER, RTEMS_SYSINIT_ORDER_FIRST)
 

Detailed Description

This group contains the Armv7-AR/AArch64 Generic Timer Clock Driver implementation.

The BSP must provide the following function:

void arm_generic_timer_get_config(uint32_t *frequency, uint32_t *irq);

The BSP may optionally define ARM_GENERIC_TIMER_USE_VIRTUAL in <bsp.h> to use the virtual timer instead of the physical timer.

Function Documentation

◆ _CPU_Counter_frequency()

uint32_t _CPU_Counter_frequency ( void  )

Gets the current CPU counter frequency in Hz.

Returns
Returns the current CPU counter frequency in Hz.

◆ _CPU_Counter_read()

CPU_Counter_ticks _CPU_Counter_read ( void  )

Gets the current CPU counter value.

A CPU counter should be some monotonically increasing free-running counter. It ticks usually with a frequency close to the CPU or system bus clock. The counter should not be affected by power saving states so that it can be used for timestamps. The CPU counter should be initialized at the RTEMS_SYSINIT_CPU_COUNTER initialization step if necessary. If RTEMS_PROFILING is enabled, the CPU counter may have to work very early in the system initialization to avoid invalid profiling statistics.

Returns
Returns the current CPU counter value.