Post Go back to editing

Can AD9371 support RX ADC IQ swap by setting ADC/sample crossbar?

From JESD204B Framer API Data Structures of AD9371-User-Guide-UG-992.pdf, we only found "serializerLaneCrossbar" setting, no "ADC/SAMPLE crossbar setting. Could current AD9371 API support ADC/SAMPLE CROSSBAR swap setting?

  • You can refer following code snippet in API function MYKONOS_setupJesd204bFramer() in 'mykonos.c' to understand how to set ADC crossbar.

    #define MYKONOS_ADDR_FRAMER_ADC_XBAR_SEL                    0x061

    mykonosErr_t MYKONOS_setupJesd204bFramer(mykonosDevice_t *device)
    {

    :

    :

    :

        framerADC_XBar = 0xB1;
        if (ML == 24)
        {
            if (device->rx->rxChannels == RX1)
            {
                /* adc 0 and 2 used */
                framerADC_XBar = ((framerADC_XBar & 0x0C) << 2) | (framerADC_XBar & 0x03);
            }
            else if (device->rx->rxChannels == RX2)
            {
                /* swap ADC xbar for Rx1 and Rx2 */
                framerADC_XBar = ((framerADC_XBar & 0xF) << 4) | ((framerADC_XBar & 0xF0) >> 4);
                /* adc 0 and 2 used */
                framerADC_XBar = ((framerADC_XBar & 0x0C) << 2) | (framerADC_XBar & 0x03);
            }

            /* Framer: Set ADC Crossbar */
            CMB_SPIWriteByte(device->spiSettings, MYKONOS_ADDR_FRAMER_ADC_XBAR_SEL, framerADC_XBar);
        }
        else
        {
            /* Framer: Set ADC Crossbar */
            CMB_SPIWriteByte(device->spiSettings, MYKONOS_ADDR_FRAMER_ADC_XBAR_SEL, framerADC_XBar);
        }

    :

    :

    :

    }

    • Sorry, I don't know how to set MYKONOS_ADDR_FRAMER_TEST_CNTR_CTL by this code, who can tell me, thank you very much

  • thanks very much,I understand by reading the code