discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Re: External card connected to USRP board


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Re: External card connected to USRP board
Date: Mon, 5 May 2008 10:18:41 -0700
User-agent: Mutt/1.5.17 (2007-11-01)

On Mon, May 05, 2008 at 06:40:32PM +0200, Diana Iosifescu wrote:
> 
> The ROM id's the card to the system. You need it. It costs about
> $0.50.
> 
> %**********************************************
> Thanks. I know it's a cheap component. Just wondering for the increased
> complexity (mainly side effects!!). Please give me some clues (pointer
> to information) to know what should be written in the ROM and
> consequences in the devices programing.
> %******************************************
> 
> Thank very much for answering my questions,
> Diana


The format of the ROM is documented in usrp/firmware/include/usrp_i2c_addr.h.
Just be sure that bytes 0x00 through 0x02 make sense.  You can set the
remainder to 0x00, but be sure to set the checksum correctly in 0x1f.
There's a script that will do this for you over the USB.  
See usrp/host/apps/burn-db-eeprom. 


The relevant portion is:

// 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_OE_LSB                0x03
#define DB_EEPROM_OE_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_CHKSUM                0x1f

#define DB_EEPROM_CLEN                  0x20    // length of common portion of 
eeprom


You can use the the existing "Experimental Rx" daughterboard id, 0xffff,
or define a new one.   See usrp/host/lib/legacy/usrp_dbid.dat


The dbid is read from the daughterboards and is use to instantiate the
correct daughterboard code.  You can see what you've got by calling
u.daughterboard_id(0) and u.daughterboard_id(1) to retrieve the dbid's
from slots 0 and 1.

To talk to your daughterboard using our standard interface, you'll
need to write a bit of python.  Take a look at gr-usrp/src/db_*.py.
Start with db_base.py, then maybe db_basic.py

Eric





reply via email to

[Prev in Thread] Current Thread [Next in Thread]