can't clear MMA8451 interrupt.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

can't clear MMA8451 interrupt.

639 Views
daveforsyth
Contributor I

using MMA8451.  Once interrupt occurs, am reading correct data from source reg but the interrupt does not clear for 1.5s. 

The 1.5s timeframe appears to be automatic and clears regardless of reading the interrupt source register.

I have only enabled the x pulse event and correctly read that an event happened and that it was a X-pulse of the correct polarity.  Once the interrupt eventually disappears, the pulse source register correctly shows no event.

I also probed a demo board setting up the toolbox for the same setup.  I see that reading the pulse source register on the toolbox demo (same addresses and data as on my board) do clear the interrupt.

Is there something I need to set in order to enable the clearing of the interrupt by read of the source register?

Thanks,

Dave

0 Kudos
2 Replies

363 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Dave,

Yes, you need to set the ELE bit (enable latch) in the PULSE_CFG register (0x21) to be able to clear the SRC_PULSE bit in the INT_SOURCE register (0x0C) and consequently deassert the interrupt by read of the PULSE_SRC register (0x22), as shown below.

Clearing the interrupt with ELE bit set.JPG

I hope it helps.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

0 Kudos

363 Views
anthonyduhamel
NXP Employee
NXP Employee

Hi Dave,

If I understand (correct me if not) , you're using exactly the same settings (Registers configuration)  on your board and the demoboard? Do you have different hardware set-up?

Can you share code sample / hardware schematic or other informations?

That's really strange it works in only a case, may have minor differences... let's catch it!

Thanks,

Anthony

0 Kudos