Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

fiq handler (iar:ERR vs gcc:OK)

2005-03-15 by Pawel Sikora

Hi all,

I'm currently testing the new embedded workbench
eval 4.20a. I have a software that perfectly works
with gcc-3.4.x but doesn't work with IAR.
I think the problem is in the IAR specific FIQ
handling. I'm using mulitple IRQs and the
only _one_ FIQ in my embedded system.

The IRQ handler works fine with boths compilers.

typedef void (*visr)();

#ifdef __GNUC__
__attribute__((interrupt("IRQ")))
#else
__irq __arm
#endif
void irq_handler(void)
{
    ((visr)VICVectAddr)();
    VICVectAddr = 0;
}

The FIQ handler works only with GCC.

#ifdef __GNUC__
void __attribute__((interrupt("FIQ"))) fiq_handler()
#else
__fiq __arm void fiq_handler(void)
#endif
{
    // some action ...
#ifdef __GNUC__
    T1_IR = 0xff;
#else
    T1IR = 0xff;
#endif
}

[ cite: philips lpc210x datasheet ]

"The fastest possible FIQ latency is acieved when only
 one request is classifed as FIQ, because then the FIQ
 service routine can simply start dealing with that
 device. But if more than one request is assigned to
 the FIQ class, the FIQ service routine can read a
word
 from the VIC that identifies which FIQ source(s)
(are)
 requesting an interrupt"

[ /cite ]

Where is the problem?

Regards,
Pawel.


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.