Problems TLE493D-W2B6 using Wake-Up mode and \INT FASTMODE

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
Danie
Level 1
Level 1
First like given 5 sign-ins First reply posted

Hello all,

I am currently working on a prototype for an IoT device for which we intend to use the TLE493D-W2B6 3D magnetic Hall sensor with I2C interface and wake-up function.
We have special interest in this device because of it’s low power usage, high measurement frequencies and the option to enable (Wake Up) interrupts to signal when a certain threshold is passed. I already send a direct message a few weeks ago, but got no response so far. Hopefully someone here is able to help or came across the same problem.

For creating the prototype we made use of the code given as example in the following github codebase: https://linklock.titanhq.com/analyse?url=https%3A%2F%2Fgithub.com%2FInfineon%2FTLE493D-3DMagnetic-Se...

Problem:
In the Tle493d.cpp file the following bugs were mentioned:
@bug reset sequence freezes the W2B6 sensor, fast mode not working
@bug User manual recommands INT=0 in fast mode however only disabling INT works
@bug wake up mode not configured correctly (WA bit = 0)
//User manual recommands INT=0 in fast mode however only disabling INT works
When trying to enable Wake Up functionality in the FASTMODE we indeed stumbled upon these bugs and were not able to make the functionality work. As mentioned in the bug not even the normal interrupts seem to function properly to signal when a measurement is ready. It seems like the WA is not enabled because there goes something wrong in the parity check.

Questions:
- Is there a known solution to the bugs that have been mentioned in the problem part of this mail such that the Wake Up interrupts can be created in FASTMODE?
- Is it possible to update the firmware of the device such that these problems are solved?
- If the problems cannot be solved, is there another device that you can recommend that has similar functionalities as the TLE493D.
For such a device it is most important that it is suitable for an IoT device, which implies energy efficiency and feeding with a simple battery. Beside that it should be capable of a sample frequency of at least 5 kHz and have the option to enable interrupts when a certain threshold has been passed at the high measurement frequency.

Any help is appreciated!

Kind regards

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

Hi @Danie ,

The bugs mentioned in this request refers to the related demo kit and it's software and NOT to the Sensor.
From sensor point of view the Wake-Up function can be combined with Fast mode and the INT signal. This can be configured in the configuration bytes in the register map, using a different microcontroller. The microcontroller should be able to handle INT-pulses on the SCL line.
As an alternative, you can use TLI493D-W2BW, which comes with separate /INT pin. Datasheet link: https://www.infineon.com/dgdl/Infineon-TLI493D-W2BW-DataSheet-v01_00-EN.pdf?fileId=5546d46273a5366f0....

Thanks and regards,
Yashraj

View solution in original post

0 Likes
9 Replies
Yashraj_P
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 25 likes received

Hi @Danie ,

The bugs mentioned in this request refers to the related demo kit and it's software and NOT to the Sensor.
From sensor point of view the Wake-Up function can be combined with Fast mode and the INT signal. This can be configured in the configuration bytes in the register map, using a different microcontroller. The microcontroller should be able to handle INT-pulses on the SCL line.
As an alternative, you can use TLI493D-W2BW, which comes with separate /INT pin. Datasheet link: https://www.infineon.com/dgdl/Infineon-TLI493D-W2BW-DataSheet-v01_00-EN.pdf?fileId=5546d46273a5366f0....

Thanks and regards,
Yashraj

0 Likes

Hi @PalY,

Thank you for your response. I am not using the microcontroller from the demo, but another one that is
capable in receiving interrupts. We only made use of the demo software as a starting point.
All configuration bytes are configured in the register map. This is
checked by reading out all registers after writing to them.
Also the parity check is performed as has been done in the demo kit.
Unfortunately the WA bit stays at 0 and does not go to 1, just as mentioned in the bug of the demo kit.
It is strange that when everything is configured as mentioned in the manual and code is
used similar to the one in the demo kit the device is still not working.

Kind regards

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

Hi @Danie ,

If everything is set correctly, as you mentioned. I suspect CP parity bit in CONFIG register (10H) is the issue here. Please confirm if the parity bit is set correctly, based on the reading of registers.

PalY_0-1667475772794.png

If this does not resolve the issue, you could share the register values after setting up the sensor. An also, confirm which microcontroller are you using.

Thanks and regards,
Yashraj

0 Likes
lock attach
Attachments are accessible only for community members.

Hi @Yashraj_P,

Thank you for your response. The CP parity bit is set with the same calculation as is used in the calcParity() function in the demo-kit, but the issue is still not resolved.
I provided an Excel file with all the register values after setting up the sensor. These values are 8 bit values converted to binary format for better readability.
The microcontroller used is an NXP K64.

Kind regards

0 Likes
lock attach
Attachments are accessible only for community members.
Yashraj_P
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 25 likes received

Hi @Danie,

If you calculate the parity bit CP, based on the register values you sent. It should be 0, but it is set to 1, in the file. I have attached the file with its manual calculation. Since CP is odd parity, it needs to be 0 here. 
Can you write once again to sensor the 10H and check whether WA bit is set and wake up enabled.

Thanks and regards,
Yashraj

Hi @Yashraj_P,

Thank you for your response. Setting the parity bit to 0 results in
WU enabled, so that is great!
I do however not yet completely understand your parity calculation.

As mentioned CP is odd parity.
"In the case of odd parity, the coding is reversed. For a given set of bits, if the count of bits with a value of 1 is even, the parity bit value is set to 1 making the total count of 1s in the whole set (including the parity bit) an odd number. If the count of bits with a value of 1 is odd, the count is already odd so the parity bit's value is 0."
(https://en.wikipedia.org/wiki/Parity_bit)

In the Excel sheet you posted the total count of 1's is an even number, so for odd parity I would expect that the parity bit should be set to 1 to make the total count odd.

Could you please explain why this is not the case?

Kind regards

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

Hi @Danie ,

So, the explanation on Odd parity is correct, since they are calculating it excluding parity bit.
In the Excel sheet I posted the total count of 1's is an even number, that includes the parity bit, in 10H register [10100001]. Thus, it is wrong.

Excluding parity bit the total count of 1's will be 33, so parity bit should be low.
Hope it explains.

Thanks and regards,
Yashraj

 

 

Hi @Yashraj_P,

Thank you for your explanation. It was very clear and helped a lot.
I am now trying to read out the data from the registers of the magnetometer after an interrupt occurred. In the manual of the magnetometer it is stated that in fast mode it is required to use the /INT line for reading data.
I however face the problem that at the moment that the read request is send towards the magnetometer everything seems to freeze and nothing happens. In the demo kit code also the following comments were placed:
- @bug reset sequence freezes the W2B6 sensor, fast mode not working
- @bug User manual recommends INT=0 in fast mode however only disabling INT works

I receive the interrupts, but I am not able to read the data. I wait until the SCL line is up before sending my command, but that does not change anything.

For another magnetometer I read that there is a problem with ADC conversions still happening causing a freeze.

Do you perhaps have a suggestion on how to solve this problem. That would be greatly appreciated.

Kind regards


Manual requiring the use of /INT:

Danie_0-1667820217899.png

A possible sequence to handle interrupts. I wait until the /INT pin is high. The /INT bit can not be set to 0 in the accelerometer, because this also causes a freeze and the pin itself is needed since it is also the SCL clock line:

Danie_1-1667820217904.png

 

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

Hi @Danie ,

We can't enable Collision Avoidance with Fast mode. This could pose a problem since there is a danger of getting a collision with I2C clock and INT pulse during readout. 
But if you want to use Fast mode only,
1. you have to use I2C clock speed ≥ 800 kHz, typically 1 MHz.
2. Disable CA, that is, set CA bit high on 11H(Mod1) register, calculate FP bit again (and set accordingly).
Alternatively, you can use TLI493D-W2BW, which comes with separate /INT pin, to be used in Fast Mode.


Otherwise with TLE493D-W2B6, you could use it in Master-Controlled Mode, and enable Collision avoidance and /INT. And almost get the same measurement speeds as in Fast Mode.

Thanks and regards,
Yashraj