Coldfire (MCF5235) Interrupt Problem

Ivica Eftimovski IEFTIMOVSKI at teledyne.com
Fri May 11 18:04:39 UTC 2012


Alan,

Thanks for finding the bug, but that's not it. I tried changing it to "_level" and "_old_handler" (thanks Ric Claus), and didn't change anything. The function that calls the #define has "level" defined (I copied the function code into a #define to prevent the compiler optimization), thus it worked with both "level" and "_level". Sloppy, must admit.

I have tried with the no optimization too, and the code that I posted was amalgamation of different things I have tried.

I have also tried calling "rtems_interrupt_catch" and "_CPU_ISR_install_raw_handler" to no avail. When I examine the vector table, it seems fine, but I cannot get it to vector to an interrupt handler.

If it means anything, I am using RTEMS 4.10.2.

Ric,

The purpose of the cocktail of #define with do/while is to avoid compiler optimization, which tends to rearrange the code sometimes, or optimize out statements that it thinks should not be there.


Joel,

I have my scope monitoring the *IRQ4 line, and I can see when I ground it physically. I have also tried all other interrupt lines from IRQ2 to IRQ7 (thinking that maybe a trace is bad) and I still don't have it running. I've changed the board too.

I appreciate you guys trying to help me, but my problems continue.

Best regards,

Ivica Eftimovski





In the macro below you use "_level" but in the rtems_interrupt_enable call you use "level" without the underscore.

Could that be a problem?

Alan

On May 11, 2012, at 11:55 AM, Ivica Eftimovski wrote:


#define TPUInterruptSetHandler(_level,_vector,_old_handler)  \
     do {                                                     \
           rtems_interrupt_disable(_level);                     \
           MCF5235_INTC0_IMRL &= ~(MCF5235_INTC0_IMRL_INT4 |    \
                     MCF5235_INTC0_IMRL_MASKALL);                 \
           handle_status = rtems_interrupt_catch(TPUInterruptHandler, \
                     TPU_INT_VECTOR, &old_handler); \
           rtems_interrupt_enable(level);                       \
     } while(0)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120511/5539302f/attachment-0001.html>


More information about the users mailing list