spurious interrupt?

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

spurious interrupt?

627 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ToBeFrank on Sun Aug 07 20:49:25 MST 2011
I've got a situation where an interrupt is firing where it has nothing to do, and I don't understand why. The following link shows the interrupts:

[IMG]http://knowledgebase.nxp.com/attachment.php?attachmentid=522&stc=1&d=1312775162[/IMG]

The yellow trace shows the entry and exit of the IRQ handler. The green trace is the entry and exit of each interrupt bit I am handling in the IRQ handler. As you can see, two interrupt bits are set the first time the IRQ handler is called, one bit the second time and none the third time. Why would the IRQ be called if there are no interrupts to handle? Note that this doesn't cause me any problems, I'd just like to understand why this is happening. Also note that this doesn't happen every time this IRQ is called, just occasionally.

I'm using a LPC11C24.
0 Kudos
Reply
2 Replies

603 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ToBeFrank on Mon Aug 08 08:44:43 MST 2011
I fixed it. You can get a spurious interrupt if you clear an interrupt flag late in the handler. I moved the clear to the beginning of the handler and the spurious interrupt is gone.
0 Kudos
Reply

603 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Aug 08 00:57:23 MST 2011
Are you planning to show us your (interrupt) code are we just talking about magic things :)
0 Kudos
Reply