# HG changeset patch # User Mychaela Falconia # Date 1495863222 0 # Node ID 5018fd8eeccee8c9a2c8b2a80db57f82d5b19588 # Parent 8c7b0ba1e5c4a1aef86750b7a34cf6e6e1d56382 autocal: started Rx cal core code diff -r 8c7b0ba1e5c4 -r 5018fd8eecce autocal/Makefile --- a/autocal/Makefile Sat May 27 05:11:43 2017 +0000 +++ b/autocal/Makefile Sat May 27 05:33:42 2017 +0000 @@ -3,7 +3,8 @@ PROGS= fc-rfcal-gmagic fc-rfcal-vcxo INSTBIN=/opt/freecalypso/bin -GMAGIC_OBJS= gmagicmain.o l1tmops.o rvinterf.o sockopts.o tsidsock.o +GMAGIC_OBJS= gmagicmain.o l1tmops.o rvinterf.o rxcommon.o sockopts.o \ + tsidsock.o VCXO_OBJS= l1tmops.o rvinterf.o sockopts.o tsidsock.o vcxomain.o vcxomeas.o all: ${PROGS} diff -r 8c7b0ba1e5c4 -r 5018fd8eecce autocal/gmagicmain.c --- a/autocal/gmagicmain.c Sat May 27 05:11:43 2017 +0000 +++ b/autocal/gmagicmain.c Sat May 27 05:33:42 2017 +0000 @@ -8,6 +8,7 @@ #include #include #include +#include "rxcaldefs.h" #include "stdband.h" static struct band { @@ -73,6 +74,7 @@ printf("Putting the DUT into Test Mode\n"); do_tms(1); do_rfpw(STD_BAND_FLAG, selected_band->rfpw_std_band); + l1tm_setup_for_rxcal(); } diff -r 8c7b0ba1e5c4 -r 5018fd8eecce autocal/rxcaldefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autocal/rxcaldefs.h Sat May 27 05:33:42 2017 +0000 @@ -0,0 +1,4 @@ +/* some definitions for the Rx calibration process */ + +#define RXCAL_SIGGEN_LEVEL 149 /* -74.5 dBm */ +#define RXCAL_AGC_DB 34 diff -r 8c7b0ba1e5c4 -r 5018fd8eecce autocal/rxcommon.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autocal/rxcommon.c Sat May 27 05:33:42 2017 +0000 @@ -0,0 +1,21 @@ +/* + * This module contains the common code for + * fc-rfcal-gmagic and fc-rfcal-rxband. + */ + +#include +#include +#include +#include +#include +#include +#include "rxcaldefs.h" + +l1tm_setup_for_rxcal() +{ + do_rxpw(RX_AGC_ENA_FLAG, 0); + do_rxpw(RX_AGC_GAIN, RXCAL_AGC_DB); + do_rfpw(AFC_ENA_FLAG, 0); + /* scw settings to be added */ + return(0); +}