Hi Emanuele, I have never tried to use set_time_now() with anything other than zero as the time setting. Of course, this does not mean that it is impossible. But, I am wondering if your application can work just as easily by always translating the time on the CPU rather than in the FPGA. That is, the FPGA time reference can be zero and the CPU time reference can be system-time and whenever you need a time from the FPGA you can apply the appropriate reference in the CPU.
It was not clear to me from your email if using a time setting of zero will solve the issue. It seemed that you still have a phase issue in this case? Rob On Wed, Nov 24, 2021 at 11:25 AM <[email protected]> wrote: > Hi Marcus, > > as I said in the previous post I tried to do a get_time_now() just before > the timed command, but without success. > > // Tune all channels to the desired frequency > > uhd::tune_result_t tune_resp = m_MultiUsrp->set_rx_freq(nRxFrequency,0); > > //set time on the master (mboard 0) > > struct timespec now; > > clock_gettime(CLOCK_REALTIME, &now); > > > m_MultiUsrp->set_time_now(uhd::time_spec_t(now.tv_sec,(double)now.tv_nsec/1.0e6)); > > uhd::time_spec_t usrp_time = m_MultiUsrp->get_time_now(); > > m_MultiUsrp->set_rx_gain(nGain, 1); > > m_MultiUsrp->set_rx_gain(nGain, 2); > > m_MultiUsrp->set_rx_gain(nGain, 3); > > uhd::tune_request_t tune_req; > > tune_req.rf_freq = tune_resp.actual_rf_freq; > > tune_req.rf_freq_policy = uhd::tune_request_t::POLICY_MANUAL; > > tune_req.dsp_freq = tune_resp.actual_dsp_freq; > > tune_req.dsp_freq_policy = uhd::tune_request_t::POLICY_MANUAL; > > m_MultiUsrp->set_rx_freq(tune_req, 1); > > m_MultiUsrp->set_rx_freq(tune_req, 2); > > m_MultiUsrp->set_rx_freq(tune_req, 3); > > usrp_time = m_MultiUsrp->get_time_now() ; > > // Synchronize the tuned channels > > m_MultiUsrp->set_command_time(usrp_time + uhd::time_spec_t(0.1)); > > m_MultiUsrp->set_rx_freq(tune_req, 0); > > m_MultiUsrp->set_rx_freq(tune_req, 1); > > m_MultiUsrp->set_rx_freq(tune_req, 2); > > m_MultiUsrp->set_rx_freq(tune_req, 3); > > m_MultiUsrp->clear_command_time(); > > Thank you. > _______________________________________________ > USRP-users mailing list -- [email protected] > To unsubscribe send an email to [email protected] >
_______________________________________________ USRP-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
