In our characterization lab we are using an Aardvark I2C/SPI Host Adapter as one of our I2C adapters. I’m currently working on a development project where I need to repeatedly read I2C data after a trigger via GPIO pin at a rate of 400kHz.
The current implementation uses the Aardvark API Software and USB communication in Python 3 is not fast enough - a window is open little more than 1ms to read the data. With the current setup, the USB communication adds too much lag time.
Is there a way to create custom functions that will run on the Aardvark adapter locally?
I would appreciate any help to resolve this.
Response from Technical Support:Thanks for your question! Delays are caused by the design of the USB architecture, the operating system, and how the data is transmitted. We have two suggestions for improving throughput, which are described below.
Each API call that is used to send data to and from the Aardvark adapter can incur up to 1 ms in delay on the PC host. This is caused by the inherent design of the USB architecture. The operating system will queue any outgoing USB transfer request on the host until the next USB frame period. The frame period is 1 ms.
If the application attempts to execute several transactions in rapid sequence, there can be a 1-2 ms delay between each transaction plus any other delays introduced by the operating system. With the Aardvark adapter, the best throughput can be achieved by using single transactions that each transfers a large number of bytes.
For your requirement, you can consider using Promira Serial Platform, which avoids these delays since they use an Ethernet interface and also follow a queuing mechanism to avoid inter-byte delays and the delays within read/write requests. For more information, please refer to the I2C AC Characteristics section of the Promira Serial Platform I2C/SPI Active User Manual.
The Promira platform can be licensed with two levels of I2C application:
The Promira platform equipped with the I2C Active - Level 1-2 Applications provides high speed I2C programming, high performance debugging, and superior emulation for your I2C protocol needs.
In addition to this, the powerful Promira platform offers many benefits over our previous generation of host adapters:
Additional resources that you may find helpful include the following:
We hope this answers your questions. If you have other questions about our software, host adapters or other Total Phase products, feel free to email us at sales@totalphase.com. You can also request a demo that is specific for your application.