wiki:HardwareUsersGuides/WARPv3/RF

Version 1 (modified by murphpo, 8 years ago) (diff)

--

WARP v3 User Guide: RF Interfaces

Tx DCO Calibration

Each analog Tx I/Q path on WARP v3 may have small DC offset. This is caused by normal variations in component values and inherent offsets in the analog and RF ICs. It is important this DC offset is removed to avoid carrier leakage (LO leakage) in transmitted RF waveforms.

Applying Tx DCO Calibration

Every node is calibrated during manufacturing, with the calibration values stored in the board's EEPROM. You should read and apply these calibration values in every custom design which uses the RF interfaces.

The Tx DCO calibration values are stored at dedicated bytes in the EEPROM. See the EEPROM page? for details.

The WARP v3 design uses auxiliary DACs in the AD9963 to apply small DC offsets to the differential I/Q DAC outputs. The auxiliary DACs are configured via SPI. The ad_controller? driver provides functions for writing the DAC values from user code.

User designs should read Tx DCO calibration values from the EEPROM and update the AD9963 auxiliary DACs on every boot. Reference code implementing this process is included below. This function is provided by the radio_controller driver.

int radioController_apply_TxDCO_calibration(u32 ad_controller_baseaddr, u32 iic_master_baseaddr, u32 rfSel) {
    u16 rI, rQ;

    //For each radio interface specified by rfSel:
    // -Read the I/Q TxDCO calibration values from the EEPROM (two u16 values)
    // -Apply the TxDCO calibration values via the ad_controller driver
    //The RC_EEPROM_TXDCO_ADDR_RFx_x macros are defined in radio_controller.h
    if(rfSel & RC_RFA) {
        rI = IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFA_I) + (IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFA_I+1)<<8);
        rQ = IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFA_Q) + (IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFA_Q+1)<<8);
    
        ad_set_TxDCO(ad_ba, RFA_AD_CS, AD_CHAN_I, rI);
        ad_set_TxDCO(ad_ba, RFA_AD_CS, AD_CHAN_Q, rQ);
    }
    if(rfSel & RC_RFB) {
        rI = IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFB_I) + (IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFB_I+1)<<8);
        rQ = IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFB_Q) + (IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFB_Q+1)<<8);
    
        ad_set_TxDCO(ad_ba, RFB_AD_CS, AD_CHAN_I, rI);
        ad_set_TxDCO(ad_ba, RFB_AD_CS, AD_CHAN_Q, rQ);
    }
    if(rfSel & RC_RFC) {
        rI = IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFC_I) + (IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFC_I+1)<<8);
        rQ = IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFC_Q) + (IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFC_Q+1)<<8);
    
        ad_set_TxDCO(ad_ba, AD3_CS, AD_CHAN_I, rI);
        ad_set_TxDCO(ad_ba, AD3_CS, AD_CHAN_Q, rQ);
    }
    if(rfSel & RC_RFD) {
        rI = IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFD_I) + (IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFD_I+1)<<8);
        rQ = IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFD_Q) + (IIC_EEPROM_ReadByte(iic_ba, RC_EEPROM_TXDCO_ADDR_RFD_Q+1)<<8);
    
        ad_set_TxDCO(ad_ba, AD4_CS, AD_CHAN_I, rI);
        ad_set_TxDCO(ad_ba, AD4_CS, AD_CHAN_Q, rQ);
    }
    
    return 0;

Updating Tx DCO Calibration

You may wish to occasionally re-run the Tx DCO calibration process to account for drift in component values with age. We provide a pre-built FPGA design which implements the Tx DCO calibration process. To use the design:

  1. Terminate the RF interface to be calibrated into a 50 ohm load. The SMA terminators included with the WARP v3 kit are good for this. Alternately you can connect the RF interface to a spectrum analyzer to observe the Tx DCO calibration results.
  2. Connect a micro USB cable to the USB-UART interface, and connect a terminal emulator to the virtual serial port with baud rate 57600bps
  3. Download warpv3_txdco_calibration.bit
  4. Configure the WARP v3 node using warpv3_txdco_calibration.bit
  5. A menu will be printed to the UART; press 1 or 2 to calibrate RF A or RF B
  6. The calibration process is automatic and executes in <1 minute
  7. When complete, the new calibration values will be recorded to the EEPROM
  8. The RF interface will now transmit a pure sinusoid at 8MHz above the center frequency of 2452MHz. You should observe a very low power tone at the center frequency, resulting from any residual Tx DCO. You can use the keyboard to further adjust the Tx DCO to check if the auto-calibration routine choose sub-optimal values. If you find values which show less energy at the center frequency, you can re-write the EEPROM by pressing r.

Repeat this process for the other RF interface if desired. Always ensure the SMA connector of the active interface is terminated into 50 ohms before running the calibration routine.