On Fri, Jan 13, 2006 at 03:01:24PM -0500, Clark Pope wrote: > I've been playing with the usrper application. I am able to read and write > to the 9862 chips okay but all attempts at using i2c_read fail?
FWIW, I usually prefer to do this kind of experimentation from Python, but in any event you're probably using an invalid i2c address. > Is it suppose to work? What is the memory map? See usrp/firmware/include/usrp_i2c_addr.h Note also, that if what you're really trying to do is read the contents of one of the EEPROM's, you're much better off using read_eeprom. >From python: u = usrp.sink_c(0) # or u = usrp.source_c(0) # returns a string s = u.read_eeprom(i2c_addr, eeprom_offset, nbytes) print s # returns a string s = u.read_i2c(i2c_addr, nbytes) print s > Also, is there a way to read from the FPGA registers from usrper? No. >From python: # returns 32-bit int v = u._read_fpga_reg(regno) Note that there are only 4 readable registers, and I strongly suggest that you use u.read_io(which_dboard) instead of directly reading register 1 or 2. regno result ----- -------------------------- 1 (io_rx_a << 16) | io_tx_a # read d'board i/o pins 2 (io_rx_b << 16) | io_tx_b # read d'board i/o pins 3 returns const 0xaa55ff77 # don't count on this 4 returns const 0xf0f0931a # don't count on this FYI, the "normal" python interface to the usrp is defined in gr-usrp/src/usrp1.i > Thanks, > Clark Eric _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
