EasyManua.ls Logo

Lime Microsystems LMS7002MR3 - Page 123

Default Icon
123 pages
Print Icon
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
119
if(Band_id <= TBB_11_0MHZ) //If(“CalFreq”) <=11MHz, then CONTROL=RCAL_LPFLAD_TBB, else, CONTROL=RCAL_LPFH_TBB
{
low_band = 1; // CONTROL=RCAL_LPFLAD_TBB
Modify_SPI_Reg_bits (0x0109, 7, 0, CONTROL); // write to RCAL_LPFLAD_TBB
}
else
{
low_band = 0; // CONTROL=RCAL_LPFH_TBB
Modify_SPI_Reg_bits (0x0109, 15, 8, CONTROL); // write to RCAL_LPFH_TBB
}
if (Algorithm_B_TBB (&LowFreqAmp) != 1) return 0; // Calibrate and Record the low frequency output amplitude (Algorithm B)
Set_NCO_Freq (TBB_CalFreq[Band_id]); // Apply a single tone frequency at “CalFreq”.
while (1)
{
ADCOUT = Get_SPI_Reg_bits(0x040B, 15, 0); //RSSI value // Measure the value of the amplitude at the ADC input. This value should be lower
than “LowFreqAmp”.
if (ADCOUT >= LowFreqAmp) break; //If it is lower than “LowFreqAmp” repeat cycle
if (CONTROL == 0xFF) break;
CONTROL++; // Increase the CONTROL value by one.
if (low_band) Modify_SPI_Reg_bits (0x0109, 7, 0, CONTROL); // write to RCAL_LPFLAD_TBB
else Modify_SPI_Reg_bits (0x0109, 15, 8, CONTROL); // write to RCAL_LPFH_TBB
}
// 8 Return the value of CONTROL.
TBB_RBANK[MIMO_ch][Band_id] = CONTROL; // Store RBANK Values
return 1;
}

Table of Contents