I am trying to interface MMA8451Q accelerometer present in the FRDM-K20D50M board, I am having issues with the Interrupt. The accelerometer is working fine but somehow my interrupt is not being triggered. I have tried according to the specification given in the datasheet. but it is not working. I am able to poll data without interrupt but I want to extract it only when interrupt is triggered when data ready generates the interrupts, I have changed the polarity of interrupt to active high and also to push-pull configuration , and have set the data ready flag to interrupt 1 pin. I have attached the code along with accelerometer datasheet and FRDM user manual , please go through it and let me know where I am doing something wrong, I have tried with all interrupt configuration i.e rising edge, falling edge, both edge, high level, low level but it is not going in ISR function. If simultaneously I poll the data then I can see the interrupt pin changing the polarity on oscilloscope but still not entering the ISR. My program hangs when I configure the interrupt to low level. Thanks in advance.
Original Attachment has been moved to: Accelerometer.zip