Hi Jon, you might try deallocating the original smart pointer before creating a 
new one, i.e. call m_dev.reset() before remaking the device. If you're not 
familiar with it, note the use of dot instead of arrow operator, since this 
operation is on the smart pointer itself and not the object it's wrapping..

Best,
David

> -----Original Message-----
> From: Jon Beniston <j...@beniston.com>
> Sent: Monday, June 6, 2022 1:33 PM
> To: 'Marcus D. Leech' <patchvonbr...@gmail.com>; usrp-
> us...@lists.ettus.com
> Subject: [USRP-users] Re: E320 Automatic master clock
> 
> Hi Marcus,
> 
> >The "master_clock_rate" specification is *per session*.   It does NOT set it
> in any persistent way.
> > In the next session, if you don't specify it, UHD will pick an
> >appropriate  clock value.  If this is NOT happening, then that is a bug or an
> under-documented feature.
> 
> Sorry for the basic question, but what is a "session"? How do I end one and
> start a new one within a single execution of a program?
> 
> If I just try to re-make the device, I get an exception. Eg:
> 
>                 m_dev = uhd::usrp::multi_usrp::make(device_args);
>                 m_dev->set_master_clock_rate(61.44e6);
>                // How to restart a session here?
>                 m_dev = uhd::usrp::multi_usrp::make(device_args);
> 
> ...
> [INFO] [B200] Asking for clock rate 61.440000 MHz...
> [INFO] [B200] Actually got clock rate 61.440000 MHz.
> [INFO] [B200] Detected Device: B210
> [INFO] [B200] Operating over USB 3.
> [ERROR] [UHD] Exception caught in safe-call.
>   in b200_radio_ctrl_core_impl::~b200_radio_ctrl_core_impl
>   at
> C:\Users\buildbot\worker0\Builder_uhdPackage_Windows_x64_vs2019\wo
> rk\uhd\host\lib\usrp\b200\b200_radio_ctrl_core.cpp:68
> this->peek32(0); _async_task.reset(); -> AssertionError: accum_timeout <
> this->_timeout
>   in b200_radio_ctrl_core_impl::wait_for_ack
>   at
> C:\Users\buildbot\worker0\Builder_uhdPackage_Windows_x64_vs2019\wo
> rk\uhd\host\lib\usrp\b200\b200_radio_ctrl_core.cpp:227
> 
> Probably something trivial, but I can't see it in the docs. No close/release
> method I can see.
> 
> Thanks,
> Jon
> 
> _______________________________________________
> USRP-users mailing list -- usrp-users@lists.ettus.com To unsubscribe send an
> email to usrp-users-le...@lists.ettus.com
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to