MMA8451Q Double Pulse Abort and Tap detect

cancel
Showing results for 
Search instead for 
Did you mean: 

MMA8451Q Double Pulse Abort and Tap detect

453 Views
joel_e_shaw
Contributor I

When using the tap detect, the application note AN4072 in Figure 2 describes a pulse consisting of a positive pulse followed by a negative pulse.  Does this result in two taps?  If Double Pulse Abort (DPA) is set, will a full-scale positive followed by a full-scale negative result in an abort condition?  Should I turn off the DPA instead? 

I’m having a hard time determining why I have inconsistent results in my data.

I’ve attached a screen shot that shows an interrupt on the first double-tap, but not after that.  I’ve looked at the data in detail, and feel that the following double-taps should fit the qualifications, but I’m wondering if the DPA is preventing the double-tap from working correctly.

Labels (1)
0 Kudos
3 Replies

148 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Joel,

Just a quick question/suggestion - in your ISR, do you acknowledge an IRQ and read the  PULSE_SRC register (0x22) to clear the SRC_PULSE bit in the INT_SOURCE register (0x0C) and deassert the INT pin?

 

Also I cannot find the screen shot, could you please try to attach it again?

Best regards,

Tomas

0 Kudos

148 Views
joel_e_shaw
Contributor I

Hi Tomas,

Yes, the interrupt is cleared by reading the PULS_SRC register.

Here's the image of the accelerometer data capture and the interrupt.  The interrupt is the vertical red line.  The rest of the lines as the acceleration data captured without the high pass filter turned on.  Pretty much every double-tap looks like it should have triggered the double-tap pulse detect.

OnlyOneInt.png

Thanks,

Joel

0 Kudos

148 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Joel,

Just to be sure, do you acknowledge an IRQ in your ISR by writing a logic 1 to a specific bit of your MCU? Without doing it, the interrupt flag on your MCU will remain active and then you are not able to receive any further double pulse interrupts from the MMA8451Q.

As you can see in our example for single tap, we use:

PORTA_PCR14 |= PORT_PCR_ISF_MASK;          // Clear the interrupt flag   

followed by:

PULSE_SRC_val = I2C_ReadRegister(MMA845x_I2C_ADDRESS, PULSE_SRC_REG);           //Read Pulse Source Register

Best regards,

Tomas

0 Kudos