Skip to content
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

Lo -Sharing in thor #47

Open
jswoboda opened this issue Feb 7, 2023 · 1 comment
Open

Lo -Sharing in thor #47

jswoboda opened this issue Feb 7, 2023 · 1 comment

Comments

@jswoboda
Copy link
Member

jswoboda commented Feb 7, 2023

LO sharing doesn't seem to be working as expected with thor.py. A work around was found in some old GNURadio code to do the sharing and phase alignment properly. I wanted to get this documented before it's forgotten so we can get it into thor if need be. Basically when setting the SDR center frequency the following function should be used instead.

def set_center_freq(self, center_freq, sources):
	# Tune all channels to the desired frequency
        tune_resp = self.uhd_usrp_source_0.set_center_freq(center_freq, 0)
        tune_req = uhd.tune_request(rf_freq=center_freq, rf_freq_policy=uhd.tune_request.POLICY_MANUAL, 
               dsp_freq=tune_resp.actual_dsp_freq, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)

        self.uhd_usrp_source_0.set_center_freq(tune_req, 1)
        if sources==4:
            self.uhd_usrp_source_0.set_center_freq(tune_req, 2)
            self.uhd_usrp_source_0.set_center_freq(tune_req, 3)

	# Synchronize the tuned channels
        now = self.uhd_usrp_source_0.get_time_now()
        self.uhd_usrp_source_0.set_command_time(now + uhd.time_spec(0.01))

        self.uhd_usrp_source_0.set_center_freq(tune_req, 0)
        self.uhd_usrp_source_0.set_center_freq(tune_req, 1)
        if sources==4:
            self.uhd_usrp_source_0.set_center_freq(tune_req, 2)
            self.uhd_usrp_source_0.set_center_freq(tune_req, 3)

        self.uhd_usrp_source_0.clear_command_time()
@jswoboda
Copy link
Member Author

jswoboda commented Feb 7, 2023

Another issue associated with this is that thor will cause the radio to hang and require a restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant