Functional Description
3-3
See the section “Using GPS for System Timekeeping” for details. Generally, only the
master RCIM needs a GPS; slaves use one of the software methods available for
synchronizing their POSIX clock to the master.
Direct Access to the Clocks
1
The device file
/dev/rcim:
N
/sclk
(where
N
is the RCIM card number starting from
zero) can be used to access the RCIM clocks directly using
mmap(2)
. From the address
returned by
mmap
, the following offsets are used to access the clock fields:
0x0
upper 32-bits of tick clock
0x8
lower 32-bits of tick clock
0x10
status and control (cannot be modified)
0x100
POSIX clock seconds
0x108
POSIX clock nanoseconds
0x110
status and control (cannot be modified)
These offsets are defined in the header file
/usr/include/linux/rcim.h
(with
names beginning with
RCIM_SYNCCLOCK_
).
To set the value of the POSIX clock, the
rcim_clocksync(1)
utility can be used in
interactive mode using the “update” command.
Synchronizing the Clocks
1
The sections below describe the techniques and tools used to synchronize the clocks on the
RCIM.
The rcim_clocksync Utility
1
The
rcim_clocksync(1)
utility can be used to reset the tick clocks on all connected
RCIMs to zero to provide a common time stamp across the system. This synchronization
operation occurs automatically when the RCIM master system boots. As slave systems
become available, it will be necessary to reissue this command to synchronize the tick
clocks across the RCIM chain, however, this can be automated (see the section
“Automatic Synchronization” below).
rcim_clocksync
can also be used to
synchronize the POSIX clocks on all connected RCIMs. This procedure is described in the
section “Synchronizing the POSIX Clock.”
Note that the system clock is synchronized with the RCIM and when
rcim_clocksync
is run other than at system boot, there are consequences and should be used with caution.
Master and slave system times are synchronized with the POSIX clock, and when system
time stops advancing, time-based functions using those clocks will stop.
Synchronization always succeeds on the RCIM master or isolated system; an error is
returned if synchronization is attempted on an RCIM slave system.
Specifying
rcim_clocksync
with no options on the RCIM master system synchronizes
all tick clocks in the RCIM chain.
Содержание RCIM
Страница 1: ...Real Time Clock and Interrupt Module RCIM User s Guide 0898007 1000 March 2021...
Страница 10: ...RCIM User s Guide 1 4...
Страница 32: ...RCIM User s Guide 2 22...
Страница 80: ...RCIM User s Guide A 28...
Страница 102: ...RCIM User s Guide C 2...