diff options
| -rw-r--r-- | host/docs/usrp_n3xx.dox | 42 | ||||
| -rwxr-xr-x | mpm/python/usrp_hwd.py | 4 | ||||
| -rw-r--r-- | mpm/python/usrp_mpm/periph_manager/n3xx.py | 5 | 
3 files changed, 51 insertions, 0 deletions
| diff --git a/host/docs/usrp_n3xx.dox b/host/docs/usrp_n3xx.dox index c9efa642d..482a97e44 100644 --- a/host/docs/usrp_n3xx.dox +++ b/host/docs/usrp_n3xx.dox @@ -396,6 +396,30 @@ For a list of which arguments can be passed into make(), see Section   tx_lo_source          | Initialize the source for the TX LO.                                         | N310              | tx_lo_source=external   rfic_digital_loopback | Digital data loopback inside the RFIC.                                       | N310              | rfic_digital_loopback=1 +\subsection n3xx_usage_init Device Initialization + +To maximally speed up UHD, an initialization sequence is run when the device +(or more accurately, the MPM service) starts. This means even on the first run +of UHD, the device will already be initialized into a usable state. Note that +it will always come up in a default state, which can be changed by modifying the +configuration file in `/etc/uhd/mpm.conf` (see also \ref page_configfiles), +such as this: + +~~~{.ini} +; Note: To boot into a fully initialized state, a clock reference must be +; connected before turning the device on if it set to external here: +[n3xx] +clock_source=external +~~~ + +If you prefer not to have the device initialize on boot, but rather have a fast +boot time, add the line `skip_boot_init=1` to your `/etc/uhd/mpm.conf` file. + +For more details on the initialization sequence, see the corresponding section +for the specific N3XX device: +- \ref n3xx_mg_initialization + +  \subsection n3xx_usage_subdevspec Subdev Specifications  The four RF ports on the front panel correspond to the following subdev @@ -782,6 +806,24 @@ If you require a full re-initialization every time a UHD session is spawned,  specify the `force_reinit` flag as a device arg. Specifying it will always do  the full, slow initialization, but will guarantee a full reset of the RFIC. +To maximally speed up UHD, an initialization sequence is run when the device +(or more accurately, the MPM service) starts. This means even on the first run +of UHD, the device will already be initialized into a usable state. Note that +it will always come up in a default state, which can be changed by modifying the +configuration file in `/etc/uhd/mpm.conf` (see also \ref page_configfiles), +such as this: + +~~~{.ini} +; Note: To boot into a fully initialized state, a clock reference must be +; connected before turning the device on if it set to external here: +[n3xx] +master_clock_rate=122.88e6 +clock_source=external +~~~ + +If you prefer not to have the device initialize on boot, but rather have a fast +boot time, add the line `skip_boot_init=1` to your `/etc/uhd/mpm.conf` file. +  \subsection n3xx_mg_calibrations RF Calibrations  The onboard RFIC (AD9371) has built-in calibrations which can be enabled from diff --git a/mpm/python/usrp_hwd.py b/mpm/python/usrp_hwd.py index d04d04927..a09ea95ed 100755 --- a/mpm/python/usrp_hwd.py +++ b/mpm/python/usrp_hwd.py @@ -174,6 +174,10 @@ def main():      if len(mpm.__githash__):          version_string += "-g" + mpm.__githash__      log.info("Launching USRP/MPM, version: %s", version_string) +    if args.init_only: +        # If --init-only is provided, we force disable init during boot time so +        # we can properly time it in init_only(). +        args.default_args['skip_boot_init'] = "1"      if args.override_db_pids is not None:          log.warning('Overriding daughterboard PIDs!')          args.default_args['override_db_pids'] = args.override_db_pids diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py index bec7aa6fe..783ea4ca2 100644 --- a/mpm/python/usrp_mpm/periph_manager/n3xx.py +++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py @@ -197,6 +197,11 @@ class n3xx(ZynqComponents, PeriphManagerBase):              self.log.error("Failed to initialize motherboard: %s", str(ex))              self._initialization_status = str(ex)              self._device_initialized = False +        try: +            if not args.get('skip_boot_init', False): +                self.init(args) +        except Exception as ex: +            self.log.warning("Failed to init device on boot!")      def _check_fpga_compat(self):          " Throw an exception if the compat numbers don't match up " | 
