AnsweredAssumed Answered

ADXL345 INACTIVITY INTERRUPT

Question asked by DESMODUCATI on Jul 17, 2013
Latest reply on Jul 19, 2013 by neilzhao

I am having a little trouble with the ADXL345 and inactivity interrupts.  My initialization subroutine is below and it works fine, the device interrupts as expected,however, it also generates an interrupt immediately after initialization which is not desired.

 

Thanks for your help.

 

INITIALIZE_ACCELEROMETER_FOR_INACTIVITY:

 

    CALL STANDBY_MODE                                                ;    2D    00    POWER_CTL   

    CALL DATA_FORMAT                                                    ;    31    00    DATA_FORMAT

    CALL INTERRUPT_MAP                                                ;    2F    08    INT_MAP

    CALL INTERRUPT_AXIS_ENABLE                                ;    27    07    ACT_INACT_CTL

    CALL INACTIVITY_THRESHOLD                                    ;    25    88    THRESH_INACT

    CALL INACTIVITY_TIME                                                    ;   26    10    TIME_INACT

    CALL DATA_RATE_AND_POWER_CONT                    ;    2C    0A    BW_RATE

    CALL INTERRUPT_ENABLE                                            ;    2E    08    INT_ENABLE

    CALL MEASURE_MODE                                                ;    2D    08    POWER_CTL   

    CALL READ_INTERRUPT_REG                                    ;    B0    XX    INT_SOURCE

    RET

Outcomes