mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
host: x4xx: update default wait time for NCO reset
This commit is contained in:
parent
7b7f518ad4
commit
632f9927e5
@ -24,6 +24,9 @@ class rfdc_control
|
||||
public:
|
||||
using sptr = std::shared_ptr<rfdc_control>;
|
||||
|
||||
//! Default SYSREF wait time for an NCO reset, in SYSREF cycles
|
||||
static constexpr uint32_t DEFAULT_SYSREF_WAIT_CYCLES = 14;
|
||||
|
||||
struct regmap
|
||||
{
|
||||
//! Address of the NCO reset register
|
||||
|
||||
@ -27,8 +27,9 @@ void rfdc_control::reset_ncos(
|
||||
}
|
||||
UHD_LOG_TRACE(_log_id, "Resetting " << ncos.size() << " NCOs...");
|
||||
|
||||
// Initialize the NCO reset delay to a default of 11 SYSREF cycles
|
||||
constexpr uint32_t reset_word = (11 & 0xFF) << regmap::SYSREF_WAIT_LSB
|
||||
// Initialize the NCO reset delay to the default number of SYSREF cycles
|
||||
constexpr uint32_t reset_word = (DEFAULT_SYSREF_WAIT_CYCLES & 0xFF)
|
||||
<< regmap::SYSREF_WAIT_LSB
|
||||
| 0x1 << regmap::WRITE_SYSREF_WAIT | 1;
|
||||
|
||||
// Initiate NCO reset
|
||||
|
||||
@ -778,7 +778,8 @@ BOOST_FIXTURE_TEST_CASE(zbx_phase_sync_test, x400_radio_fixture)
|
||||
// Set reset complete bit
|
||||
regs[nco_sync_addr] = 1 << 1;
|
||||
constexpr uint32_t nco_sync_val =
|
||||
(11 & 0xFF) << uhd::rfnoc::x400::rfdc_control::regmap::SYSREF_WAIT_LSB
|
||||
(uhd::rfnoc::x400::rfdc_control::DEFAULT_SYSREF_WAIT_CYCLES & 0xFF)
|
||||
<< uhd::rfnoc::x400::rfdc_control::regmap::SYSREF_WAIT_LSB
|
||||
| 1 << uhd::rfnoc::x400::rfdc_control::regmap::WRITE_SYSREF_WAIT
|
||||
| 1 << uhd::rfnoc::x400::rfdc_control::regmap::NCO_RESET_DONE_MSB
|
||||
| 1 << uhd::rfnoc::x400::rfdc_control::regmap::NCO_RESET_START_MSB;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user