tlv493d reading problem

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
User17603
Level 1
Level 1
First question asked
I read data from tlv493 via i2c bus with xilinx fpga spartan6.
the setting procedure is:
for low power mode:
1. write data (0x00 0x80 0x00 0x60) to address 0xBC;
2. write data (0x00 0x85 0x00 0x60) to address 0xBC;

for fast mode:
1. write data (0x00 0x80 0x00 0x60) to address 0xBC;
2. write data (0x00 0x86 0x00 0x60) to address 0xBC;

After mode set, int is produced according power mode, it works well, then I read data follow INT signal after 12us.

For the data read from sensor, Bx is right all the time,but By and Bz and Temp is wrong sometimes,when it is wrong, the register 2 to 6 are 0xff.

The other question is that in low power mode FRAM COUNTER is not increment all the time, It even depends on magnetic field intensity, sometimes normal, sometimes abnormal.

I am totally confused!
test picture
3679.attach
Write to sensor with 4 bytes
3680.attach
Read from sensor with 7 bytes
3681.attach
Read detals
3682.attach
0 Likes
1 Reply
User270
Level 5
Level 5
5 solutions authored First solution authored
Excerpt from data sheet ->
Managing correct sensor read outs by the µC:
This sensor does not incorporate shadow-buffers for readout. Thus, it is mandatory to read the sensor data
not during a running conversion to avoid corrupted reads. Ideally, the /INT feature is enabled together with
the low-power or ultra-low power mode and the µC reads the data after the /INT pulse was asserted by the
sensor. Furthermore, the readout needs to be finished before a new conversion is started and the /INT will be
asserted again (if the readout is finished 1 ms before a new /INT pulse, this will be sufficient).

This is the procedure when everything is running well. Please consult the user's manual regarding ADC frame counter hangup -> here
In case there is something wrong you will need to generate general reset (section 5.7.1).

Hope this helps.
0 Likes