Skip to content

Commit

Permalink
docs: add a note about using the device arguments with the GPSDO
Browse files Browse the repository at this point in the history
  • Loading branch information
atomita-ni authored and joergho committed Oct 24, 2024
1 parent 99b5661 commit fed089e
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions host/docs/usrp_x4xx.dox
Original file line number Diff line number Diff line change
Expand Up @@ -1144,8 +1144,19 @@ on the rear panel (see \ref x4xx_overview_panels). When the X4x0 has access to
GPS satellite signals, it can use this module to read out the current GPS time
and location as well as to discipline an onboard OCXO.

To use the GPS as a clock and time reference, simply use `gpsdo` as a clock or
time source. Alternatively, set `gpsdo` as a synchronization source:
To use the GPS as a clock and time reference, set the \ref x4xx_usage_args
`time_source` and `clock_source` to `gpsdo`.

Note the GPS module is not enabled when the clock source is not set to `gpsdo`.
Its power-on status can be queried using the `gps_enabled` GPS sensor (see also
\ref x4xx_usage_sensors). When disabled, none of the sensors will return useful
(if any) values.

Note that acquiring a GPS lock can take some time after enabling the GPS, so if
a UHD application is enabling the GPS dynamically, it might take some time
before a GPS lock is reported.

To set the clock source and time source dynamically, see the following code:

~~~{.cpp}
// Set clock/time individually:
Expand All @@ -1157,15 +1168,6 @@ usrp->set_time_source("gpsdo");
usrp->set_sync_source("clock_source=gpsdo,time_source=gpsdo");
~~~

Note the GPS module is not always enabled. Its power-on status can be queried
using the `gps_enabled` GPS sensor (see also \ref x4xx_usage_sensors). When
disabled, none of the sensors will return useful (if any) values.

When selecting `gpsdo` as a clock source, the GPS will always be enabled. Note
that acquiring a GPS lock can take some time after enabling the GPS, so if
a UHD application is enabling the GPS dynamically, it might take some time
before a GPS lock is reported.

\subsection x4xx_usage_gpio Front-Panel Programmable GPIOs

The USRP X4x0 has two HDMI front-panel connectors, which are connected to the
Expand Down

0 comments on commit fed089e

Please sign in to comment.