AnsweredAssumed Answered

How to clean the interruption?

Question asked by Lucas Militao on Nov 13, 2017
Latest reply on Nov 18, 2017 by Alice_Yang

Good night! Please, i'm trying to use Transient Function from MMA8451q, and i want to work with interruption to detect quick movements. But, when i start the program, the interruption is already set... and i dont know how to clean.


MMA1_WriteReg8(0x2A, 0x08); //Standby mode and 400Hz
MMA1_WriteReg8(0x1D, 0x17); //Enables Z-axis, Latch (ELE = 1) and enables Motion Function setting HPF_BYP
MMA1_WriteReg8(0x1F, 0x08); //Threshold set to 0.5G
MMA1_WriteReg8(0x20, 0x01); //Count one event
MMA1_WriteReg8(0x2D, 0x20); //Enable Transient function enabling interruption pin

MMA1_ReadReg8(0x0C, &state); //Reading INT_SOURCE to CLEAN INT1  - I already tried to read this register to clean the interruption... but it's not working.