Direct sampling with XB-200 needs additional improvements
It's been reported that the direct sampling mode using the ADC with the XB-200 is not working well or even at all. This is just to collect all the information and assign someone to look at the issue.
@bpadalino - Ping! Mind sharing your notes and wishlist for this item and I'll look into it?
I can confirm that sampling of the spectrum is poor. Past 2 MHz almost no stations are readable using a decent input amplifier.
Below are @bpadalino's comments on this, should anyone beat me to experimenting with the following change(s):
Currently, the code looks at registers 0x09 and 0x64. The register 0x64 is disabling the module in general.
https://github.com/Nuand/bladeRF/blob/master/host/libraries/libbladeRF/src/lms.c#L2737
This shouldn't happen. Instead, check out register 0x67 and PD[3]. This will power down just the output buffers from that amplifier and not turn off the entire module leaving the VCM bias intact.
Reference the programming guide Figure 3.7:
http://www.limemicro.com/download/LMS6002Dr2-Programming_and_Calibration_Guide-1.1r1.pdf
I was experimenting with direct sampling I noticed interesting phenomenon: When "sampling=external" was passed through the device string, the signal from ADC was very weak. With 20dB amplifier between the antenna and ADC input I could only hear heavily distorted strong local MW station. However, when I removed the 'sampling' param, with antenna directly connected to the ADC input (without additional amplifier) and RF input to transverter terminated, the spectrum was full of strong signals from MW stations. Their location on the spectrum did not depend on frequency setting, and the amplitude of the signals did not depend on amplification settings, so they were not coming from the RF path. Looks like the bit controlling ADC input is flipped: enabled when RF path is active, and disabled when ADC should be selected.
I had a bit more fun today with direct sampling. This is the procedure for activation of the ADC input:
- Open the board with
sampling=external - Close the board
- Open the board without
samplingparameter. Opening withsampling=internaldisables the ADC input.
@piranha32, you're saying that after steps 1, 2, and the first half of 3, it seems to be working?
Just curious, what's your test input?
I already answered the question about signal source on IRC, but I'd like to leave comment here, to keep the record. Any source that provides signal strong enough for the RF path to receive, will be sufficient for reception through the ADC input. In my case it was few meters of wire with 20dB preamp.
It looks like there's a conflict is over the RXVGA2 enable. In particular, sampling mode and loopback both touch this enable.
I'll review which configurations do/don't make sense and have the API error out accordingly before allowing it to reach an invalid state.