AD9361 RF BW change only for Rx

My customer use No-OS software for AD9361 in their system and want to change Rx RF filter BW independently in normal operation. But the setting for the filters of the both Rx and Tx are changed in the source code of  the command 'ad9361_update_rf_bandwidth()'. So they modified it as the attached file. Would you check their modification? They have a concern about commenting out the command 'ad9361_ensm_force_state()'. So would you let me know if there is any problem on this commenting out?

int32_t ad9361_update_rf_bandwidth_rx(struct ad9361_rf_phy *phy,
    uint32_t rf_rx_bw, uint32_t rf_tx_bw)
    uint32_t bbpll_freq;
    uint32_t real_rx_bandwidth = rf_rx_bw / 2;
    int32_t ret;

    bbpll_freq = clk_get_rate(phy, phy->ref_clk_scale[BBPLL_CLK]);
    ret = ad9361_tracking_control(phy, false, false, false);
    if (ret < 0)
        return ret;

//  ad9361_ensm_force_state(phy, ENSM_STATE_ALERT);

    ret = ad9361_rx_bb_analog_filter_calib(phy,
    if (ret < 0)
        return ret;

    ret = ad9361_rx_tia_calib(phy, real_rx_bandwidth);
    if (ret < 0)
        return ret;

    ret = ad9361_rx_adc_setup(phy,
        clk_get_rate(phy, phy->ref_clk_scale[ADC_CLK]));
    if (ret < 0)
        return ret;

    phy->current_rx_bw_Hz = rf_rx_bw;

    ret = ad9361_tracking_control(phy, phy->bbdc_track_en,
        phy->rfdc_track_en, phy->quad_track_en);
    if (ret < 0)
        return ret;

//  ad9361_ensm_restore_prev_state(phy);

    return 0;

Parents Reply
  • 0
    •  Analog Employees 
    on Feb 8, 2019 2:00 AM over 1 year ago in reply to mhennerich

    As I mentioned in my previous post, the customer want to change Rx RF filter setting during transmitting the signal. However the conde of ad9361_set_rx_rf_bandwidth() use ad9361_update_rf_bandwidth(). In ad9361_update_rf_bandwidth(), settings for Rx and Tx can't be changed independent for each. This is why the customer modified the code and ask us to verify it.  
    If ADI can provide ad9361_set_rx_rf_bandwidth() setting Rx filter independently with Tx, That is what the customer expect.