Jan 29, 2020
02:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 29, 2020
02:08 PM
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
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
Solved! Go to Solution.
- Tags:
- IFX
1 Solution
May 10, 2022
05:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 10, 2022
05:55 AM
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:
- You need to set PR bit in 0x11 register. To set the sensor in one-byte mode.
- Then the CA bit should be 0 and INT bit should be set to 1, to enable Clock stretching and disable /INT
- Set the register in Master Controlled Mode by setting Mode bits to 01.
- Thus write to 0x11 (MOD1) register the value 0x15.
- 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.
- After this you can start reading from the register.
Best Regards,
Yashraj
2 Replies
Apr 02, 2020
09:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 02, 2020
09:19 PM
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.
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.
May 10, 2022
05:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 10, 2022
05:55 AM
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:
- You need to set PR bit in 0x11 register. To set the sensor in one-byte mode.
- Then the CA bit should be 0 and INT bit should be set to 1, to enable Clock stretching and disable /INT
- Set the register in Master Controlled Mode by setting Mode bits to 01.
- Thus write to 0x11 (MOD1) register the value 0x15.
- 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.
- After this you can start reading from the register.
Best Regards,
Yashraj