I am using the Aardvark I2C/SPI Host Adapter with Aardvark Software API.
For my application, I am sending API functions aa_i2c_write and aa_i2c_read one after another, with no pause between those two commands. However, the read command follows the write command after 1ms. Is there a way I can reduce this delay for my I2C bus projects?
Response from Technical Support:Thanks for your question! For your application, we recommend using the Promira Serial Platform. We’ll start with describing how the Aardvark adapter works, then follow up with the advantages of the Promira platform.
The Aardvark adapter operates at USB Full Speed (12 Mbit/s).
The Aardvark I2C master supports 1 KHz - 800 KHz. Because of the I2C protocol requires that 9 bits are sent for every 8 bits of data, bytes cannot be sent at exactly 1/8 times the bitrate. The Aardvark adapter allows throughputs very close to the theoretical maximum byte throughput of 1/9 the bitrate. For more information about I2C bitrates, please refer to the article I2C signaling characteristics.
There is a required finite time to set up a byte transmission. In addition, overhead is introduced by the operating system between calls to the Aardvark API.
The aa_i2c_write (or aa_i2c_read) call must complete before the next API call. Each time this function is called, a 2ms round-trip latency is incurred which is caused by the full-speed USB link between the computer and the Aardvark adapter.
In addition, the target device may require some time to commit the write to a specific address before performing the next read for that address. For details about such delay, please refer to the datasheet of the target device.
The internal overhead of the computer OS (operating system) may also add additional delay.
For the Aardvark API functions, everything is a block function that waits for the response from the device. All functions are affected by USB latency, which is 1~2ms.
The Promira platform supports I2C master/slave bitrates up to 3.4 MHz. The Promira platform uses Ethernet and Ethernet over High-speed USB as its connection to the computer, which enables it to operate faster than the Aardvark adapter (which only communicates over full-speed USB). The Promira platform also provides queue functionality that allows multiple Promira Software API I2C/SPI Active commands to be queued up and shifted to the device at once. For more information about queuing, please refer to the Queue section of the Promira Serial Platform I2C/SPI Active User Manual.
We hope this answers your question. Additional resources that you may find helpful include the following:
If you have more questions, please contact us at sales@totalphase.com. You can also request a demo that applies to your application.