Hi Marino, a couple quick thoughts:
1. My previous message was based on legacy USRP architecture - I think with RFNoC radios, each block may have its own command queue. So the behavior may be different than mentioned in my earlier reply. 2. I think setting the command time to "lastPPS + span" is dubious. lastPPS could be approaching one second stale, and span is only adding one second of margin. There's a slim chance the requested command time is in the past when it hits the command FIFO in the radio. Since you already synchronized the clocks across devices, I would try using "now + span" instead. 3. After you call set_tx_frequency(), I think it is canonical to then call clear_command_time() so that subsequent commands in your application flow are not timed. I don't expect this will be a fix though, since subsequent commands would be considered "late" and executed immediately anyway. 4. If you need to wait for the retune to take effect before proceeding, and if you aren't retuning in a time-critical section of code, you might want to consider adding std::this_thread::sleep_for() at least equal to your span value. I don't believe the set_tx_frequency() call blocks, though I could be wrong if that behavior has changed under RFNoC.. Cheers, -David From: [email protected] <[email protected]> Sent: Monday, February 17, 2025 10:59 AM To: [email protected] Subject: [USRP-users] Re: Reading/Write registers - Timeout Hi David, At the start where we initialise our siggen block there this snippet of code: ________________________________ std::cout << "MB Clock Source: " << graph->get_mb_controller(0)->get_clock_source() << std::endl; std::cout << "MB Time Source: " << graph->get_mb_controller(0)->get_time_source() << std::endl; std::cout << "MB Sync Source: " << graph->get_mb_controller(0)->get_sync_source().to_pp_string() << std::endl; std::cout << "MB Ref lock status: " << graph->get_mb_controller(0)->get_sensor("ref_locked").to_pp_string() << std::endl; std::cout << graph->get_mb_controller(0)->get_sensor("gps_locked").to_pp_string() << std::endl; // Initialise the USRP time to zero on the next 1 PPS graph->get_mb_controller(0)->get_timekeeper(0)->set_time_next_pps(uhd::time_spec_t(0.0)); // Call this to synchronise all the RFNoC devices (needed for phase alignment?) bool synchronised = graph->synchronize_devices(uhd::time_spec_t(2.0), false); ________________________________ Then when setting up the PLL's, to try and get phase coherence. ________________________________ const uhd::time_spec_t lastPPS = linux_uhd::get_graph()->get_mb_controller(0)->get_timekeeper(0)->get_time_last_pps(); const uhd::time_spec_t now = linux_uhd::get_graph()->get_mb_controller(0)->get_timekeeper(0)->get_time_now(); const uhd::time_spec_t span = uhd::time_spec_t(1.0); // Specify that the tune should occur aligned with the next 1 PPS const uhd::time_spec_t command_time = (lastPPS + span); // Clear any previous timed commands radio_ctrl[radio_id]->clear_command_time(0); // Set the time for the LO tune to occur radio_ctrl[radio_id]->set_command_time(command_time, 0); // Set the LO frequency in Hz actual_lo_frequency = radio_ctrl[radio_id]->set_tx_frequency(.... ________________________________ I am not sure if this could affect the peek and pokes thank you Marino
_______________________________________________ USRP-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
