Hi all,

In src/tuner_r82xx.c of the rtl-sdr project, I see the following code:

    uint8_t vco_power_ref = 2;
    ...
    if (priv->cfg->rafael_chip == CHIP_R828D)
        vco_power_ref = 1;

    vco_fine_tune = (data[4] & 0x30) >> 4;

    if (vco_fine_tune > vco_power_ref)
        div_num = div_num - 1;
    else if (vco_fine_tune < vco_power_ref)
        div_num = div_num + 1;
    ...


It seems that vco_power_ref is derived from the chip type, and used to
determine the VCO's division.

However, when I use an R820T2 with a 16MHz crystal, I have to manually
set vco_power_ref = 1 to get it working normally. This confuses me.

Could someone explain the mechanism of the PLL setting? And why is
vco_power_ref determined solely by the chip type in the original code?

Thank you.

Wang Rz

Reply via email to