Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
42
of
174
Return value
Description
>=0
Data returned from get
commands, or 0 for success
in other cases
-1
See
errno
values
errno values
EBADF
File descriptor not opened for
writing
EINVAL
Invalid value for command, or
invalid command.
5.4.5. Usage description
5.4.5.1. PPS
The four described PPS modes can be obtained by setting the PPS output enable and PPS
source according to Table 5-1.
Table 5-1 Mapping between PPS modes and PPS settings
PPS mode
PPS source
PPS output enable
Free-running (default)
Internal
Input
Master
Internal
Output
Master with time
synchronization
External
Output
Slave
External
Input
When PPS source is set to external and then lost, it will revert to internal setting.
Slave mode will fall back to Free-running mode and Master mode with time synchronization
will revert back to Master mode.
When in PPS source is set to internal: If an incoming PPS is detected the PPS found
interrupt is asserted. Typically a number of these PPS found interrupts should be
investigated by the application and once the PPS is deemed stable enough the PPS source
should be set to external (if external synchronization is sought after).
It is up to the application to decide and enforce if and when the external PPS source is to be
used again.
5.4.5.2. PPS Threshold
The PPS threshold has a 16 bit resolution and is used to define the subsecond range within
which incoming PPS that are deemed acceptable.
The range of acceptability is calculated as >= (65535
–
threshold) to <= (65535 + 1 +
threshold) subseconds after the previous PPS.
If the PPS threshold is configured to 0 (min value) only incoming PPS that arrive within >=
subsecond 65535 of the current second to < subsecond 1 of the next second will be deemed
acceptable, (>= 0.65535 to <= 1.0).