-
-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R820t tuner fixes #10
base: master
Are you sure you want to change the base?
Conversation
…ion, not at kHz resolution. Also replace the manual divison loop with a simpler fixed-point calculation.
Before-and-after graphs for the changes. This data was generated by a modified version of kalibrate which accepts a manual tuning offset. For a fixed GSM signal you would expect that tuning 1Hz higher would move the measured signal 1Hz lower; anything different is tuner error or oscillator drift. You can see a little oscillator drift in these graphs, but most of it is clearly tuner error. |
I already posted to the osmocom list about this - the pull request is just a useful place to collect the changes |
+1 looks useful |
Bug Fix for some Broken MinGW PThreads sources
That ship sailed long ago; I have moved on to other projects. If you'd like to use this PR as a starting point for trying to get something merged upstream, that's fine. |
* see #91 * vcocmin/vcocmax: sets VCO current for R820T/2 * added tuner internal caching for VCO current, that register isn't written when unnecessary * added vcoalgo option: - vcoalgo=2 allows to select/use r82xx_set_pll() from https://github.com/rtlsdrblog/rtl-sdr.git - vcoalgo=1 is previous algorithm, just with higher vco_max=3.9GHz - vcoalgo=0 is previous algorithm - the default: kept this until steve-m#10 is measured * rtl_test: added options -f and -e to define where to start and end the tuner range test .. for quicker testing if the new options change/extend the tuner's frequency range Signed-off-by: hayati ayguen <[email protected]>
These changes improve the R820T tuner code to calculate the VCO/PLL parameters more precisely. The old code rounded the reference frequency to the nearest kHz and did some slightly dodgy hand-rolled long division.
These changes empirically reduce the tuning error from approx +/- 750Hz to approx +/- 200Hz.
This is good enough to also fix some odd behaviour with applying frequency corrections, where for some PPM + frequency combinations, changing PPM by +/-1 would have no effect because the underlying tuner imprecision mapped both frequencies to the same PLL settings.
Tested on a generic RTL2832U with R820T tuner only.