I2C Communication with TLE493DW2B6

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
User18895
Level 1
Level 1
First question asked
Good day,

I've been trying without success to communicate with my TLE493D devices (I have the A0).

When I scan the I2C bus using a Raspberry Pi or ESP32 the device "sees" it at 0x35. Datasheet specifies that it is actually at 0x6A (read) and 0x6B (write). I have tried to write and/or read, but always receive 0xFF back for all bytes.

I have attempted to read and write in single bytes as well as in two byte words, but no luck. I have also tried writing to the config register to set it to single byte, but I am still unable to read anything on any of the aforementioned addresses (I've been mostly focusing on simply trying to read back the config register).

The board I am using is a custom PCB which simply contains the TLE493D, I2C pullups and decoupling cap. I have looked at the SDA/SCL signals on the scope and they look perfect (nice sharp rise and fall times), and since this seems to be a common issue, I haven't yet tried to decode the I2C signals.


The more I dig into it I swear the more I get stumped... It really appears to me that I should be able to write a config value to 0x10 to set it as single byte and without INT etc. and then simply read the values, but I cannot get it to go. When I try to write to 0x6A using i2cset on the Pi it I get a "write failed" message (or similar message).

I have tried without success to use the Arduino code from github (after some code changes I can get it to compile, but it also seems to always read 0xFF from every register.

I'm really keen to get this working, as it really seems like the right sensor for my application, so any help is massively appreciated!

Paul
0 Likes
1 Solution
Yashraj_P
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 25 likes received

Hi @User18895,

1. 0x35 is the 7 bit address of the slave , which is appended by Write/Read bit, that is, 0/1 respectively. That is why full Write/Read is given as  6A/6B.

2. To initiate proper communication with the sensor, you need to do following:

  1. You need to set PR bit in 0x11 register. To set the sensor in one-byte mode.
  2. Then the CA bit should be 0 and INT bit should be set to 1, to enable Clock stretching and disable /INT
  3. Set the register in Master Controlled Mode by setting Mode bits to 01.
  4. Thus write to 0x11 (MOD1) register the value 0x15.
  5. After that you need to enable  ADC trigger on read after register 05H. This can be done by writing 1 to 5th bit of 0x10 (CONFIG) register. Thus 0x10 register should be written by 0x20.
  6. After this you can start reading from the register.

Best Regards,
Yashraj

View solution in original post

0 Likes
2 Replies
User19281
Level 1
Level 1
Have you checked for possible error states of the I2C controller?
When TLE493D starts, it starts sending interrupts via the clock line, and that tends to mess up with I2C controllers.
I managed to get it working by sending a mode change to non-interrupting mode, before the TLE493D tried to interrupt.
0 Likes
Yashraj_P
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 25 likes received

Hi @User18895,

1. 0x35 is the 7 bit address of the slave , which is appended by Write/Read bit, that is, 0/1 respectively. That is why full Write/Read is given as  6A/6B.

2. To initiate proper communication with the sensor, you need to do following:

  1. You need to set PR bit in 0x11 register. To set the sensor in one-byte mode.
  2. Then the CA bit should be 0 and INT bit should be set to 1, to enable Clock stretching and disable /INT
  3. Set the register in Master Controlled Mode by setting Mode bits to 01.
  4. Thus write to 0x11 (MOD1) register the value 0x15.
  5. After that you need to enable  ADC trigger on read after register 05H. This can be done by writing 1 to 5th bit of 0x10 (CONFIG) register. Thus 0x10 register should be written by 0x20.
  6. After this you can start reading from the register.

Best Regards,
Yashraj

0 Likes