Difference between revisions of "OCEOS/oceos kernel/timer"
Jump to navigation
Jump to search
Okhoruzhyy (talk | contribs) |
Okhoruzhyy (talk | contribs) (→SPARC) |
||
Line 2: | Line 2: | ||
==<span style="color:#0000ff">Introduction</span>== | ==<span style="color:#0000ff">Introduction</span>== | ||
==== <span style="color:#0000ff">SPARC</span> ==== | ==== <span style="color:#0000ff">SPARC</span> ==== | ||
In OCEOS system time is based on two chained 32-bit timers. | In OCEOS for SPARC system time is based on two chained 32-bit timers.<br> | ||
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 | |||
No interrupts are involved, the current system time is obtained by reading | values since the timers count down.<br> | ||
the two timer counter registers (in an atomic way) and then inverting the | The scaler associated with the timers is configured based on the system clock frequency to decrement the low order timer every microsecond. This | ||
values since the timers count down. | 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.<br> | ||
The system time is reset to 0 by [[OCEOS/oceos kernel/initialisation#oceos_init()|oceos_init()]]. | |||
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() | |||
==== <span style="color:#0000ff">ARM Cortex-M</span> ==== | ==== <span style="color:#0000ff">ARM Cortex-M</span> ==== | ||
[[Category:backup]] | [[Category:backup]] |
Revision as of 12:07, 16 March 2022
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().