Bruno,

George Mason University in Fairfax, VA, USA has created a customized solution which works as you describe.  We had to created a custom Robostix firmware and Linux I2C stack to make it work.  Part of the problem, as I understand, is that I2C slave is not properly implemented in Linux.  If you want the communications to work alternating Master/Slave, you require the custom I2C stack.

I wasn't involved in this part of the project, and I don't want to volunteer the email address of the person with the code!  If you are interested in working with your original plan, reply here and I'll have the author of the firmware reply.

The solution Dave offered, using the interrupt to signal the Gumstix to (as master) ask the Robostix for the answer, then nearly everything you need is already in the buildroot and robostix branch.

Randy Steck
Geo. Mason University
Fairfax, VA, USA

On Dec 10, 2007 11:09 AM, Dave Hylands <dhylands@gmail.com> wrote:
Hi Bruno,

> I have already the Robostix and I'm waiting to receive the Connex 400xm
> motherboard; I must realize a software application (in C linguage, for an
> UAV) that provide a communication between the two board, in particular I
> know that them communicate with I2C protocol and so I want:
>  1) send from gumstix to robostix a command for require an A/D conversion. I
> saw that it's possible by an already implemented program that read the ADC
> port, called i2c-io for which there's the i2c-io-api C library, but I don't
> want use these because my objective is to establish a general communication
> between both;

The existing i2c-io-api library was intended to be an example of how
to use the i2c-api library.

There is also a wiki page written on how to use the i2c-slave.c or
i2c-slave-boot.c:
<http://docswiki.gumstix.com/Robostix_i2c_slave >

>  2) after the command has been sent, the robostix performs the command;

Yep.

>  3) after the command has been performed, the robostix should send the
> requested data (as master) to the gumstix (slave in this case), but I can
> approve a solution provides that gumstix require the data (therefore gumstix
> is still the master and robostix the slave).

Currently, the gumstix is always the master and the robostix is always
the slave. The gumstix sends commands and the robostix send back
responses. There is an interrupt line connected between the gumstix
and the robostix, so that the robostix could toggle that line to
generate an interrupt which would then cause the gumstix to ask the
robostix what it wants (or poll it for available data).

> My questions are these:
>  1) I must compile the kernel to flash it to the new connex: which steps do
> I must follow to properly use the I2C libraries presents in SVN for gumstix
> and robostix?

The basic steps are outlined here:
<http://docswiki.gumstix.com/I2C_on_the_Gumstix>

>  2) I use AVR Studio 4 and AVR Libc for programming robostix: in which
> manner can I use the I2C libraries presents in SVN to write program for
> robostix instead of AVR Libc in AVR Studio?...is it possible?

You just use them? They're just source files containing functions. I
designed them not to be built into a library but rather included
directly into your project. That way you can set configurtation
options on a per-project basis.

>  3) In which manner can I implement a right temporal synchronization between
> gumstix and robostix?

There is an interrupt line from the robostix to gumstix. I'm not sure
exactly what you mean by "temporal synchronization". The robostix
doesn't have a real-time clock, and there are many other things you
could mean. If you're looking for CPU clock synchronization

>  4) I'm confused on the directory tree of SVN: can anybody give me some
> suggestion to understand this tree?

It would be useful to know what portion confuses you?

The root of the tree that is commonly referred to as buildroot is in
the directory called trunk (i.e. if you goto http://websvn.gumstix.com

Here is some documentation about buildroot:
<http://buildroot.uclibc.org/buildroot.html>

In particular, this section talks about the various directories and
their purpose:
<http://buildroot.uclibc.org/buildroot.html#buildroot_innards>

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users