Commit 7b3e4f91 authored by kaltenbe's avatar kaltenbe

small modifications in lms_lib.cpp

added configuration file for lowband of SoDeRa
parent ebdfb4f0
......@@ -88,7 +88,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX );
fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED );
fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color
fl_set_xyplot_ybounds(fdui->rxsig_t,30,70);
fl_set_xyplot_ybounds(fdui->rxsig_t,10,70);
// Time-domain channel response
fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "Channel Impulse Response (samples, abs)" );
......@@ -396,7 +396,7 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void )
fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX );
fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED );
fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color
fl_set_xyplot_ybounds(fdui->rxsig_t,30,70);
fl_set_xyplot_ybounds(fdui->rxsig_t,10,70);
// Time-domain channel response
fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "Channel Impulse Response (samples, abs)" );
......
......@@ -571,6 +571,24 @@ void calibrate_rf(openair0_device *device) {
}
*/
int trx_lms_set_gains(openair0_device* device, openair0_config_t *openair0_cfg) {
double gv = openair0_cfg[0].rx_gain[0] - openair0_cfg[0].rx_gain_offset[0];
if (gv > 31) {
printf("RX Gain 0 too high, reduce by %f dB\n",gv-31);
gv = 31;
}
if (gv < 0) {
printf("RX Gain 0 too low, increase by %f dB\n",-gv);
gv = 0;
}
printf("[LMS] Setting 7002M G_PGA_RBB to %d\n", (int16_t)gv);
lms7->Modify_SPI_Reg_bits(LMS7param(G_PGA_RBB),(int16_t)gv);
return(0);
}
int trx_lms_start(openair0_device *device){
......@@ -637,7 +655,14 @@ int trx_lms_start(openair0_device *device){
opStatus = lms7->TuneRxFilter(LMS7002M::RxFilter::RX_LPF_LOWBAND,5.0);
if (opStatus != LIBLMS7_SUCCESS) {
printf("Warning: Could not tune TX filter\n");
printf("Warning: Could not tune RX filter\n");
}
printf("Tuning TIA filter\n");
opStatus = lms7->TuneRxFilter(LMS7002M::RxFilter::RX_TIA,7.0);
if (opStatus != LIBLMS7_SUCCESS) {
printf("Warning: Could not tune RX TIA filter\n");
}
opStatus = lms7->SetInterfaceFrequency(lms7->GetFrequencyCGEN_MHz(),
......@@ -683,6 +708,7 @@ int trx_lms_start(openair0_device *device){
printf("Set RX frequency %f MHz\n",device->openair0_cfg[0].rx_freq[0]/1e6);
}
trx_lms_set_gains(device, device->openair0_cfg);
// Run calibration procedure
// calibrate_rf(device);
//lms7->CalibrateTx(5.0);
......@@ -743,31 +769,14 @@ rx_gain_calib_table_t calib_table_sodera[] = {
{3500000000.0,70.0},
{2660000000.0,80.0},
{2300000000.0,80.0},
{1880000000.0,80.0},
{816000000.0,80.0},
{1880000000.0,74.0}, // on W PAD
{816000000.0,76.0}, // on W PAD
{-1,0}};
int trx_lms_set_gains(openair0_device* device, openair0_config_t *openair0_cfg) {
double gv = openair0_cfg[0].rx_gain[0] - openair0_cfg[0].rx_gain_offset[0];
if (gv > 31) {
printf("RX Gain 0 too high, reduce by %f dB\n",gv-31);
gv = 31;
}
if (gv < 0) {
printf("RX Gain 0 too low, increase by %f dB\n",-gv);
gv = 0;
}
printf("[LMS] Setting 7002M G_PGA_RBB to %d\n", (int16_t)gv);
lms7->Modify_SPI_Reg_bits(LMS7param(G_PGA_RBB),(int16_t)gv);
return(0);
}
int trx_lms_get_stats(openair0_device* device) {
......
This diff is collapsed.
......@@ -28,8 +28,8 @@ version=1
0x0454=0x0000
0x0446=0x0000
0x04CA=0x0000
0x0444=0x02B1
0x0443=0xCCCD
0x0444=0x0000
0x0443=0x0000
0x0508=0xEF99
0x0441=0x0000
0x040D=0x0000
......@@ -42,7 +42,7 @@ version=1
0x0404=0x0000
0x00A0=0x6565
0x0560=0x174B
0x0403=0x0000
0x0403=0x009C
0x0402=0x07FF
0x055E=0xDB10
0x03A7=0x0000
......@@ -92,7 +92,7 @@ version=1
0x038A=0x0000
0x035E=0x0000
0x035D=0x0000
0x0442=0x0CCC
0x0442=0x0000
0x0449=0x0000
0x035A=0x0000
0x02C8=0x0000
......@@ -109,7 +109,7 @@ version=1
0x035C=0x0000
0x034D=0x0000
0x034B=0x0000
0x011A=0x2E02
0x011A=0x2E03
0x0455=0x0000
0x034A=0x0000
0x0348=0x0000
......@@ -130,7 +130,7 @@ version=1
0x059B=0x0000
0x0321=0x0000
0x045E=0x0000
0x0440=0x0020
0x0440=0x0024
0x031D=0x0000
0x0363=0x0000
0x031A=0x0000
......@@ -148,7 +148,7 @@ version=1
0x0360=0x0000
0x0313=0x0000
0x0461=0x0000
0x010A=0x104C
0x010A=0x184C
0x051B=0xB77F
0x0312=0x0000
0x0346=0x0000
......@@ -188,27 +188,27 @@ version=1
0x0102=0x3180
0x020C=0x8000
0x05A2=0x0000
0x040A=0x0003
0x040A=0x1000
0x0556=0xA2B5
0x0243=0x0000
0x051D=0x4F91
0x0259=0x0000
0x02D5=0x0000
0x02E1=0x0000
0x011D=0xB555
0x011D=0xFEEE
0x039E=0x0000
0x0252=0x0000
0x0204=0x0000
0x0204=0xFFAD
0x0255=0x0000
0x0281=0x0000
0x0200=0x0081
0x0200=0x0301
0x0594=0xF40D
0x02C5=0x0000
0x0406=0x0000
0x030F=0x0000
0x025D=0x0000
0x0319=0x0000
0x0121=0x323C
0x0121=0x313C
0x0101=0x7800
0x025B=0x0000
0x02C6=0x0000
......@@ -222,7 +222,7 @@ version=1
0x029C=0x0000
0x028D=0x0000
0x02A1=0x0000
0x008B=0x21A6
0x008B=0x278A
0x02A3=0x0000
0x05A4=0x0000
0x02A7=0x0000
......@@ -249,7 +249,7 @@ version=1
0x0488=0x0000
0x0496=0x0000
0x04C3=0x0000
0x0100=0x7409
0x0100=0xB409
0x04CC=0x0000
0x02A5=0x0000
0x0257=0x0000
......@@ -258,7 +258,7 @@ version=1
0x049A=0x0000
0x049B=0x0000
0x0097=0x0000
0x011E=0x068E
0x011E=0x0663
0x0285=0x0000
0x0280=0x0000
0x049E=0x0000
......@@ -346,7 +346,7 @@ version=1
0x054C=0x7FFF
0x0582=0x150F
0x0585=0xDAA2
0x0109=0x61C1
0x0109=0x03C1
0x04A2=0x0000
0x0292=0x0000
0x059F=0x0000
......@@ -371,7 +371,7 @@ version=1
0x0399=0x0000
0x050B=0xF5EF
0x0507=0xFCFE
0x010D=0x015B
0x010D=0x01DC
0x04C4=0x0000
0x0495=0x0000
0x0246=0x0000
......@@ -380,7 +380,7 @@ version=1
0x0323=0x0000
0x02E5=0x0000
0x055B=0x57AC
0x0114=0x008D
0x0114=0x0170
0x04D8=0x0000
0x04E7=0x0000
0x04D0=0x0000
......@@ -413,25 +413,25 @@ version=1
0x04A7=0x0000
0x0489=0x0000
0x02E0=0x0000
0x0118=0x018C
0x0118=0x218C
0x002A=0x0086
0x0245=0x0000
0x045D=0x0000
0x0581=0xC89D
0x02D2=0x0000
0x039C=0x0000
0x002B=0x0038
0x002B=0x4032
0x02A0=0x0000
0x010E=0x0000
0x010E=0x070C
0x0394=0x0000
0x0459=0x0000
0x0088=0x0550
0x0088=0x0530
0x0085=0x0001
0x0089=0x1150
0x0089=0x00A0
0x0256=0x0000
0x0111=0x0083
0x0111=0x0099
0x0095=0x0000
0x0203=0x0000
0x0203=0x2F6C
0x030E=0x0000
0x0482=0x0000
0x05A0=0x0000
......@@ -450,7 +450,7 @@ version=1
0x0391=0x0000
0x04CB=0x0000
0x010F=0x3042
0x0119=0x18CB
0x0119=0x529F
0x02A6=0x0000
0x05A1=0x0000
0x02C9=0x0000
......@@ -463,7 +463,7 @@ version=1
0x0247=0x0000
0x0512=0x196B
0x04E5=0x0000
0x0024=0xE4E4
0x0024=0x50D8
0x0353=0x0000
0x050D=0x0F45
0x02CD=0x0000
......@@ -472,9 +472,9 @@ version=1
0x034C=0x0000
0x00AA=0x0000
0x0350=0x0000
0x0445=0xDA02
0x0445=0x0000
0x048F=0x0000
0x008A=0x0514
0x008A=0x0491
0x0453=0x0000
0x0260=0x0000
0x00A1=0x6565
......@@ -484,17 +484,17 @@ version=1
0x038F=0x0000
0x054A=0x8184
0x00A4=0x6565
0x0401=0x07FF
0x0401=0x07ED
0x04CD=0x0000
0x0249=0x0000
0x002C=0x0000
0x002C=0x0100
0x054D=0xF7A3
0x00A6=0x0001
0x002D=0xFFFF
0x00AC=0x2000
0x0253=0x0000
0x028B=0x0000
0x040C=0x00FC
0x040C=0x40F8
0x0310=0x0000
0x0099=0x6565
0x00A2=0x6565
......@@ -534,13 +534,13 @@ version=1
0x0029=0x0101
0x024A=0x0000
0x00A7=0x6565
0x0027=0xB1E4
0x0117=0x280C
0x0027=0x05E4
0x0117=0x1939
0x0098=0x0000
0x0108=0x3042
0x0108=0xFC26
0x020B=0x0000
0x0383=0x0000
0x0202=0x07FF
0x0202=0x07F9
0x0086=0x4101
0x010C=0x8865
0x02D8=0x0000
......@@ -550,11 +550,11 @@ version=1
0x0104=0x0088
0x0357=0x0000
0x02DB=0x0000
0x0400=0x0081
0x0400=0x0101
0x009B=0x6565
0x0105=0x0007
0x05A3=0x0000
0x0240=0x0020
0x0240=0x0028
0x0367=0x0000
0x044F=0x0000
0x038B=0x0000
......@@ -571,7 +571,7 @@ version=1
0x0587=0x1D10
0x0023=0x5550
0x048C=0x0000
0x0112=0xC0E6
0x0112=0x20E5
0x039A=0x0000
0x0115=0x0009
0x00A9=0x8000
......@@ -715,7 +715,7 @@ version=1
0x038A=0x0000
0x0362=0x0000
0x0387=0x0000
0x0200=0x0101
0x0200=0x0081
0x0594=0x0000
0x02C5=0x0000
0x02A7=0x0000
......@@ -732,7 +732,7 @@ version=1
0x0295=0x0000
0x055A=0x0000
0x029C=0x0000
0x010E=0x2000
0x010E=0x2040
0x02A0=0x0000
0x010F=0x3042
0x02A6=0x0000
......@@ -765,7 +765,7 @@ version=1
0x0104=0x0088
0x0357=0x0000
0x02DB=0x0000
0x0400=0x0101
0x0400=0x0081
0x0209=0x0000
0x0297=0x0000
0x02DD=0x0000
......@@ -798,7 +798,7 @@ version=1
0x044A=0x0000
0x04A4=0x0000
0x04C4=0x0000
0x010D=0x019C
0x010D=0x009E
0x0300=0x0000
0x0587=0x0000
0x044E=0x0000
......@@ -834,7 +834,7 @@ version=1
0x055D=0x0000
0x0298=0x0000
0x055F=0x0000
0x011D=0x7555
0x011D=0x699D
0x039E=0x0000
0x0547=0x0000
0x0598=0x0000
......@@ -932,7 +932,7 @@ version=1
0x0110=0x0BF4
0x0204=0x0000
0x0252=0x0000
0x011E=0x06EC
0x011E=0x06B9
0x049B=0x0000
0x0294=0x0000
0x011C=0xAD41
......@@ -977,7 +977,7 @@ version=1
0x045B=0x0000
0x0100=0x3409
0x0340=0x0000
0x0208=0x0170
0x0208=0x0070
0x0111=0x0083
0x0247=0x0000
0x024B=0x0000
......@@ -997,14 +997,14 @@ version=1
0x010A=0x104C
0x0461=0x0000
0x051B=0x0000
0x0121=0x348C
0x0121=0x333C
0x0115=0x0009
0x0112=0xC0E6
0x039A=0x0000
0x02CC=0x0000
0x0116=0x8180
0x04A0=0x0000
0x0108=0x3042
0x0108=0x9442
0x020B=0x4000
0x0251=0x0000
0x0488=0x0000
......@@ -1027,7 +1027,7 @@ version=1
0x024E=0x0000
0x0253=0x0000
0x028B=0x0000
0x040C=0x00FC
0x040C=0x0000
0x0255=0x0000
0x0258=0x0000
0x0502=0x0000
......@@ -1045,7 +1045,7 @@ version=1
0x025C=0x0000
0x0355=0x0000
0x044C=0x0000
0x010C=0x8865
0x010C=0x88FD
0x0284=0x0000
0x0396=0x0000
0x0363=0x0000
......
......@@ -140,10 +140,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment