EttusResearch / uhd

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

Should the width of UBX gains be 6 bits in GPIO? #683

Closed johnwstanford closed 3 months ago

johnwstanford commented 1 year ago

I think the widths of the gain values here should be 6 bits, not 10. There's 32 bits of GPIO and the upper 16 bits are TX and the lower 16 bits are RX. Using TX as an example, by the time you get to the gain, 10 bits are used up and there are only 6 left. 0x3F is also the max value for 6 bits. Same goes for RX.

https://github.com/EttusResearch/uhd/blob/0e50a37b5ec6039ed4e8947421dd333047e24408/host/lib/usrp/dboard/db_ubx.cpp#L173

mbr0wn commented 3 months ago

Yes.

joergho commented 3 months ago

Fixed with https://github.com/EttusResearch/uhd/commit/20e987d9dae25cf78ec9b2d46a1b450d3581e2dc