[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10125 - gnuradio/trunk/usrp2/firmware/lib
From: |
matt |
Subject: |
[Commit-gnuradio] r10125 - gnuradio/trunk/usrp2/firmware/lib |
Date: |
Wed, 17 Dec 2008 16:03:05 -0700 (MST) |
Author: matt
Date: 2008-12-17 16:02:59 -0700 (Wed, 17 Dec 2008)
New Revision: 10125
Modified:
gnuradio/trunk/usrp2/firmware/lib/db_rfx.c
Log:
added frequency offset capability. Set to 12.5e6 on TX, 0 on RX for now
Modified: gnuradio/trunk/usrp2/firmware/lib/db_rfx.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/db_rfx.c 2008-12-17 17:47:57 UTC (rev
10124)
+++ gnuradio/trunk/usrp2/firmware/lib/db_rfx.c 2008-12-17 23:02:59 UTC (rev
10125)
@@ -72,7 +72,8 @@
unsigned char CP1;
unsigned char CP2;
int freq_mult;
- int spi_mask;
+ int spi_mask;
+ u2_fxpt_freq_t freq_offset;
};
struct db_rfx_dummy {
@@ -162,7 +163,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_RX_DB,
- .common.freq_mult = 2
+ .common.freq_mult = 2,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(0)
};
@@ -193,7 +195,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_TX_DB,
- .common.freq_mult = 2
+ .common.freq_mult = 2,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(12.5e6)
};
struct db_rfx_900_rx db_rfx_900_rx = {
@@ -223,7 +226,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_RX_DB,
- .common.freq_mult = 2
+ .common.freq_mult = 2,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(0)
};
@@ -254,7 +258,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_TX_DB,
- .common.freq_mult = 2
+ .common.freq_mult = 2,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(12.5e6)
};
struct db_rfx_1200_rx db_rfx_1200_rx = {
@@ -284,7 +289,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_RX_DB,
- .common.freq_mult = 2
+ .common.freq_mult = 2,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(0)
};
@@ -315,7 +321,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_TX_DB,
- .common.freq_mult = 2
+ .common.freq_mult = 2,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(12.5e6)
};
struct db_rfx_1800_rx db_rfx_1800_rx = {
@@ -345,7 +352,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_RX_DB,
- .common.freq_mult = 1
+ .common.freq_mult = 1,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(0)
};
@@ -376,7 +384,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_TX_DB,
- .common.freq_mult = 1
+ .common.freq_mult = 1,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(12.5e6)
};
@@ -407,7 +416,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_RX_DB,
- .common.freq_mult = 1
+ .common.freq_mult = 1,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(0)
};
@@ -438,7 +448,8 @@
.common.CP1 = 7,
.common.CP2 = 7,
.common.spi_mask = SPI_SS_TX_DB,
- .common.freq_mult = 1
+ .common.freq_mult = 1,
+ .common.freq_offset = U2_DOUBLE_TO_FXPT_FREQ(12.5e6)
};
@@ -477,9 +488,7 @@
*dc = 0;
struct db_rfx_dummy *db = (struct db_rfx_dummy *) dbb;
- //u2_fxpt_freq_t desired_n = db->common.freq_mult*freq/phdet_freq;
- //int N_DIV = u2_fxpt_freq_round_to_int(desired_n);
- u2_fxpt_freq_t desired_n = ((1LL<<20) *
db->common.freq_mult*freq)/phdet_freq;
+ u2_fxpt_freq_t desired_n =
((1LL<<20)*db->common.freq_mult*(freq+db->common.freq_offset))/phdet_freq;
int N_DIV = u2_fxpt_freq_round_to_int(desired_n);
int B = N_DIV/PRESCALER;
int A = N_DIV - PRESCALER*B;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10125 - gnuradio/trunk/usrp2/firmware/lib,
matt <=