EttusResearch / uhd

The USRP™ Hardware Driver Repository
http://uhd.ettus.com
Other
942 stars 645 forks source link

ADF5356_MAX_FRAC2 too big for a uint16_t #684

Closed johnwstanford closed 3 months ago

johnwstanford commented 1 year ago

If ADF5356_MAX_FRAC2 wins this comparison, then I don't think it'll fit into the uint16_t that we're casting it into. Its value is 268435455 and log2(268435455) = 28.

https://github.com/EttusResearch/uhd/blob/0e50a37b5ec6039ed4e8947421dd333047e24408/host/lib/include/uhdlib/usrp/common/adf535x.hpp#L569C60-L569C77

mbr0wn commented 3 months ago

You're right. This is copy/pasta from ADF5355.