From: Sébastien S. <seb...@zh...> - 2008-05-30 15:16:53
|
Hello, 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? ...I guess my question is for Dave once again ;-) Thanks, Sébastien |