l-band lock optimizations

This commit is contained in:
rtlsdrblog 2023-08-24 01:02:16 +12:00
parent 2f87dd0130
commit d80421b537

View File

@ -458,7 +458,10 @@ static int r82xx_set_pll(struct r82xx_priv *priv, uint32_t freq)
return rc; return rc;
/* set VCO current = 100 */ /* set VCO current = 100 */
rc = r82xx_write_reg_mask(priv, 0x12, 0x80, 0xe0); /* rc = r82xx_write_reg_mask(priv, 0x12, 0x80, 0xe0); */
/* RTL-SDR Blog Modification: Set VCO current to MAX */
rc = r82xx_write_reg_mask(priv, 0x12, 0x06, 0xff);
if (rc < 0) if (rc < 0)
return rc; return rc;
@ -550,7 +553,9 @@ static int r82xx_set_pll(struct r82xx_priv *priv, uint32_t freq)
if (!i) { if (!i) {
/* Didn't lock. Increase VCO current */ /* Didn't lock. Increase VCO current */
rc = r82xx_write_reg_mask(priv, 0x12, 0x60, 0xe0); /* rc = r82xx_write_reg_mask(priv, 0x12, 0x60, 0xe0); */
/* RTL-SDR Blog Hack: Set max current */
rc = r82xx_write_reg_mask(priv, 0x12, 0x06, 0xff);
if (rc < 0) if (rc < 0)
return rc; return rc;
} }
@ -673,6 +678,10 @@ static int r82xx_sysfreq_sel(struct r82xx_priv *priv, uint32_t freq,
rc = r82xx_write_reg_mask(priv, 0x11, cp_cur, 0x38); rc = r82xx_write_reg_mask(priv, 0x11, cp_cur, 0x38);
if (rc < 0) if (rc < 0)
return rc; return rc;
/* RTL-SDR Blog Hack. Improve L-band performance by setting PLL drop out to 2.0v */
div_buf_cur = 0xa0;
rc = r82xx_write_reg_mask(priv, 0x17, div_buf_cur, 0x30); rc = r82xx_write_reg_mask(priv, 0x17, div_buf_cur, 0x30);
if (rc < 0) if (rc < 0)
return rc; return rc;