I2C SPI USB CAN eSPI Cable Testing View All Videos Quick Start Guides Software Downloads App Notes White Papers User Manuals Knowledge Base Sales Support About Us
Products Blog Sales Support Contact Search
Support Question of the Week: How to Set Up Aardvark I2C/SPI Host Adapter for I2C Multi-Master Mode
Rena

Q: I have recently purchased the Aardvark I2C/SPI Host Adapter. I need to communicate with an embedded system using I2C multi-master mode in a C# application. I am having a hard time figuring out the best way to use the Aardvark API and Shared Library to do this type of communication. Do have an example that uses multi-master, or can you provide advice on how to do this?

Also, I am unsure about how to deal with multi-master arbitration. Is there an interrupt for changing to a slave if the arbitration is lost and the other multi-master is addressing to it? I would appreciate the information.

Aardvark I2C/SPI Host Adapter, usable for I2C multi-master arbitration Figure 1: Aardvark I2C/SPI Host Adapter

Thanks for the questions! The Aardvark Software API package has C# I2C examples, but it does not include an example of I2C multi-master.

However, we do have recommendations:

  1. You can transfer I2C data with Control Center Software using the instructions from Knowledge Base article: How to Read and Write to an I2C EEPROM Using the Aardvark adapter and Control Center.
  2. You can also take the original I2C examples (such as aadetect) provided in the API package, and then modify the examples for your system requirements. For more information and to download the examples, please see:

To become more familiar with the Aardvark Software API, we suggest running the original examples aadetect, aai2c_slave, and aai2c_master that are provided in the API package. For additional information, you can refer to the README.txt files in the API package and the Aardvark API documentation.

Additional information about Aardvark adapter and multi-master arbitration:

  • The Aardvark I2C/SPI Host Adapter supports multi-master including collision detection and arbitration. For more information, refer to the Aardvark I2C/SPI adapter datasheet section 2.3.
  • About multi-masters per I2C specifications: More than one master can attempt to control the bus at the same time without corrupting the message. The multi-master I2C bus includes collision detection and arbitration. Arbitration is a procedure to ensure that, if more than one master simultaneously triy to control the bus, only one is allowed to do so and the winning message is not corrupted. For additional information, refer to section 3.1 of the I2C specification.

For more information about our products and more, please refer to the following:

Knowledge Base articles

Host Adapters

Control Center Software

Total Phase Products

Product Selector Guide

We hope this answers your question. If you have other questions about our protocol analyzers, software tools or other Total Phase products, feel free to email us at sales@totalphase.com or support@totalphase.com.