Accelerometer External Interrupt on LPC1769

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

Accelerometer External Interrupt on LPC1769

1,130 Views
muhammadarifbi1
Contributor I

I want to trigger a freefall interrupt using the accelerometer module MMA7455 on my base board. I have read the data sheet but I am unclear how to go about setting it to an EINTx interrupt handler. The accelerometer is connected as such: INT1/DRDY -> P2.5 & INT2 -> P1.8. Attached is my code in the limited accelerometer library I was given. I have very little understanding on how to configure the registers and pins so any help is greatly appreciated.

Original Attachment has been moved to: acc.c.zip

Labels (1)
0 Kudos
1 Reply

545 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Muhammand,

I would recommend you to use the following document created by a colleague as reference on how to initialize and configure the accelerometer:

MMA8451Q -Single Tap Detection Bare metal example project 

About the LPC part, you can use the LPCOpen periph_pinint example that demonstrates use of the GPIO pin interrupts and the periph_i2c that shows how to use I2C interface in master and slave mode using POLLING/INTERRUPT method.


Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos