I2C SPI USB CAN eSPI Cable Testing View All Quick Start Guides User Manuals Software Downloads Knowledge Base Videos Case Studies App Notes White Papers Sales Support About Us
Products Blog Sales Support Contact Search
How can I send large data transactions, messages greater than 64 bytes, using the Aardvark I2C/SPI Host Adapter?
Rena Ayeras

Question from the Customer

For a communication scenario, I am using the Aardvark Software API for data transactions. Here is the call that I am using:

aa_i2c_write (handle, deviceAddress, AA_I”C_NO_FLAGS, numbytes, bufferin)

If I define numbytes=300, is there a limitation when sending data due to the buffer size of 64 bytes? In other words, I would like to know what is the maximum size of data (number of bytes) that the Aardvark I2C/SPI Host Adapter can process.

Response from Technical Support:

Thanks for your question! For the Aardvark adapter, the buffer space is 64 bytes, and the maximum slave response is 64 bytes. However, the transactions can be much larger. Here are the details:

The size of the I2C and SPI buffers are 16 Kbytes each - they can hold many separate transactions. These buffers are only used when an Aardvark API call is invoked. This buffer size is adequate for your use, as the overall limitation for asynchronous messages is determined by the operating systems internal buffer size.

The Aardvark adapter can reliably send and receive transactions of 4 Kbytes or less as an SPI master or slave. This is due to operating system issues and the full-duplex nature of the SPI signaling.

When configuring Aardvark adapter for Master Write, the maximum message size is 64k (65535) bytes when using 7-bit addressing and 64k-1 (65534) bytes when using 10-bit addressing. For more details about addresses, please refer to this knowledge base article: 7-bit, 8-bit, and 10-bit I2C Slave Addressing.

Please note, the number of bytes that can be written in the API call  aa_i2c_write is 65535. For more information, please have a look at the API Documentation section, I2C Interface, in the Aardvark I2C/SPI Host Adapter User Manual.

Additional resources that you may find helpful include the following:

We hope this answers your question. Want more information? You can contact us and request a demo that applies to your application, as well as ask about our Total Phase products.

Request a Demo