Is there a seqeunce of commands to be followed while changing the interrupt assgined to an interrupt channel during runtime without resetting the BMI160?
For eg, I have High-G Interrupt configured on the INT-1 pin. When a condition is hit in my code, I would configure Low-G Interrupt to INT-1 pin.
bmi160_ set_ int_ config() can be used to reconfigure interrupts.
If you configure the interrupt as latched mode, the interrupt will be cleared after reading the interrupt status register.
For your description "For eg, I have High-G Interrupt configured on the INT-1 pin. When a condition is hit in my code, I would configure Low-G Interrupt to INT-1 pin.", BMI160 has two interrupt pins, INT1 and INT2. You could map high-g to INT1 and low-g to INT2.
Just to confirm, would reading the interrupt status register clear the latch even if it is not permanently latched but is latched for a specific time duration? For eg, if it was configured to be latched for 80ms(BMI160_LATCH_DUR_80_MILLI_SEC).
And the scenario I had described was for a sitatuion where the INT2 pin was already used for a different interrupt, for eg DREADY. So I would still need to switch the interrupt on INT1.
You could refer the following behavior for your application.
BMI160 I2C TAP interrupt non latch: if you set interrupt without latch, interrupt signal will be released rapidly.
BMI160 I2C TAP interrupt 80ms latch: