Managing data/FIFO interrupts on the FXOS8700CQ

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

Managing data/FIFO interrupts on the FXOS8700CQ

796 Views
mike_durian
Contributor I

My question is similar to another recent question in this forum, but I think it is different enough to warrant its own post.

I'd like like to run the accelerometer and magnetometer at different output data rates on the FXOS8700CQ. I'll be running the accelerometer at a higher ODR. Since the accelerometer portion has a FIFO, I don't need to read it as often as the magnetometer, which is good because it will avoid bogging down my system handling the interrupts. But the magnetometer portion does not have a FIFO, so I must read it every time a sample is available.

My question is how do I configure the FXOS8700CQ to generate an interrupt only when there is data ready for the magnetometer portion and not the accelerometer part? It's unclear to me how to gate them independently. Being able to enable interrupts for accelerometer over the high watermark or data ready in the magnetometer is also acceptable (and probably better).

Thanks,

mike

Labels (2)
0 Kudos
2 Replies

550 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Michael,

Sorry for the delay in answering your question, I have been out of the office during the last few days.

You are right, it is not achievable using the FXOS8700CQ.

 

In hybrid mode with both sensors active, the ODR is identical for both the accel and mag and can be set using dr[2:0] bits of the CTRL_REG1 register according to Table 35.

pastedImage_48.png

 

All possible interrupt sources and routing configuration is shown in Fig.10.

pastedImage_49.png

 

Routing to either INT1 or INT2 pin is done using bits in the CTRL_REG5 register.

pastedImage_50.png

Best regards,

Tomas

0 Kudos

550 Views
mike_durian
Contributor I

Following up to my own post. After digging into things a bit more, I realize that I can't really do what I want. You cannot configure the accel and mag ODR rates separately. Which means I can't run the mag slower than the accel and if I don't want to lose any mag data, I need to be prepared to service an interrupt at the ACCEL_ODR_HZ rate.

Alternatively, I can intentionally ignore some mag data and use the watermark interrupt on the accel FIFO instead of the data ready interrupt. Then I can set the FIFO watermark to control the accel data to mag data ratio. E.g. if I want a mag data rate that's half the accel ODR, I'd set the watermark to 2. If I want a 4:1 ratio, I'd set the watermark to 4.

0 Kudos