Hi,
I am currently working on a project where I need to monitor the consumption of a FPGA. In this case, the FPGA is an Ultrascale KU040 embedded in an Avnet Developpement board [1][2][3].
The board uses IR38060 Infineon regulators [4] for supply the components of the board. The one I need to monitor is the IR38060MTRPBF which supply the FPGA as VCCINT and the Block Ram as VBRAM.
The best choice to access to the regulators would be to use the USB005 from Infineon but most of the providers don't have it in stock or at least I need to wait 5 weeks. Also, it is possible to have the PMBUS signal from the regulators to the FPGA but I can't afford to add more logic into the FPGA (90% LUT already use) and the PMBUS protocole looks quite complicated [7] for a FPGA implementation. Then, I choose to use an Arduino Mega 2560 because I thought it would be the easiest way to monitor the internal sensors of the Regulator with my current tools (Mistake?).
Then, I plug the SDA (pin 20), SCL (pin 21) and the ground to the board (Is there a difference with the other SCL and SDA pin without number from the Arduino Mega?). I read that the Arduino has already the pull up resistor activated (is it?). Unfortunately, I don't have any tools which could help me checking the level of the voltage, it should be compatible. I just assume that it should work since the I2C scanner was able to find all the address on the bus and the I2C speed check (is it enough?).
The problem now is, when communicating (see code below) I receive frame which do not correspond to what I am looking for. For exemple, using the command list from Infineon [6], when I try to access to the address register 0x88, I receive 0. However other addresses send informations, especially the adresses which are not referenced by the Infineon list [6]. You can find attached the Figure 57 of the Infineon datasheet [4] showing how to communicate with the device using I²C.
The code show an I²C transmission with 0x12 as the regulator address shown by the schematic [3]. This address has also been found by the I2c scanner [8]. The command I need to use are the output voltage 0x8B, the output current 0x8c and the power consumption 0x96 and all of them return 0.
#include <Wire.h>
/* Address */
byte VCCINT = 0x12;
/* Command */
byte VIN = 0x88;
byte VOUT = 0x8B;
byte IOUT = 0x8C;
byte PMBREV = 0x96;
/* Register values */
byte Vreg = 0;
/* Function Prototype */
byte ByteRequest(byte DeviceAddr, byte Command);
void setup() {
Serial.begin(9600);
Wire.begin();
Wire.setClock(100000L);
}
void loop() {
Vreg = ByteRequest(VCCINT, VOUT);
delay(2000);
}
byte ByteRequest(byte DeviceAddr, byte Command){
byte ReceiveData = 0x00;
int wen = 0;
Wire.beginTransmission(DeviceAddr);
Wire.write(Command);
wen = Wire.endTransmission((uint8_t) true);
if (wen != 0) {
Serial.print("endTransmission error ");
Serial.println(wen);
}
Wire.requestFrom((uint8_t) DeviceAddr, (uint8_t) 1, (uint8_t) true);
if (Wire.available()) {
Serial.print("0x");
Serial.print(Command, HEX);
Serial.print(":");
ReceiveData = Wire.read();
Serial.println(ReceiveData, HEX);
} else {
Serial.println("No data on bus\r\n");
}
return ReceiveData;
}
I already read several post on the Arduino forum which are similar but none of them helped me :
https://forum.arduino.cc/index.php?topic=522660.0
https://forum.arduino.cc/index.php?topic=171560.0
https://forum.arduino.cc/index.php?topic=61272.0
I also tried to use the I2cmaster library but I've got the same result than the Wire library.
Please help me!
Thank you very much,
[1] Product Link, Avnet: Quality Electronic Components & Services
[2] User guide of AES KU040 Board, Avnet: Quality Electronic Components & Services
[3] Schematic of the board, Avnet: Quality Electronic Components & Services
[4] Infineon IR38060 datasheet, https://www.infineon.com/dgdl/Infineon-IR38060M-DS-v03_16-EN.pdf?fileId=5546d4625c167129015c3291ea9a4cee
[5] Technical information on Manhattan style, https://www.infineon.com/dgdl/Infineon-IR3806x_programming_guide-AdditionalTechnicalInformation-v01_01-EN.pdf?fileId=5546d462533600a40153573f948c3e83
[6] Command list for I2C transmission, https://www.infineon.com/dgdl/Infineon-UN-0060-AN-v01_00-EN.pdf?fileId=5546d4625a888733015a8bc8665d7c77
[7] PMBUS protocole reference, http://pmbus.org/Assets/PDFS/Public/PMBus_Specification_Part_II_Rev_1_0_20050328.pdf