Hi,
Did someone ever used the Infineon Optiga Trust X module with Arduino using I2C Wire library ?
Here is the technical documentation
I’m trying to get the I2C_STATE register data but I don’t receive anything after the Wire.requestFrom()
Thanks
Full code :
#include <Wire.h>
#define PIN_RST 8
#define PIN_VDD 9
void setup() {
pinMode(PIN_RST, OUTPUT);
pinMode(PIN_VDD, OUTPUT);
digitalWrite(PIN_RST,LOW);
digitalWrite(PIN_VDD,LOW);
Serial.begin(115200);
delay(2000);
Wire.begin(); // join i2c bus (address optional for master)
digitalWrite(PIN_VDD,HIGH); // sartup the Trust X module
digitalWrite(PIN_RST,HIGH);
delay(15); // startup min delay
}
long val = 9999;
void loop() {
Wire.beginTransmission(48); // transmit to device #48 (0x30)
Wire.write(byte(0x82)); // sends instruction byte
Wire.endTransmission(); // stop transmitting
Wire.requestFrom(48, 4);
while(Wire.available()==0){
}
val = Wire.read(); // Reads the data from the register
Serial.print("val = ");
Serial.println(val);
delay(5000);
}