How Do I Debug an I2C System So I Can Master Read PMIC Registers?

Question from the Customer:

I am trying to use the Aardvark I2C/SPI Host Adapter  and Control Center Serial Software to read the registers of an I2C device for integrated power management (PMIC). The TPS65216 datasheet describes its I2C operation and sequencing. I have used the Master Read and Master Register Read commands with the Slave Address 0x24, but I have not received any data in response.

I am not yet familiar with what the Aardvark adapter is transmitting during the Master Read and Master Register Read functions. I am not sure what needs to be sent to the PMIC to access its registers. Can you provide details of what is needed to successfully read the PMIC registers? Do I need to create a script, or is there another way to make this work?

Response from Technical Support:

Thanks for your questions! Based on the information you provided, there may be an issue with the setup, or the target device is not responding. For your setup, we have two recommendations to help analyze and debug your system. We also provide an overview about using Master Register Read commands via Aardvark Software API.

Debug Tools for I2C

We have two recommendations for debugging and analyzing your system:  an I2C/SPI Activity Board and a Beagle I2C/SPI Protocol Analyzer.

Prototype and Debug a System

The I2C/SPI Activity Board can help you create a prototype of the system on which you are working. Here are some examples of what you can do:

  • Debug a system against working slave devices
  • Differentiate between hardware and software bugs
  • Establish a baseline for software usage

For more information, please take a look at our Knowledge Base article, How to Read and Write to an I2C EEPROM Using the Aardvark adapter and Control Center. This article describes the steps to read/write to the AT24C02 I2C EEPROM that is provided with the I2C/SPI Activity Board. You can easily modify the steps for other devices.

Monitor and Analyze Data

To monitor and analyze the data transactions, we recommend using the Beagle I2C/SPI Protocol Analyzer in your setup. Used with our Data Center Software, you can log the necessary data. This way, you can monitor the I2C bus with real-time monitoring, as well as perform diagnostics and communication. We have a video that demonstrates using the Beagle I2C/SPI Protocol Analyzer to quickly evaluate a system.

Master Register Read via API Commands

Here is an overview about the Master Register Read and using Aardvark Software API.

The Master Write-Read command (also known as Master Register Read) is a combination of two I2C transactions. Using AA_I2C_NO_STOP allows these two calls to operate as a single I2C transaction.

  • The first API call is aa_i2c_write(). The AA_I2C_NO_STOP flag is set, as well as the device register address from which to read.
  • The second call is aa_i2c_read(), which specifies the number of bytes to read.

For information about the syntax commands and a functional example, please refer to the article How Do I Claim the I2C Bus with the Aardvark I2C/SPI Host Adapter? For more details, please refer to the API Documentation section of the Aardvark I2C/SPI Host Adapter Manual.

We hope this answers your questions. Additional resources that you may find helpful include the following:

If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.

Request a Demo