FXOS8700CQ: Magnetometer Offset/Threshold Value Problem 

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FXOS8700CQ: Magnetometer Offset/Threshold Value Problem 

1,162 Views
lukelynch
Contributor III

Hello,

 

I have a problem with my threshold value and offset value on the z-axis off the magnetometer.

 

With no magnets in place, I take a couple of readings and get an average. I then left shift this value one place and write it to the M_OFF_Z register to account for the natural magnetic field of the earth. This works perfectly, i take some readings after i have wrote to the registers and the readings are roughly 0.

 

My problem is when with the threshold value i feel. With my offset done, i put a magnet in place, take a couple of readings to get an average, I then directly write this number(absolute, not shifted etc) to the z-axis Threshold register. I then go to test this to make sure its all ok (when the magnetic field strength on the z-axis exceeds that of the threshold value it will generate an interrupt). But my interrupt is generated before it can reach the value of the threshold value. My interrupt is generated exactly my threshold value minus my offset value (before been left shifted).

 

From my understanding from the datasheet:" The thresholds for each axis are applied after the magnetic data has been adjusted by the offset values stored in the M_OFF_X/Y/Z registers when M_CTRL_REG3[m_raw] = 0".  my m_raw is 0.

 

From what i can see my offset is ignoring by threshold. Can anyone help me with this?

 

Regards,

Luke.

Labels (1)
0 Kudos
4 Replies

633 Views
aswins
NXP Employee
NXP Employee

Hi Luke,

                 Greetings!.The problem is currently under investigation with the design team for FXOS8700. It will be resolved in a week.Will update you shortly.

Thanks for your patience.!

Regards

Aswin

0 Kudos

633 Views
michaelestanley
NXP Employee
NXP Employee

Luke,

Has Aswin covered this in the other thread, or do we need to pull him in here?

Mike

0 Kudos

633 Views
lukelynch
Contributor III

I don't think this specific problem has been covered in the last topic.

Aswin help would be great.

0 Kudos

633 Views
reyes
NXP TechSupport
NXP TechSupport

aswins can you please take a look at Luke's question from above, please?

0 Kudos