I'm working with the BMI088 sensor and I'm making a test to compare the speed between whether getting the data ready is faster through interrupt pin or by reading the register with the get_data_int_status function.
As you can see in the screenshot, what I've noticed is that when I disable the accelerometer with the function disable_bmi08x_interrupt from the example is that the pin I'm using is always 1. This doesn't happen with the gyroscope, which keeps the pin at 0 when it's disabled. I don't know if this is a feature of the sensor not specified in the datasheet.
In this screenshot the interrupt pin is shown on the left and the status obtained with the get_data_int_status function on the right. At first I thought the status was with one step of delay, but if you look closely, in some steps of the loop the interrupts seem arbitrary, so I don't know which one is preferable for getting the data ready interrupt.
Solved! Go to Solution.
Thanks for your inquiry.
By default BMI088 accel interrupt is active low. So when there is no interrupt the interrupt pin stays high. But BMI088 gyro interrupt is active high by default. So when there is no interrupt the interrupt pin stays low.
It is always recommended to use data ready interrupt to read out data registers of the accel and gyro. Therefore, the MCU can work on other tasks instead of keeping polling the interrupt status register. Data ready interrupt and status register are synchronized, which means after the sensor finishes updating the data registers, the data ready interrupt and status register will update at the same time.
In many applications you can use your own timer interrupt to read sensor data. For example, you have 100Hz precise timer interrupt. Then you can set sensors of accel and gyro to 200Hz ODR or higher. In your timer interrupt ISR you can read sensor data and they are always fresh.
I have encountered a similar problem recently, and I am trying to solve it,
thanks for your very useful advice. I think I'll try it
Thank you so much for answering.
Some doubts has been solved about the behavior of the interruptions, although I wasn't able to see the synchronization of the interruption and the status of data ready through the IDE.
I think the best option is to use interrupt pin via microprocessor callbacks, this way it doesn't keep the micro busy asking for status every instance of the loop. Hope this helps someone else.