Coldfire (MCF5235) Interrupt Problem

Joel Sherrill joel.sherrill at
Fri May 11 17:25:27 UTC 2012

On 05/11/2012 12:18 PM, Ivica Eftimovski wrote:
> Eric,
> Thanks for the quick reply. The printf was just a dummy there, but I 
> replaced it with the global that increments from zero if the ISR is 
> entered and it has never updated. I must be doing something wrong, but 
> cannot figure out what.
Like Eric, I am not fixing your problem but make sure the
variable is volatile.  Otherwise, the task code may not see
it updated.

Also verify again that before you start polling on the variable
that interrupts are enabled on the processor (SR) and any PIC
if this has one.

Since you are forcing the interrupt, is there any chance, this
is edge-triggered or something that tying it high doesn't show?

Or that you could be getting it continuously and not able to
get back to the task?  Can the ISR do something you can see
like blink an LED?

Sorry for the random stream of consciousness but you
may or may not be triggering the interrupt right, have
enabled it completely, getting to the ISR handler, or
be getting continuous interrupts.  All are possibilities.

> *From:*Eric Norum [mailto:wenorum at]
> *Sent:* Friday, May 11, 2012 12:05 PM
> *To:* Ivica Eftimovski
> *Cc:* rtems-users at
> *Subject:* Re: Coldfire (MCF5235) Interrupt Problem
> On May 11, 2012, at 8:55 AM, Ivica Eftimovski wrote:
> Hi all,
> I am just starting with RTEMS and I am trying to interface the MCF5235 
> BCC board to our existing hardware. I am trying to set it to use 
> *IRQ4, which should have fixed level/priority.
> When I execute the code noted below, the interrupts are disabled 
> properly, the vector seems set and interrupts are re-enabled. But 
> anytime I ground*IRQ4 (default high) line while my example program is 
> running, I do not vector to the ISR.
> I fashioned my code using the clock/network/console code as guide, and 
> those work great.
> Can anyone please give me a hint of what am I doing wrong?
> Not sure about any of the MCF5235 code, but one thing for sure that is 
> wrong is that you must not call printf from an interrupt handler…
> Try declaring a volatile global variable -- increment it in the 
> interrupt handler and print it in the main thread.
> -- 
> Eric Norum
> wenorum at <mailto:wenorum at>

Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list