Further attempted noise reduction for ticket:230
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 22 Jan 2008 00:06:28 +0000 (00:06 +0000)
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 22 Jan 2008 00:06:28 +0000 (00:06 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7486 221aa14e-8319-0410-a670-987f0aec2ac5

gr-usrp/src/db_flexrf.py

index b998e1088ea755551263d38fe461dc85488d0443..b5a0cab13ea6d74d04c9e4d2d440b01c9783b49e 100644 (file)
@@ -88,6 +88,9 @@ class flexrf_base(db_base.db_base):
     def __del__(self):
         #print "flexrf_base.__del__"
         self._u.write_io(self._which, self.power_off, POWER_UP)   # turn off power to board
+       # Power down VCO/PLL
+       self.PD = 3 
+       self._write_control(self._compute_control_reg())
         self._enable_refclk(False)                       # turn off refclk
         self.set_auto_tr(False)
 
@@ -410,15 +413,19 @@ class _AD4360_common(object):
         R = (self.R_RSV<<22) | (self.BSC<<20) | (self.TEST<<19) | (self.LDP<<18) \
             | (self.ABP<<16) | (self.R_DIV<<2)
         
-        control = (self.P<<22) | (self.PD<<20) | (self.CP2<<17) | (self.CP1<<14) | (self.PL<<12) \
-                  | (self.MTLD<<11) | (self.CPG<<10) | (self.CP3S<<9) | (self.PDP<<8) | \
-                  (self.MUXOUT<<5) | (self.CR<<4) | (self.PC<<2)
+        control = self._compute_control_reg()
 
         N = (self.DIVSEL<<23) | (self.DIV2<<22) | (self.CPGAIN<<21) | (self.B_DIV<<8) | \
             (self.N_RSV<<7) | (self.A_DIV<<2)
 
         return (R,control,N,actual_freq/self.freq_mult)
 
+    def _compute_control_reg(self):
+        control = (self.P<<22) | (self.PD<<20) | (self.CP2<<17) | (self.CP1<<14) | (self.PL<<12) \
+                  | (self.MTLD<<11) | (self.CPG<<10) | (self.CP3S<<9) | (self.PDP<<8) | \
+                  (self.MUXOUT<<5) | (self.CR<<4) | (self.PC<<2)
+       return control    
+
     def _refclk_divisor(self):
         """
         Return value to stick in REFCLK_DIVISOR register