TLE493d w2b6 A1's I2C address does not work well and changing itself also

Announcements

Measure CO2 When It Matters - Infineon’s XENSIV™ PAS CO2 now comes in SparkFun Red. Check it now!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User22824
Level 1
Level 1
First question asked
I am having a issue just I wrote in title.
I2C address of Tle493d-w2b6 A1 is changing itself(to A0's address)
I am working this sensor with Arduino nano 33 BLE sense in Arduino IDE, and using code that I have received from Infineon Korea's engineer ( I will call this code as "Magnetic value seeking code").
Code works well when I connect A0 sensor to Arduino Nano, but makes a problem when I connect with A1.
Main problem that drives me crazy is that the I2C address of A1 is changing to A0's address, even if it was well recognized at first time.

This is my Arduino IDE Code for checking I2C address ( I will call this "I2C checking code"):

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#include

void setup() {
Serial.begin (9600);


} // end of setup

void loop() {
while (!Serial)
{
}

Serial.println ();
Serial.println ("I2C scanner. Scanning ...");
byte count = 0;

Wire.begin();
Serial.print("Wire.begin() start");
for (byte i = 1; i < 120; i++)
{
Wire.beginTransmission (i);
if (Wire.endTransmission () == 0)
{
Serial.print ("Found address: ");
Serial.print (i, DEC);
Serial.print (" (0x");
Serial.print (i, HEX);
Serial.println (")");
count++;
delay (10); // maybe unneeded?
} // end of good response
} // end of for loop
Serial.println ("Done.");
Serial.print ("Found ");
Serial.print (count,
DEC);
Serial.println (" device(s).");
}
@@@@@@@@@@@@@@@@@@@@@@@@@@@

when uploading this code on Arduino Nano, it says that ("0x22 is connected")
Yes! This is right address for A1 sensor chip!
Then I upload the "Magnetic value seeking code", fixing some values that were just for A0 sensor into A1 sensor (Engineer just checked the point that I have to correct for me, there will be no issue by the code error).
Well.... it doesn't work.
Then I check the I2C address of the chip again (using the code above).
Then it says that ("0x35 is connected"). It means that A0 chip's address was been detected!
I can't understand what is going on inside the sensor chip or Arduino, but it says that I2C address of chip is A0's, so I change
"Magnetic value seeking code" for A0 sensor setting again.
Then the A1 sensor works well even the I2C address and other values were just setted for A0 sensor.

Because of this Issue, I can't make a I2C bus consisted of A0 and A1 chip(Both of it has a same I2C address).
It can't be the problem of manufacturing, because I bought 15 of A1 chips and all of them had a same issue.

What is the reason of this situation?
How can I fix it?

codes are on my github.
(https://github.com/iby3427/tle493d-w2b6/tree/main)
0 Likes
1 Reply
Ritwick_S
Moderator
Moderator
Moderator
100 solutions authored 25 likes received 250 sign-ins

Hi @User22824 ,

 

There are two bits in the MOD1 register (IICadr), which define the slave address. So, even if it is an A1 sensor chip, but we accidentally wrote 00 instead of 01 (00 for A0 and 01 for A1), the A1 sensor chip will act like an A0 sensor chip.

ritwicksharma_0-1641902384513.png

I went through your code and saw that the IICadr value is correctly defined as 1, which is for the A1 sensor. So, could you please confirm IICadr value was 1 when you observed this issue?

Thanks,
Ritwick

0 Likes