Forums

unexpected interrupt, dsp56858

Started by cwolfatwork February 18, 2003
This one's not earth shaking, but it is a puzzle. I'm using a
dsp56858 evm, without all the SDK 'fog'. As a simple test, I wrote a
handler for the IRQB interrupt, which is generated by a pushbutton on
the eval board. I made the interrupt be edge-triggered. The handler
just sets a boolean variable 'true'. The handler is written in C,
using 'pragma interrupt'; however, no registers are used by the
handler. What I found was that when I pushed the button enough
tries, I would get a bogus interrupt. Sometimes it would be
a 'software interrupt (SWI)' and frequently it would be an interrupt
from the HI8 host interface. There are no 'SWI' instructions in my
code, I'm not using any libraries, I'm not using any SDK code, the
HI8 has no connection, and I've only enabled the IRQB interrupt.
There is no stack overflow. So, any interrupt other than #18 (IRQB)
is bogus. After trying various things, I made the IRQB interrupt be
level-triggered, instead of edge. Now the problem appears to be
gone. Contact bounce comes to mind as a suspect. The button is not
de-bounced in hardware or software, but, so what? Bounce should just
potentially lead to multiple interrupts, of the same source.
Comments?

Chuck Wolf