Nuand / bladeRF

bladeRF USB 3.0 Superspeed Software Defined Radio Source Code
http://nuand.com
Other
1.15k stars 459 forks source link

libbladeRF: LMS SELOUT[1:0] may be left in an invalid state upon exiting loopback mode #220

Closed jynik closed 10 years ago

jynik commented 10 years ago

Not yet confirmed - noticed this while working on a712304f02b49dd53c042ddbad715ae2ff434adb, jotting it down here as a reminder for further investigation.

If the device is tuned in a manner that changes between the high and low band, and then loopback mode is exited, the output PLL buffers (SELOUT[1:0]) may be left in an incorrect state. Specifically, SELOUT[1:0] will have the output buffer configured for the band we started in since we don't touch SELOUT[1:0] while in loopback, as this must remain set for LNA N in rf_lnaN loopback modes.

A potential workaround for libbladeRF users would be to make a call to bladerf_set_frequency() upon exiting loopback mode. This result in write_pll_config() being called in lms_set_frequency().

A potential solution might be to call lms_set_frequency() on our way out of loopback, but I still need to check if there are any other items that could be left in a potentially incorrect state.

jynik commented 10 years ago

Issue confirmed. Addressed in 93d180c9086f10cf68e5c658f041178cb01e4f86.