Hi Dave,

The link you sent seems to be useful... I'll try to fix that on Monday (just to be sure: the file descriptor in the mmap() function corresponds to the opened i2c device?).

And do you have any idea concerning the long gpio-event delay? Is this timing normal (350 - 400 us)?

Dave Hylands wrote:
Hi Sébastien,

I thought it would be possible to work faster... perhaps I missed one
important thing.

My goal is to transfer USART data from the robostix to gumstix through the
TWI (I2C) interface.
When the USART buffer is full, it sets the RXC0 interrupt flag. Robostix
immediately set PE2 to tell gumstix, it has to get some data. Gumstix then
open a basic I2C communication to fetch 2 bytes (the USART data + something
else) using I2cReceiveBytes(i2cDevice, rcvBytes, 2).

As you can see on the above picture, the time between RXC0 is set (also
PE2... 6 CK later) and the TWI interruption begins is bigger than the time
interval between two RXC0 (320 us... MIDI signal)... also too long. My C
code on the gumstix has only 2 lines: read(gpioEvent,...) and
I2cReceiveBytes(i2cDevice...). The gpio-event is 69 : r : 0.

By the way, I find the TWI communication too long, too: for 1 address and 2
data bytes @ 400 KHz, it should be < 100 us and it has more than 200 us. Is
actually 400 KHz default it the i2c-api? Or are there more than 3 bytes on
the line?

The default is to use 100 kHz.

This thread from the archives has some information on setting things
to use 400 kHz.

Dave Hylands
Vancouver, BC, Canada

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
gumstix-users mailing list

No virus found in this incoming message. Checked by AVG. Version: 8.0.100 / Virus Database: 269.24.4/1475 - Release Date: 5/30/2008 2:53 PM

Sebastien Schiesser
Gesture devices & hardware

Institute for Computermusic and Sound Technology - www.icst.net
Zurich University of the Arts - www.zhdk.ch

Baslerstrasse 30
8048 Zurich

Phone +41 44.563.8580
Cell  +41 76.420.0178
Fax   +41 43.446.5519