01-14-2020 09:43 AM - edited 01-14-2020 10:27 AM
My current problem with the sensor is the orientation interrupt. I wish to get it to fire on every single orientation change, but sometimes the interrupt is silent even though I can see that the orientation status flags have changed values.
Is this the expected behavior when turning off all orientation blocking?
My configuration for orientation is as follows:
ORIENT_1: 0100 0000, 0x40
ORIENT_0: 0000 0010, 0x02
Example output in log, notice that the "Orientation interrupt was triggered..." is not printed after each status update.
-------- bmi_irq_work_func, STATUS_<3:0> --------
0x1f | [0101 0000]
0x1e | [0000 0000]
0x1d | [0000 0000]
0x1c | [0100 0000]
Orientation interrupt was triggered, new value is 0x50.
-------- bmi_irq_work_func, STATUS_<3:0> --------
0x1f | [0110 0000]
0x1e | [0000 0000]
0x1d | [0000 0000]
0x1c | [0000 0000]
-------- bmi_irq_work_func, STATUS_<3:0> --------
0x1f | [0101 0000]
0x1e | [0000 0000]
0x1d | [0000 0000]
0x1c | [0100 0000]
Orientation interrupt was triggered, new value is 0x50.
-------- bmi_irq_work_func, STATUS_<3:0> --------
0x1f | [0111 0000]
0x1e | [0000 0000]
0x1d | [0000 0000]
0x1c | [0100 0000]
Orientation interrupt was triggered, new value is 0x70.
-------- bmi_irq_work_func, STATUS_<3:0> --------
0x1f | [0011 0000]
0x1e | [0000 0000]
0x1d | [0000 0000]
0x1c | [0000 0000]
-------- bmi_irq_work_func, STATUS_<3:0> --------
0x1f | [0000 0000]
0x1e | [0000 0000]
0x1d | [0000 0000]
0x1c | [0000 0000]
01-14-2020 10:43 AM - edited 01-14-2020 11:19 AM
2.6.5.2 Interrupt generation and latching
The orientation interrupt is triggered at every change of the int_orient status register value. If
register bit int_orient_ud_en in Register (0x65-0x66) INT_ORIENT is ‘1’, then all bits in the
int_orient register, those indicating the portrait/landscape orientation, as well as those indicating
the upside/downside orientation are considered for the generation of the interrupt condition. If portrait/landscape orientation are considered for the generation of the interrupt condition, while
those bits indicating the upside/downside orientation are ignored. The bit indicating
upside/downside orientation is int_orient<2>, while the bit-field indicating the portrait/landscape
orientation is int_orient<1:0>. If orient_ud_en is ‘0’ then the int_orient<2> status bit is 0.
In case the orientation interrupt condition has been satisfied the orientation relevant fields in
Register (0x1C-0x1F) INT_STATUS are updated.