summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-10-05 11:53:43 -0700
committerNick Foster <nick@nerdnetworks.org>2010-10-05 11:53:43 -0700
commit92fdf6ab255cc07091bbdb59e7eb5e57553115ba (patch)
tree8841360082d1e0b48b44b424205ca0295a493b98 /host/lib/usrp/usrp2
parente4d088fa9169eef81473cb7d83bda7c82bc5d243 (diff)
downloaduhd-92fdf6ab255cc07091bbdb59e7eb5e57553115ba.tar.gz
uhd-92fdf6ab255cc07091bbdb59e7eb5e57553115ba.tar.bz2
uhd-92fdf6ab255cc07091bbdb59e7eb5e57553115ba.zip
U2P: 32/64Mbit FLASH support, internal reference support for U2P r2
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 2669df9bc..3ae21e621 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -160,11 +160,21 @@ void usrp2_mboard_impl::update_clock_config(void){
_iface->poke32(_iface->regs.time64_flags, pps_flags);
//clock source ref 10mhz
- switch(_clock_config.ref_source){
- case clock_config_t::REF_INT : _iface->poke32(_iface->regs.misc_ctrl_clock, 0x10); break;
- case clock_config_t::REF_SMA : _iface->poke32(_iface->regs.misc_ctrl_clock, 0x1C); break;
- case clock_config_t::REF_MIMO: _iface->poke32(_iface->regs.misc_ctrl_clock, 0x15); break;
- default: throw std::runtime_error("usrp2: unhandled clock configuration reference source");
+ if(_iface->get_hw_rev() >= USRP2P_FIRST_HW_REV) {
+ switch(_clock_config.ref_source){
+ case clock_config_t::REF_INT : _iface->poke32(_iface->regs.misc_ctrl_clock, 0x12); break;
+ case clock_config_t::REF_SMA : _iface->poke32(_iface->regs.misc_ctrl_clock, 0x1C); break;
+ case clock_config_t::REF_MIMO: _iface->poke32(_iface->regs.misc_ctrl_clock, 0x15); break;
+ default: throw std::runtime_error("usrp2: unhandled clock configuration reference source");
+ }
+ } else {
+
+ switch(_clock_config.ref_source){
+ case clock_config_t::REF_INT : _iface->poke32(_iface->regs.misc_ctrl_clock, 0x10); break;
+ case clock_config_t::REF_SMA : _iface->poke32(_iface->regs.misc_ctrl_clock, 0x1C); break;
+ case clock_config_t::REF_MIMO: _iface->poke32(_iface->regs.misc_ctrl_clock, 0x15); break;
+ default: throw std::runtime_error("usrp2: unhandled clock configuration reference source");
+ }
}
//clock source ref 10mhz