OCEOS/oceos kernel/timer

From wiki
Jump to navigation Jump to search

OCEOS System Time

Introduction

SPARC

In OCEOS for SPARC system time is based on two chained 32-bit timers.
No interrupts are involved, the current system time is obtained by reading the two timer counter registers (in an atomic way) and then inverting the values since the timers count down.
The scaler associated with the timers is configured based on the system clock frequency to decrement the low order timer every microsecond. This decrements the high order timer when it rolls over, every 71.6 minutes approximately. The 64-bit time range is very long, over 584,000 years.
The system time is reset to 0 by oceos_init().

ARM Cortex-M