commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10613 - in gnuradio/branches/releases/3.2: . gr-usrp/


From: jcorgan
Subject: [Commit-gnuradio] r10613 - in gnuradio/branches/releases/3.2: . gr-usrp/src usrp/host/apps usrp/host/lib/inband usrp/host/lib/legacy usrp2/firmware/apps usrp2/firmware/lib usrp2/host/lib
Date: Sun, 15 Mar 2009 13:34:22 -0600 (MDT)

Author: jcorgan
Date: 2009-03-15 13:34:21 -0600 (Sun, 15 Mar 2009)
New Revision: 10613

Added:
   gnuradio/branches/releases/3.2/usrp2/firmware/apps/burn_dbsrx_eeprom.c
Modified:
   gnuradio/branches/releases/3.2/
   gnuradio/branches/releases/3.2/gr-usrp/src/usrp_source_base.cc
   gnuradio/branches/releases/3.2/usrp/host/apps/burn-db-eeprom
   gnuradio/branches/releases/3.2/usrp/host/lib/inband/usrp_usb_interface.cc
   gnuradio/branches/releases/3.2/usrp/host/lib/legacy/usrp_dbid.dat
   gnuradio/branches/releases/3.2/usrp2/firmware/apps/
   gnuradio/branches/releases/3.2/usrp2/firmware/apps/Makefile.am
   gnuradio/branches/releases/3.2/usrp2/firmware/lib/db_init.c
   gnuradio/branches/releases/3.2/usrp2/firmware/lib/db_xcvr2450.c
   gnuradio/branches/releases/3.2/usrp2/firmware/lib/hal_io.h
   gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.cc
Log:
Applied changesets r10556, r10558, r10560, r10579 to release 3.2 branch.


Property changes on: gnuradio/branches/releases/3.2
___________________________________________________________________
Modified: svn:mergeinfo
   - /gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10559,10565,10578,10600
   + /gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10556,10558-10560,10565,10578-10579,10600

Modified: gnuradio/branches/releases/3.2/gr-usrp/src/usrp_source_base.cc
===================================================================
--- gnuradio/branches/releases/3.2/gr-usrp/src/usrp_source_base.cc      
2009-03-15 19:28:53 UTC (rev 10612)
+++ gnuradio/branches/releases/3.2/gr-usrp/src/usrp_source_base.cc      
2009-03-15 19:34:21 UTC (rev 10613)
@@ -292,7 +292,6 @@
     USRP_DBID_TV_RX,
     USRP_DBID_TV_RX_REV_2,
     USRP_DBID_DBS_RX,
-    USRP_DBID_DBS_RX_REV_2_1,
     USRP_DBID_BASIC_RX
   };
 

Modified: gnuradio/branches/releases/3.2/usrp/host/apps/burn-db-eeprom
===================================================================
--- gnuradio/branches/releases/3.2/usrp/host/apps/burn-db-eeprom        
2009-03-15 19:28:53 UTC (rev 10612)
+++ gnuradio/branches/releases/3.2/usrp/host/apps/burn-db-eeprom        
2009-03-15 19:34:21 UTC (rev 10613)
@@ -32,7 +32,7 @@
     'basictx'         : ((BASIC_TX, 0x0000),        None),
     'basicrx'         : (None,                      (BASIC_RX, 0x0000)),
     'dbsrx'           : (None,                      (DBS_RX, 0x0000)),
-    'dbsrx2'          : (None,                      (DBS_RX_REV_2_1, 0x0000)),
+    'dbsrx_clkmod'    : (None,                      (DBS_RX_CLKMOD, 0x0000)),
     'tvrx'            : (None,                      (TV_RX, 0x0000)),
     'tvrx2'           : (None,                      (TV_RX_REV_2, 0x0000)),
     'tvrx3'           : (None,                      (TV_RX_REV_3, 0x0000)),

Modified: 
gnuradio/branches/releases/3.2/usrp/host/lib/inband/usrp_usb_interface.cc
===================================================================
--- gnuradio/branches/releases/3.2/usrp/host/lib/inband/usrp_usb_interface.cc   
2009-03-15 19:28:53 UTC (rev 10612)
+++ gnuradio/branches/releases/3.2/usrp/host/lib/inband/usrp_usb_interface.cc   
2009-03-15 19:34:21 UTC (rev 10613)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007,2008 Free Software Foundation, Inc.
+ * Copyright 2007,2008,2009 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -553,7 +553,6 @@
     USRP_DBID_TV_RX,
     USRP_DBID_TV_RX_REV_2,
     USRP_DBID_DBS_RX,
-    USRP_DBID_DBS_RX_REV_2_1,
     USRP_DBID_BASIC_RX
   };
 

Modified: gnuradio/branches/releases/3.2/usrp/host/lib/legacy/usrp_dbid.dat
===================================================================
--- gnuradio/branches/releases/3.2/usrp/host/lib/legacy/usrp_dbid.dat   
2009-03-15 19:28:53 UTC (rev 10612)
+++ gnuradio/branches/releases/3.2/usrp/host/lib/legacy/usrp_dbid.dat   
2009-03-15 19:34:21 UTC (rev 10613)
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Free Software Foundation, Inc.
+# Copyright 2005,2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -36,7 +36,7 @@
 "Flex 2400 Tx"         0x000b
 
 "TV Rx Rev 2"          0x000c
-"DBS Rx Rev 2_1"       0x000d
+"DBS Rx ClkMod"                0x000d
 
 "LF Tx"                        0x000e
 "LF Rx"                        0x000f


Property changes on: gnuradio/branches/releases/3.2/usrp2/firmware/apps
___________________________________________________________________
Modified: svn:ignore
   - *-stamp
*.a
*.bin
*.dump
*.log
*.rom
*.map
.deps
Makefile
Makefile.in
aclocal.m4
autom4te.cache
blink_leds
blink_leds2
build
compile
config.h
config.h.in
config.log
config.status
configure
depcomp
echo
eth_test
gen_eth_packets
ibs_rx_test
ibs_tx_test
install-sh
libtool
ltmain.sh
missing
py-compile
rcv_eth_packets
run_tests.sh
stamp-h1
test1
test_phy_comm
timer_test
buf_ram_test
buf_ram_zero
hello
test_printf
test_spi
test_i2c
gen_pause_frames
test_serdes
rx_only
tx_only
tx_standalone
tx_drop
tx_drop2
tx_drop_rate_limited
test_lsdac
test_lsadc
read_dbids
test_db_spi
ramp_lsdac
eth_to_serdes
serdes_to_dsp
sd_gentest
sd_bounce
can_i_sub
tx_only_v2
rx_only_v2
txrx
eth_serdes
serdes_txrx
set_hw_rev
test_sd
factory_test
test_ram
mimo_tx
mimo_tx_slave

   + *-stamp
*.a
*.bin
*.dump
*.log
*.rom
*.map
.deps
Makefile
Makefile.in
aclocal.m4
autom4te.cache
blink_leds
blink_leds2
build
compile
config.h
config.h.in
config.log
config.status
configure
depcomp
echo
eth_test
gen_eth_packets
ibs_rx_test
ibs_tx_test
install-sh
libtool
ltmain.sh
missing
py-compile
rcv_eth_packets
run_tests.sh
stamp-h1
test1
test_phy_comm
timer_test
buf_ram_test
buf_ram_zero
hello
test_printf
test_spi
test_i2c
gen_pause_frames
test_serdes
rx_only
tx_only
tx_standalone
tx_drop
tx_drop2
tx_drop_rate_limited
test_lsdac
test_lsadc
read_dbids
test_db_spi
ramp_lsdac
eth_to_serdes
serdes_to_dsp
sd_gentest
sd_bounce
can_i_sub
tx_only_v2
rx_only_v2
txrx
eth_serdes
serdes_txrx
set_hw_rev
test_sd
factory_test
test_ram
mimo_tx
mimo_tx_slave
burn_dbsrx_eeprom


Modified: gnuradio/branches/releases/3.2/usrp2/firmware/apps/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.2/usrp2/firmware/apps/Makefile.am      
2009-03-15 19:28:53 UTC (rev 10612)
+++ gnuradio/branches/releases/3.2/usrp2/firmware/apps/Makefile.am      
2009-03-15 19:34:21 UTC (rev 10613)
@@ -23,6 +23,7 @@
        blink_leds \
        blink_leds2 \
        buf_ram_test \
+       burn_dbsrx_eeprom \
        can_i_sub \
        echo \
        eth_serdes \

Copied: gnuradio/branches/releases/3.2/usrp2/firmware/apps/burn_dbsrx_eeprom.c 
(from rev 10560, gnuradio/trunk/usrp2/firmware/apps/burn_dbsrx_eeprom.c)
===================================================================
--- gnuradio/branches/releases/3.2/usrp2/firmware/apps/burn_dbsrx_eeprom.c      
                        (rev 0)
+++ gnuradio/branches/releases/3.2/usrp2/firmware/apps/burn_dbsrx_eeprom.c      
2009-03-15 19:34:21 UTC (rev 10613)
@@ -0,0 +1,106 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 Free Software Foundation, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "u2_init.h"
+#include "i2c.h"
+#include "usrp2_i2c_addr.h"
+#include "mdelay.h"
+#include "hal_io.h"
+#include "nonstdio.h"
+#include "bool.h"
+
+
+
+int read_dboard_eeprom(int i2c_addr);
+
+
+#define USRP_DBID_DBS_RX                0x0002
+#define USRP_DBID_DBS_RX_WITH_CLOCK_MOD  0x000d
+
+const char dbs_rx_rev2_eeprom[] = {
+  0xdb, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18
+};
+
+#define        LED_VALS   (LED_A | LED_B | LED_C | LED_D)
+#define        LED_MASK   (LED_A | LED_B | LED_C | LED_D)
+
+int
+main(void)
+{
+  u2_init();
+
+  puts("\nburn_dbsrx_eeprom\n");
+
+  hal_set_leds(0, ~0); // all off
+
+  int i2c_addr = I2C_ADDR_RX_A;
+  int dbid = read_dboard_eeprom(i2c_addr);
+  bool ok;
+  const char *msg = 0;
+
+  switch (dbid){
+  case -1:
+    msg = "No RX daughterboard found";
+    goto bad;
+
+  case -2:
+    msg = "Invalid RX EEPROM contents";
+    goto bad;
+
+  case USRP_DBID_DBS_RX_WITH_CLOCK_MOD:
+    msg = "RX Daughterboard already reports being a DBS RX w/ CLOCK_MOD";
+    goto good;
+
+  case USRP_DBID_DBS_RX:
+    // Says it's a DBS_RX, attempt to burn the EEPROM
+    ok = eeprom_write(i2c_addr, 0,
+                     dbs_rx_rev2_eeprom, sizeof(dbs_rx_rev2_eeprom));
+    if (ok){
+      msg = "Successfully programmed db as DBS RX Rev 2.1";
+      goto good;
+    }
+    else {
+      msg = "Failed to write daugherboard eeprom";
+      goto bad;
+    }
+
+  default:
+    msg = "Daughterboard is not a DBS RX; ignored";
+    goto bad;
+  }
+  
+ good:
+  puts(msg);
+  hal_set_leds(LED_VALS, LED_MASK);
+  while (1)
+    ;
+
+ bad:
+  puts(msg);
+  while(1){
+    hal_toggle_leds(LED_VALS);
+    mdelay(50);
+  }
+}

Modified: gnuradio/branches/releases/3.2/usrp2/firmware/lib/db_init.c
===================================================================
--- gnuradio/branches/releases/3.2/usrp2/firmware/lib/db_init.c 2009-03-15 
19:28:53 UTC (rev 10612)
+++ gnuradio/branches/releases/3.2/usrp2/firmware/lib/db_init.c 2009-03-15 
19:34:21 UTC (rev 10613)
@@ -104,7 +104,7 @@
 /*
  * Return DBID, -1 <none> or -2 <invalid eeprom contents>
  */
-static int
+int
 read_dboard_eeprom(int i2c_addr)
 {
   unsigned char buf[DB_EEPROM_CLEN];

Modified: gnuradio/branches/releases/3.2/usrp2/firmware/lib/db_xcvr2450.c
===================================================================
--- gnuradio/branches/releases/3.2/usrp2/firmware/lib/db_xcvr2450.c     
2009-03-15 19:28:53 UTC (rev 10612)
+++ gnuradio/branches/releases/3.2/usrp2/firmware/lib/db_xcvr2450.c     
2009-03-15 19:34:21 UTC (rev 10613)
@@ -57,7 +57,7 @@
 #define HB_FREQ_MIN U2_DOUBLE_TO_FXPT_FREQ(4.8e9)
 #define HB_FREQ_MAX U2_DOUBLE_TO_FXPT_FREQ(6.1e9)
 #define MASTER_REF_CLK_DIV 1
-#define N_DIV_MIN_Q16 (130 << 16)
+#define N_DIV_MIN_Q16 (131 << 16)
 
 bool xcvr2450_init(struct db_base *db);
 bool xcvr2450_set_freq(struct db_base *db, u2_fxpt_freq_t freq, u2_fxpt_freq_t 
*dc);
@@ -491,5 +491,6 @@
 xcvr2450_set_tx_enable(struct db_base *dbb, bool on){
   struct db_xcvr2450_dummy *db = (struct db_xcvr2450_dummy *) dbb;
   db->common->d_tx_enb = on;
+  set_gpio(db);
   return true;
 }

Modified: gnuradio/branches/releases/3.2/usrp2/firmware/lib/hal_io.h
===================================================================
--- gnuradio/branches/releases/3.2/usrp2/firmware/lib/hal_io.h  2009-03-15 
19:28:53 UTC (rev 10612)
+++ gnuradio/branches/releases/3.2/usrp2/firmware/lib/hal_io.h  2009-03-15 
19:34:21 UTC (rev 10613)
@@ -91,12 +91,6 @@
  * ------------------------------------------------------------------------
  */
 
-#define        LED_0           0x0001
-#define        LED_1           0x0002
-#define        LED_3           0x0004
-#define        LED_4           0x0008
-#define        LED_ETH_CONN    0x0010
-
 void hal_set_leds(int value, int mask);
 void hal_toggle_leds(int mask);
 

Modified: gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.cc
===================================================================
--- gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.cc 2009-03-15 
19:28:53 UTC (rev 10612)
+++ gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.cc 2009-03-15 
19:34:21 UTC (rev 10613)
@@ -152,6 +152,10 @@
     d_bg_thread = new usrp2_thread(this);
     d_bg_thread->start();
 
+    // In case the USRP2 was left streaming RX
+    // FIXME: only one channel right now
+    stop_rx_streaming(0);
+
     if (!dboard_info())                // we're hosed
       throw std::runtime_error("Unable to retrieve daughterboard info");
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]