AD9375 + ZC706 manual gain control

Hi,

I am using AD9375 + ZC706 with Matlab 2019b on Windows.

I was able to transmit and receive signals with the attached files (I had to make minor changes to the ORx.m file and to the ad9371.m file).

I am trying to change the observation receiver to work with 'manual' gain control instead of 'automatic' gain control and I am getting the following error:

"Error using matlabshared.libiio.base/cstatus

Attribute harswaregain return value -190, expected 10"

1) Any suggestions about how to fix this?

2) Is it because I am using AD9375 and not AD9371 (I am using the AD9371 files provided by Bogdan)?

2) How do I set the target power for automatic gain control?

Thanks,

Yaniv

8308.zip

Top Replies

Parents
  • 0
    •  Analog Employees 
    on Mar 6, 2020 9:42 PM 8 months ago
    Attribute harswaregain return value -190, expected 10"

    This a paste error? There is no such attribute harswaregain.

    None of your code sets manual gain control mode. When do you get this error?

    -Travis

  • Hi Travis,

    Sorry for the paste error. The correct error is:

    "Error using matlabshared.libiio.base/cstatus

    Attribute hardwaregain return value -190, expected 10"

    I did not include the changes in the ORx.m file that I sent. See below the changes I made.

    I get the error when I call to: [out, valid] = rx();

    Thanks,

    Yaniv

    properties
    %GainControlMode Gain Control Mode
    % specified as one of the following:
    % 'automatic' For signals with changing power levels
    % 'manual' For setting the gain manually with the Gain property
    % 'hybrid' For configuring hybrid AGC mode
    GainControlMode = 'manual';
    %Gain Gain
    % Rx gain, specified as a scalar from 0 dB to 52 dB. The acceptable
    % minimum and maximum gain setting depends on the center
    % frequency.
    Gain = 10;
    end

    properties
    %RFPortSelect RF Port Select
    % 'OFF' - SnRx path is disabled
    % 'ORX1_TX_LO' SnRx operates in observation mode on ORx1 with
    % Tx LO synthesizer
    % 'ORX2_TX_LO' SnRx operates in observation mode on ORx2 with
    % Tx LO synthesizer
    % 'INTERNALCALS' enables scheduled Tx calibrations while using
    % SnRx path. The enableTrackingCals function needs to be called
    % in RADIO_OFF state. It sets the calibration mask, which the
    % scheduler will later use to schedule the desired calibrations.
    % This command is issued in RADIO_OFF. Once the AD9371 moves to
    % RADIO_ON state, the internal scheduler will use the enabled
    % calibration mask to schedule calibrations whenever possible,
    % based on the state of the transceiver. The Tx calibrations
    % will not be scheduled until INTERNALCALS is selected and the
    % Tx calibrations are enabled in the cal mask.
    % 'OBS_SNIFFER' SnRx operates in sniffer mode with latest
    % selected Sniffer Input for hardware pin control operation.
    % In pin mode, the GPIO pins designated for ORX_MODE would
    % select SNIFFER mode. Then MYKONOS_setSnifferChannel function
    % would choose the channel.
    % 'ORX1_SN_LO' SnRx operates in observation mode on ORx1 with
    % SNIFFER LO synthesizer
    % 'ORX2_SN_LO' SnRx operates in observation mode on ORx2 with
    % SNIFFER LO synthesizer
    % 'SN_A' SnRx operates in sniffer mode on SnRxA with SNIFFER
    % LO synthesizer
    % 'SN_B' SnRx operates in sniffer mode on SnRxB with SNIFFER
    % LO synthesizer
    % 'SN_C' SnRx operates in sniffer mode on SnRxC with SNIFFER
    % LO synthesizer
    RFPortSelect = 'ORX1_TX_LO';
    end

Reply
  • Hi Travis,

    Sorry for the paste error. The correct error is:

    "Error using matlabshared.libiio.base/cstatus

    Attribute hardwaregain return value -190, expected 10"

    I did not include the changes in the ORx.m file that I sent. See below the changes I made.

    I get the error when I call to: [out, valid] = rx();

    Thanks,

    Yaniv

    properties
    %GainControlMode Gain Control Mode
    % specified as one of the following:
    % 'automatic' For signals with changing power levels
    % 'manual' For setting the gain manually with the Gain property
    % 'hybrid' For configuring hybrid AGC mode
    GainControlMode = 'manual';
    %Gain Gain
    % Rx gain, specified as a scalar from 0 dB to 52 dB. The acceptable
    % minimum and maximum gain setting depends on the center
    % frequency.
    Gain = 10;
    end

    properties
    %RFPortSelect RF Port Select
    % 'OFF' - SnRx path is disabled
    % 'ORX1_TX_LO' SnRx operates in observation mode on ORx1 with
    % Tx LO synthesizer
    % 'ORX2_TX_LO' SnRx operates in observation mode on ORx2 with
    % Tx LO synthesizer
    % 'INTERNALCALS' enables scheduled Tx calibrations while using
    % SnRx path. The enableTrackingCals function needs to be called
    % in RADIO_OFF state. It sets the calibration mask, which the
    % scheduler will later use to schedule the desired calibrations.
    % This command is issued in RADIO_OFF. Once the AD9371 moves to
    % RADIO_ON state, the internal scheduler will use the enabled
    % calibration mask to schedule calibrations whenever possible,
    % based on the state of the transceiver. The Tx calibrations
    % will not be scheduled until INTERNALCALS is selected and the
    % Tx calibrations are enabled in the cal mask.
    % 'OBS_SNIFFER' SnRx operates in sniffer mode with latest
    % selected Sniffer Input for hardware pin control operation.
    % In pin mode, the GPIO pins designated for ORX_MODE would
    % select SNIFFER mode. Then MYKONOS_setSnifferChannel function
    % would choose the channel.
    % 'ORX1_SN_LO' SnRx operates in observation mode on ORx1 with
    % SNIFFER LO synthesizer
    % 'ORX2_SN_LO' SnRx operates in observation mode on ORx2 with
    % SNIFFER LO synthesizer
    % 'SN_A' SnRx operates in sniffer mode on SnRxA with SNIFFER
    % LO synthesizer
    % 'SN_B' SnRx operates in sniffer mode on SnRxB with SNIFFER
    % LO synthesizer
    % 'SN_C' SnRx operates in sniffer mode on SnRxC with SNIFFER
    % LO synthesizer
    RFPortSelect = 'ORX1_TX_LO';
    end

Children