AnsweredAssumed Answered

Spurious interrupts when using _mcf52xx_int_mask from BSP

Question asked by Johan Bezem on Jan 26, 2010
Latest reply on Jan 28, 2010 by Johan Bezem
When using MQX/BSP to handle individual interrupt enbale/disable functionality,
we occasionally (between 5 and 72 hours from start) get a spurious interrupt,
indicating that an interrupt "disappears" between being detected and the end of
the IACK cycle.
We suspect that a disable interrupt is performed when the interrupt controller is
busy determining the actual vector to use, handling levels and priorities and such.
I took a look into the MQX source tree for 3.40 (we're still using 2.50, working
to go to 3.4 in due course, but there's no real difference) and saw that the BSP
functions to enable/disable individual interrupts, e.g. _mcf52xx_int_mask from
various BSP's, do not generally disable/enable interrupts to set/clear the
corresponding bits.
And since I couldn't find anything on this in the MQX docs (possibly doesn't belong
there), I'd thought to ask here: Isn't it necessary to disable interrupts before
setting/resetting the individual mask for a single interrupt source? Or at least
put a comment in the source that a caller is himself responsible for disabling
interrupts when such a function is called?
Take a look at, for instance, _mcf5227_int_mask in int_ctrl_mcf5227.c in the
standard MQX 3.40 distro. When called with a level lower than the interrupt level
of the interrupt being masked, a spurious interrupt might be generated.
A brief comment to that effect would have saved us quite some searching and
debugging.
Or am I overlooking something?

BR,

Johan

Outcomes