# UHD Daughter Board EEPROM Format (calibration data)

**URL:** <https://www.ruby-forum.com/t/uhd-daughter-board-eeprom-format-calibration-data/236976>\
**Category:** GNU Radio\
**Created:** [October 16, 2013, 1:20pm UTC](https://www.ruby-forum.com/t/uhd-daughter-board-eeprom-format-calibration-data/236976 "2013-10-16T13:20:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [October 16, 2013, 1:20pm UTC](https://www.ruby-forum.com/t/uhd-daughter-board-eeprom-format-calibration-data/236976/1 "2013-10-16T13:20:57Z")

</div>

I am wondering if there has been any formalized structure for storing  
the IQ  
balance offset data in the dboard EEPROM.

The following snippet is taken from the UHD that is packaged with GNU  
radio  
3.5.1  
(I’m not actually sure if the UHD version is different from the GNU  
radio  
package 3.7?)

////////////////////////////////////////////////////////////////////////  
// format of daughterboard EEPROM  
// 00: 0xDB code for ``I’m a daughterboard’’  
// 01: … Daughterboard ID (LSB)  
// 02: … Daughterboard ID (MSB)  
// 03: … io bits 7-0 direction (bit set if it’s an output from  
m’board)  
// 04: … io bits 15-8 direction (bit set if it’s an output from  
m’board)  
// 05: … ADC0 DC offset correction (LSB)  
// 06: … ADC0 DC offset correction (MSB)  
// 07: … ADC1 DC offset correction (LSB)  
// 08: … ADC1 DC offset correction (MSB)  
// …  
// 1f: … negative of the sum of bytes [0x00, 0x1e]

#define DB\_EEPROM\_MAGIC 0x00  
#define DB\_EEPROM\_MAGIC\_VALUE 0xDB  
#define DB\_EEPROM\_ID\_LSB 0x01  
#define DB\_EEPROM\_ID\_MSB 0x02  
#define DB\_EEPROM\_REV\_LSB 0x03  
#define DB\_EEPROM\_REV\_MSB 0x04  
#define DB\_EEPROM\_OFFSET\_0\_LSB 0x05 // offset correction for ADC or DAC  
0  
#define DB\_EEPROM\_OFFSET\_0\_MSB 0x06  
#define DB\_EEPROM\_OFFSET\_1\_LSB 0x07 // offset correction for ADC or DAC  
1  
#define DB\_EEPROM\_OFFSET\_1\_MSB 0x08  
#define DB\_EEPROM\_SERIAL 0x09  
#define DB\_EEPROM\_SERIAL\_LEN 0x09 //9 ASCII characters  
#define DB\_EEPROM\_CHKSUM 0x1f

#define DB\_EEPROM\_CLEN 0x20 // length of common portion of  
eeprom

#define DB\_EEPROM\_CUSTOM\_BASE DB\_EEPROM\_CLEN // first avail offset for  
// daughterboard  
specific  
use  
////////////////////////////////////////////////////////////////////////

The storage of calibration data for DC offset is stored in 0x05 - 0x08.

But what about the IQ offsets?  
There is a gap between reserved addresses 0x09 and 0x1f.  
Is the use of this area documented?

There is a utility to calibrate the board and it generates a text file.  
Presumably, the authors also implemented a method to make use of this  
data?

Continuing, the ettus boards driver code sets the gain, though I do not  
see  
any request for the offset data stored in EEPROM inside the constructor  
or  
elsewhere.

This is a similar issue with IQ balance, ie. formalized structure for  
both  
storing calibration data in EEPROM and then accessing it and using it  
during  
runtime.

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/UHD-Daughter-Board-EEPROM-Format-calibration-data-tp44187.html](http://gnuradio.4.n7.nabble.com/UHD-Daughter-Board-EEPROM-Format-calibration-data-tp44187.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 16, 2013, 7:03pm UTC](https://www.ruby-forum.com/t/uhd-daughter-board-eeprom-format-calibration-data/236976/2 "2013-10-16T19:03:58Z")

</div>

Hello Alexander,  
UHD does not come bundled with GNU Radio; they are two completely  
independent libraries.  
You’re sending some code from UHD, but from the defines below I’m not  
quite sure if you’re a) referring to the firmware code or b) referring  
to the host (PC) code.  
What file exactly is this from?  
Anyway, this has nothng to do with GNU Radio as such, but with the Code  
for Ettus USRPs.  
Since your question is quite complicated, please join the USRP users  
mailing list () and write your question to removed\_email\_address@domain.invalid,  
the folks there will be glad to help you.

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 17, 2013, 10:40am UTC](https://www.ruby-forum.com/t/uhd-daughter-board-eeprom-format-calibration-data/236976/3 "2013-10-17T10:40:19Z")

</div>

Ah yes… I have become used to viewing them as one system.

Thank you for the link to the USRP mailing list, I will explore the  
issue  
with them.

Alex

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/UHD-Daughter-Board-EEPROM-Format-calibration-data-tp44187p44202.html](http://gnuradio.4.n7.nabble.com/UHD-Daughter-Board-EEPROM-Format-calibration-data-tp44187p44202.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).
