Skip to content

Commit

Permalink
Added temp fix for TDC issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-baros committed Jun 24, 2022
1 parent c848aa1 commit 06d7945
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions lib/RefArch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,25 @@ void RefArch::setSources()
{
// Set clock reference
std::cout << "Locking motherboard reference/time sources..." << std::endl;
// Lock mboard clocks
for (size_t i = 0; i < RA_graph->get_num_mboards(); ++i) {
RA_graph->get_mb_controller(i)->set_clock_source(RA_ref);
RA_graph->get_mb_controller(i)->set_time_source(RA_ref);
// Try/Catch Temp fix for TDC issue that will be patched in UHD 4.3
size_t count = 5;
while (count > 0){
try{
// Lock mboard clocks
for (size_t i = 0; i < RA_graph->get_num_mboards(); ++i) {
RA_graph->get_mb_controller(i)->set_clock_source(RA_ref);
RA_graph->get_mb_controller(i)->set_time_source(RA_ref);
}
break;

}
catch(...){
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
UHD_LOG_WARNING("TDC ERROR", "Retrying " << count << " more times...");
count--;
}
}

}
int RefArch::syncAllDevices()
{
Expand Down

0 comments on commit 06d7945

Please sign in to comment.