I am trying to use the Promira Serial Platform to talk to an I2C device. I am following the instructions in the Promira Serial Platform Quick Start Guide, yet I cannot successfully complete a master write.
It appears that the data field is blank:
"2021-01-17 13:43:59.727","I2C","W","M","--S","400","0X49","0",""
However, I do see data in the fields when I try using SPI:
"2021-01-07 11:38:09.853","SPI","","","","","","","SPI Bitrate Set to: 1000""2021-01-07 11:38:09.888","SPI","","M","","","","","SPI Config: Mode = 0, Bit Order = MSB, SS_Polarity = Low"
"2021-01-07 11:38:14.350","SPI","","M","","","","","SPI Config: Mode = 0, Bit Order = MSB, SS_Polarity = Low"
"2021-01-07 11:38:14.405","SPI","W","M","M0ML","1000","","16","00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF"
"2021-01-07 11:38:14.405","SPI","R","M","M0ML","1000","","16","00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
Maybe the software is not configured correctly - the Control Center Serial Software does not appear to write any data at all when using the I2C protocol; I can only get this to work with the SPI protocol. How can I find the cause so I can fix this problem?
Response from Technical Support:Thanks for your question! There are a few possibilities of what may need to be resolved for your setup. With the information provided, we recommend two ways to look for the root of the problem: perform some basic checks, and if necessary, monitor the I2C bus traffic.
A basic and essential starting point is verifying that the slave address, the operating voltage, and the operating bitrate are compatible with the target device.
For guidelines about configuring the Promira platform to provide the correct voltage level, take a look at our knowledge base article: Programming an I2C EEPROM Using the Promira Serial Platform and the Control Center Serial Software. This article explains how to program an I2C EEPROM using the Promira Serial Platform, and the Control Center Serial Software. Here is a summary of the steps to follow:
This article uses the Microchip 24FC512 I2C EEPROM with the EEPROM Socket Board - 10/34. You can modify the steps as needed for your setup.
Another possibility is that the data is corrupted, has some interference, or other issues that affect data.
For a close look at the data, including real-time diagnostics and analysis, we recommend using the Beagle I2C/SPI Protocol Analyzer and Data Center Software with your setup. Used together, these tools can monitor the flow of data on the bus, thus providing real-time monitoring along with diagnostics and communication.
For an example of sniffing data and running diagnostics, take a look at this video:
This video shows using the Aardvark I2C/SPI Host Adapter and the Beagle I2C/SPI Protocol Analyzer to monitor and prototype an I2C-based system.
We hope this answers your question. 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.