commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r7763 - usrp2/trunk/firmware/apps


From: eb
Subject: [Commit-gnuradio] r7763 - usrp2/trunk/firmware/apps
Date: Wed, 20 Feb 2008 21:16:05 -0700 (MST)

Author: eb
Date: 2008-02-20 21:16:05 -0700 (Wed, 20 Feb 2008)
New Revision: 7763

Modified:
   usrp2/trunk/firmware/apps/eth_to_serdes.c
   usrp2/trunk/firmware/apps/serdes_to_dsp.c
Log:
add clock control to mimo test code

Modified: usrp2/trunk/firmware/apps/eth_to_serdes.c
===================================================================
--- usrp2/trunk/firmware/apps/eth_to_serdes.c   2008-02-21 02:07:03 UTC (rev 
7762)
+++ usrp2/trunk/firmware/apps/eth_to_serdes.c   2008-02-21 04:16:05 UTC (rev 
7763)
@@ -31,6 +31,7 @@
 #include "usrp2_eth_packet.h"
 #include "dbsm.h"
 #include "app_passthru.h"
+#include <ad9510.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
@@ -111,6 +112,13 @@
 {
   u2_init();
 
+  // provide a clock for the serdes (THEY_LOCK_TO_ME)
+  ad9510_write_reg(0x3E, 0x00); // Turn on output 2 (clk_exp_out), normal 
levels
+  ad9510_write_reg(0x4D, 0x00); // Turn on Div2
+  ad9510_write_reg(0x4C, 0x44); // Set Div2 = 10, output a 10 MHz clock
+  ad9510_write_reg(0x5A, 0x01); // Update Regs
+
+
   // setup tx gpio bits for GPIOM_FPGA_1 -- fpga debug output
   hal_gpio_set_tx_mode(15, 0, GPIOM_FPGA_1);
   hal_gpio_set_rx_mode(15, 0, GPIOM_FPGA_1);   // no printing...
@@ -120,6 +128,7 @@
   ethernet_register_link_changed_callback(link_changed_callback);
   ethernet_init();
 
+
   // initialize double buffering state machine for ethernet to serdes
 
   dbsm_init(&eth_to_sd_sm, ETH_TO_SD_BUF_0,

Modified: usrp2/trunk/firmware/apps/serdes_to_dsp.c
===================================================================
--- usrp2/trunk/firmware/apps/serdes_to_dsp.c   2008-02-21 02:07:03 UTC (rev 
7762)
+++ usrp2/trunk/firmware/apps/serdes_to_dsp.c   2008-02-21 04:16:05 UTC (rev 
7763)
@@ -31,6 +31,7 @@
 #include "usrp2_eth_packet.h"
 #include "dbsm.h"
 #include "app_common.h"
+#include <ad9510.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
@@ -137,6 +138,16 @@
 {
   u2_init();
 
+  // Get our clock from the mimo interface
+
+  // if(I WANT TO LOCK TO A REFERENCE CLOCK) 
+  // Reg 8, Charge pump on, dig lock det, positive PFD, 47
+  ad9510_write_reg(0x08, 0x47);
+  ad9510_write_reg(0x5A, 0x01); // Update Regs
+  // if (LOCK_TO_MIMO_REF)
+  // Turn on ref output and choose the MIMO connector
+  output_regs->clk_ctrl = 0x15;
+
   // setup tx gpio bits for GPIOM_FPGA_1 -- fpga debug output
   hal_gpio_set_tx_mode(15, 0, GPIOM_FPGA_1);
   hal_gpio_set_rx_mode(15, 0, GPIOM_FPGA_1);   // no printing...
@@ -146,6 +157,7 @@
   ethernet_register_link_changed_callback(link_changed_callback);
   ethernet_init();
 
+
   // initialize double buffering state machine for ethernet -> DSP Tx
 
   dbsm_init(&dsp_tx_sm, DSP_TX_BUF_0,





reply via email to

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