- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello all,
just to be clear : do not search my question... There is no question, I just want to share the measurements made on a Galileo in order to know what are the exact performances you can expect from the Wire library. Do not forget that Galileo runs on a Linux kernel, your sketch being compiled as a single-thread executable file. The performances you obtain are then significantly different from the ones you will get on a AVR based Arduino.
I have performed the test using a I/O Expander board I designed, equipped with two PCF8574A I/O expander, running on a 100kHz I2C bus. Measurements have been made with a logic analyzer with a 125ns timebase.
Here are the values I found
Time between call to Wire.beginTransmission and effective transmission of address byte on the bus : 70 microseconds
Time between call to Wire.endTransmission and effective transmission of data bytes (queued by Wire.write) : 115 microseconds for one byte in the queue, 180 microseconds for two bytes in the queue. When more than 2 bytes are transmitted, the delay grows roughly of 6 microseconds for each byte (194 for 4 bytes in the queue)
Time between call the Wire.endTransmission and return to sketch code : 80 microseconds (this last value gives roughly 150 microseconds as a minimum between last transmitted data byte and the tranmission of the next address byte)
I hope this can help somebody
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
I think need to provide the following information:
- Galileo board type
- Linux Kernel version
BR,
xbolshe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Good suggestion...
Test performed on Galileo 1 with the default firmware (not the "full" Yocto). I will repeat the test tomorrow with the Yocto firmware (installed on the SD), to see if I find any difference
I think that Galileo Gen 2 will give the same results (but I have no Gen 2 to verify)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Mmmmm... sounds very weird
As far as I know, the Cypress chip is not compatible with the fast I2C (400kHz). I will check that today when I am back on my Galileo
Benoit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I confirm : I2C speed is 100kHz on my Galileo, it's not set to 400kHz.
Do you have a specific script running on your Galileo, xbolshe? I know that the Quark can run the I2C at 400kHz, but it's not supported by the chipset, so setting the speed to "fast" seems dangerous for me (the Cypress will become unresponsive)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Galileo Gen2 works with 400 kHz I2C bus, Gen1 - with 100 kHz.
BR,
xbolshe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Just gave a quick look to Gen 2 schematics : it's not the same I/O chip than Gen 1
Gen 1 = CY8C9540A (limited to 100kHz)
Gen 2 = PCAL9535 (compatible with 400kHz I2C)
That explains what you see xbolshe. By the way, I see this choice from Intel as a bit dangerous, because the standard Arduino library uses 100kHz by default (it can be changed in the source code of the Wire library). That means that some I2C shields may not work with a Galileo Gen 2...
I tlooks like I really need to buy a Gen 2, and check this in detail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
As discussed, I repeated the test with Intel Yoctos on the SD. I am rather surprized by the results (in a good way): the delays are reduced. For example, I see now that delay between address and data bytes can be as low as 20 microseconds. It seems that the drivers are a little bit more optimized with the Yoctos.
However, the variation seems bigger (I see delays varying from 20 to 164 microseconds, with an average value of 90 microseconds)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page