Jul 29, 2019
07:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 29, 2019
07:23 PM
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
Write to sensor with 4 bytes
Read from sensor with 7 bytes
Read detals
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
Write to sensor with 4 bytes
Read from sensor with 7 bytes
Read detals
Labels
- Tags:
- IFX
1 Reply
Jul 30, 2019
02:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 30, 2019
02:15 AM
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.
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.