[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9860 - in gnuradio/trunk/usrp2/firmware: apps lib
From: |
eb |
Subject: |
[Commit-gnuradio] r9860 - in gnuradio/trunk/usrp2/firmware: apps lib |
Date: |
Sun, 26 Oct 2008 17:50:52 -0600 (MDT) |
Author: eb
Date: 2008-10-26 17:50:51 -0600 (Sun, 26 Oct 2008)
New Revision: 9860
Modified:
gnuradio/trunk/usrp2/firmware/apps/app_common_v2.c
gnuradio/trunk/usrp2/firmware/lib/db_init.c
gnuradio/trunk/usrp2/firmware/lib/db_rfx.c
gnuradio/trunk/usrp2/firmware/lib/db_tvrx.c
Log:
Deadly printfs turned off... Specified gain ranges for TV Rx and RFX boards.
Still a problem setting the gain; Firmware takes too long to get back
to service ethernet.
Modified: gnuradio/trunk/usrp2/firmware/apps/app_common_v2.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/apps/app_common_v2.c 2008-10-26 20:41:23 UTC
(rev 9859)
+++ gnuradio/trunk/usrp2/firmware/apps/app_common_v2.c 2008-10-26 23:50:51 UTC
(rev 9860)
@@ -506,10 +506,12 @@
print_tune_result(char *msg, bool tune_ok,
u2_fxpt_freq_t target_freq, struct tune_result *r)
{
+#if 0
printf("db_tune %s %s\n", msg, tune_ok ? "true" : "false");
putstr(" target_freq "); print_fxpt_freq(target_freq); newline();
putstr(" baseband_freq "); print_fxpt_freq(r->baseband_freq); newline();
putstr(" dxc_freq "); print_fxpt_freq(r->dxc_freq); newline();
putstr(" residual_freq "); print_fxpt_freq(r->residual_freq); newline();
printf(" inverted %s\n", r->inverted ? "true" : "false");
+#endif
}
Modified: gnuradio/trunk/usrp2/firmware/lib/db_init.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/db_init.c 2008-10-26 20:41:23 UTC (rev
9859)
+++ gnuradio/trunk/usrp2/firmware/lib/db_init.c 2008-10-26 23:50:51 UTC (rev
9860)
@@ -123,6 +123,10 @@
{
struct db_base *db;
int dbid = read_dboard_eeprom(i2c_addr);
+
+ // FIXME removing this printf has the system hang if there are two d'boards
+ // installed. (I think the problem is in i2c_read/write or the way
+ // I kludge the zero-byte write to set the read address in eeprom_read.)
printf("%s dbid: 0x%x\n", msg, dbid);
if (dbid < 0){ // there was some kind of problem. Treat as Basic Tx
@@ -250,7 +254,7 @@
rx_dboard->init(rx_dboard);
m = determine_rx_mux_value(rx_dboard);
dsp_rx_regs->rx_mux = m;
- printf("rx_mux = 0x%x\n", m);
+ //printf("rx_mux = 0x%x\n", m);
}
/*!
Modified: gnuradio/trunk/usrp2/firmware/lib/db_rfx.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/db_rfx.c 2008-10-26 20:41:23 UTC (rev
9859)
+++ gnuradio/trunk/usrp2/firmware/lib/db_rfx.c 2008-10-26 23:50:51 UTC (rev
9860)
@@ -142,9 +142,9 @@
.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(400e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(500e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(45),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.022),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
@@ -203,9 +203,9 @@
.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(800e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(1000e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(70),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.034),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
@@ -264,9 +264,9 @@
.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(1150e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(1350e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(70),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.034),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
@@ -325,9 +325,9 @@
.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(1600e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(2000e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(70),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.034),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
@@ -387,9 +387,9 @@
.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(2300e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(2700e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(70),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.034),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
@@ -458,7 +458,6 @@
// test gain
dbb->set_gain(dbb,U2_DOUBLE_TO_FXPT_GAIN(45.0));
- printf("set the gain\n");
return true;
}
@@ -487,7 +486,7 @@
mdelay(10);
spi_transact(SPI_TXONLY,db->common.spi_mask,N,24,SPIF_PUSH_FALL);
- printf("A = %d, B = %d, N_DIV = %d\n",A, B, N_DIV);
+ //printf("A = %d, B = %d, N_DIV = %d\n",A, B, N_DIV);
*dc = (N_DIV * phdet_freq) / db->common.freq_mult;
return true;
}
@@ -509,7 +508,7 @@
int offset_q8 = (int)(1.2/3.3*4096*(1<<15));
int slope_q8 = (int)(-1.0/45.0*4096/3.3*256);
int dacword = ((slope_q8 * gain) + offset_q8)>>15;
- printf("DACWORD %d\n",dacword);
+ //printf("DACWORD %d\n",dacword);
lsdac_write_rx(1,dacword);
return true;
/*
Modified: gnuradio/trunk/usrp2/firmware/lib/db_tvrx.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/db_tvrx.c 2008-10-26 20:41:23 UTC (rev
9859)
+++ gnuradio/trunk/usrp2/firmware/lib/db_tvrx.c 2008-10-26 23:50:51 UTC (rev
9860)
@@ -83,9 +83,9 @@
.base.used_pins = 0x0000,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(50e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(860e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(95),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(1),
.base.is_quadrature = false,
.base.i_and_q_swapped = false,
.base.spectrum_inverted = false,
@@ -110,9 +110,9 @@
.base.used_pins = 0x0000,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(50e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(860e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(95),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(1),
.base.is_quadrature = false,
.base.i_and_q_swapped = false,
.base.spectrum_inverted = true,
@@ -137,9 +137,9 @@
.base.used_pins = 0x0000,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(50e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(860e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(95),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(1),
.base.is_quadrature = false,
.base.i_and_q_swapped = false,
.base.spectrum_inverted = true,
@@ -182,8 +182,10 @@
if(N_DIV > 32767)
return false;
- printf("N_DIV = %d, actual_freq = %d, actual_lo_freq = %d\n",
- N_DIV,
u2_fxpt_freq_round_to_int(actual_freq),u2_fxpt_freq_round_to_int(actual_freq));
+ if (0)
+ printf("N_DIV = %d, actual_freq = %d, actual_lo_freq = %d\n",
+ N_DIV, u2_fxpt_freq_round_to_int(actual_freq),
+ u2_fxpt_freq_round_to_int(actual_lo_freq));
unsigned char buf[4];
buf[0] = (N_DIV>>8) & 0xff;
@@ -227,7 +229,9 @@
lsdac_write_rx(0,rfdac);
lsdac_write_rx(1,ifdac);
- printf("Setting gain %d, rf %d, if %d\n",gain,rfdac,ifdac);
+ if (0)
+ printf("Setting gain %d, rf %d, if %d\n",gain,rfdac,ifdac);
+
return true;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9860 - in gnuradio/trunk/usrp2/firmware: apps lib,
eb <=