How to power down Tx output frequency on AD9375 transciever?

Hi everyone,

I 'm using AD9375 with zcu102 run standalone use mykonos library.

I have read AD9371-9375-User-Guide-UG-992.pdf, and I see It have API:

MYKONOS_radioOff(…). This function instructs the
ARM processor to move the radio state to the off state.
When the ARM moves from the radio on state to the radio
off (idle) state, the ARM tracking calibrations are stopped,
and the Tx enable, Rx enable, and GPIO control pins
(among others) are ignored. This stoppage also keeps the
receive and transmit chains powered down until the
MYKONOS_radioOn() function is called again

Now. I only want to power down Tx output Frequency, not both Tx and Rx output.

How to solve this problem, What does API need to use?

Thanks and Brgs.

Parents Reply
  • 0
    •  Analog Employees 
    on Oct 24, 2019 10:17 AM in reply to sonminh

    There are two ways to control TX /RX disable. In ARM mode, the ARM enables all signals paths (Tx/Rx) defined in the data structure provided during the initialization(the above posted structure has to be set during initialization for disabling the tx channels) of the device upon entering the radio on state. 

    You can also disable or enable the paths usingTXx_ENABLE and RXx_ENABLE pins in pin control mode(you can set using the following API):

    MYKONOS_setRadioControlPinMode

Children
  • Hi ,

    Thanks for you help.

    I want to on/off multiple time output Tx1 in run time. I see API you suggest:

    /**
     * \brief Configures the Radio power up/down control for Rx and Tx paths to be controlled by pins
     *        (TX1/2_ENABLE, RX1/2_ENABLE, and GPIO pins) or an API function call.
     *
     * The BBP should not have to call this as it will automatically be setup at the end of the
     * MYKONOS_loadArmFromBinary() function call.  If the BBP wishes to change the radio power up/down
     * control method this function can be called again to change the configuration while
     * the ARM is in the radioOff state.
     *
     * <B>Dependencies</B>
     * - device->spiSettings->chipSelectIndex
     * - device->auxIo->armGpio->useRx2EnablePin
     * - device->auxIo->armGpio->useTx2EnablePin
     * - device->auxIo->armGpio->txRxPinMode
     * - device->auxIo->armGpio->orxPinMode
     *
     * \param device is a pointer to the device settings structure
     *
     * \retval MYKONOS_ERR_OK Function completed successfully
     * \retval MYKONOS_ERR_SET_RADIOCTRL_PINS_ARMERROR ARM returned an error and did not accept the command.
     */
    mykonosErr_t MYKONOS_setRadioControlPinMode(mykonosDevice_t *device)
    {
        uint8_t extData[4] = {0x81, 0, 0, 4}; /*Object ID 0x81 (radio control structure), offset lsb, offset msb, length*/
        uint8_t armRadioControlStruct[4] = {0};
        uint32_t timeoutMs = 0;
        uint8_t cmdStatusByte = 0;
        mykonosErr_t retval = MYKONOS_ERR_OK;

    #if MYKONOS_VERBOSE == 1
        CMB_writeToLog(ADIHAL_LOG_MESSAGE, device->spiSettings->chipSelectIndex, MYKONOS_ERR_OK, "MYKONOS_setRadioControlPinMode()\n");
    #endif

        /* write ARM radio control structure to enable pin mode/command mode */
        if (device->auxIo->armGpio->useRx2EnablePin > 0)
        {
            armRadioControlStruct[0] = 0x01;
        }

        if (device->auxIo->armGpio->useTx2EnablePin > 0)
        {
            armRadioControlStruct[1] = 0x01;
        }

        if (device->auxIo->armGpio->txRxPinMode > 0)
        {
            armRadioControlStruct[2] = 0x01;
        }

        if (device->auxIo->armGpio->orxPinMode > 0)
        {
            armRadioControlStruct[3] = 0x01;
        }

        retval = MYKONOS_writeArmMem(device, MYKONOS_ADDR_ARM_START_DATA_ADDR, &armRadioControlStruct[0], sizeof(armRadioControlStruct));
        if (retval != MYKONOS_ERR_OK)
        {
            return retval;
        }

        retval = MYKONOS_sendArmCommand(device, MYKONOS_ARM_WRITECFG_OPCODE, &extData[0], sizeof(extData));
        if (retval != MYKONOS_ERR_OK)
        {
            return retval;
        }

        timeoutMs = 1000;
        retval = MYKONOS_waitArmCmdStatus(device, MYKONOS_ARM_WRITECFG_OPCODE, timeoutMs, &cmdStatusByte);
        if (retval != MYKONOS_ERR_OK)
        {
            return retval;
        }

        if (cmdStatusByte > 0)
        {
            CMB_writeToLog(ADIHAL_LOG_ERROR, device->spiSettings->chipSelectIndex,  MYKONOS_ERR_SET_RADIOCTRL_PINS_ARMERROR,
                    getMykonosErrorMessage(MYKONOS_ERR_SET_RADIOCTRL_PINS_ARMERROR));
            return MYKONOS_ERR_SET_RADIOCTRL_PINS_ARMERROR;
        }

        return MYKONOS_ERR_OK;
    }

    I only see useRx2EnablePin or useTx2EnablePin without TX1/RX1ENABLE. where configuration of TX1?

  • 0
    •  Analog Employees 
    on Oct 24, 2019 10:51 AM in reply to sonminh

    Refer to the above snapshot from UG