I've committed some more code to the svn repo at
svn://svn.geekisp.com/opensdr/beagle-sdr :

spi-utils contains some modified versions of spidev_test. dump_data
reads bytes from stdin and sends them over the SPI port while
simultaneously reading bytes over SPI and writing them to stdout.
peek_poke lets you read or write control registers on the AD9860/9862
ADC if you connect it to a SPI port. I'm not convinced that I have the
byte order absolutely (or portably) right in these, so use them at
your own risk.

gr-spi contains two blocks for GNU Radio: gr_spi.spi_source_s and
gr_spi.spi_srcsink_ss. They both provide a method called
open_spi(const std::string &device, int speed) to open a specified
device file for SPI transfers at a maximum rate of speed Hz, and
close_spi() to close the device. Their output is 16-bit shorts read
over SPI. spi_srcsink_ss also has an input port to let you send a
stream of data over SPI, while spi_source_s provides a method called
send_spi_command(const std::string &command) to let you feed it bytes
without having to connect it to a signal source.

gr-spi/misc contains simple flow graphs in Python using spi_source_s
and spi_srcsink_ss, and a .bb file for cross-compiling gr-spi under
OpenEmbedded. Put gr-spi_0.1.bb in a directory under
$OE_HOME/openembedded/recipes along with the tarball created by `make
dist-bzip2`, then bitbake gr-spi.

eastwood contains code for the FPGA on the (still-unnamed) board we're
building. Compile it with eastwood.vhd as the top-level entity, and it
will send samples from the ADC straight through to the DAC, while
exposing the AD9862's control port to McSPI3 on the BeagleBoard.
blondie.vhd connects McSPI4 to the ADC/DAC through a simple
signal-processing path (just a trivial interpolator and decimator for
now); McSPI3 goes to the AD9862 and a set of control registers on the
FPGA.

None of this is production-quality, but hopefully it's a few steps
closer to being useful.

George

Reply via email to