Program not entering interrupt handler despite being triggered.

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

Program not entering interrupt handler despite being triggered.

663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mngeowcy on Thu Apr 02 13:25:07 MST 2015
I have been trying to program a code for my school project with the LPC1769 , which is connected to a LPCXpresso Base Board. For now , I want my code to be able to access the handler once the light intensity value ( detected by the light sensor ) goes above 300. I have already configured my interrupt pin which is connected to the light sensor and enabled EINT3. However the program does not seem to access the handler at all.

I have tried troubleshooting but I'm unable to find out why it doesn't access the handler. Is there a step I forgot to include?

Thanks for the help. The program is attached below.

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

0 Kudos
6 Replies

466 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Tue Apr 07 00:50:22 MST 2015

Quote: mngeowcy
The interrupt flag itself is triggering ,  but not the pin.


Which interrupt flag, the one in the GPIO or the one in the NVIC? How did you check it?

Are your interrupts enabled globally?
0 Kudos

466 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Sat Apr 04 09:26:46 MST 2015
Forums should be two-way.

Please share your findings. Note that even 'silly' mistakes corrected can help others.

Mike.
0 Kudos

466 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mngeowcy on Sat Apr 04 08:25:12 MST 2015
Thanks R2D2 , I reduced the code to a minimum and I managed to isolate the problem. I have already found a solution to it.
0 Kudos

466 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Apr 03 02:56:47 MST 2015

Quote: mngeowcy
Yes my light sensor is feeding the pin with an active low signal.



Then reduce your code to the minimum. A working sample is shown in:

http://www.lpcware.com/content/forum/lpc1769-problems-with-gpio-interrupt

Which toolchain are you using? LPCXpresso?

If so, export and post the (reduced) project...
0 Kudos

466 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mngeowcy on Thu Apr 02 22:26:34 MST 2015
Yes my light sensor is feeding the pin with an active low signal. My code will printf the light sensor value every 3 seconds. The interrupt flag itself is triggering ,  but not the pin.
0 Kudos

466 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Apr 02 14:08:23 MST 2015
So your light sensor is feeding this pin with a high signal (if it's value is >300) ?

If so, did you try to trigger the interrupt with a high signal?

Did you measure the light sensor signal to confirm that is it switching at 300?
0 Kudos