Hello Alice,
Thanks, but I already tried this before, but nothing change. Is there something wrong with this part? I tried to modify the priority from the I2C and ExtInt too, but the result is allways the same.
MMA1_WriteReg8(0x2A, 0x08); //Standby mode and 400Hz
vTaskDelay(1);
MMA1_WriteReg8(0x1D, 0x17); //Enables Z-axis, Latch (ELE = 1) and enables Motion Function setting HPF_BYP
vTaskDelay(1);
MMA1_WriteReg8(0x1F, 0x08); //Threshold set to 0.5G
vTaskDelay(1);
MMA1_WriteReg8(0x20, 0x01); //Count one event
vTaskDelay(1);
MMA1_WriteReg8(0x2D, 0x20); //Enable Transient function enabling interruption pin
vTaskDelay(1);
MMA1_WriteReg8(0x2E, 0x20); //Enable Interruption INT 1
vTaskDelay(1);
MMA1_ReadReg8(0x0C, &state); //Reading INT_SOURCE to CLEAN INT1
vTaskDelay(1);
MMA1_ReadReg8(0x1E, &state); //Reading TRANSIENT_SRC to CLEAN INT1
vTaskDelay(1);
MMA1_Enable();