This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem in FIQ with ecos for arm(at91sam7x)


Paul D. DeRocco wrote:
>> From: Mervin J
>>
>>     As you told, there is some problem with stack pointer handling.Since
>> the program behavior is not predicable with FIQ but works well with IRQ.
>> How can i handle FIQ as it is,without taking it to IRQ level.
> 
> I'm wondering why you're using FIQ at all. The only legitimate reason I can
> think of for trying to get FIQ to invoke an eCos ISR is that you've got some
> external device that's hard-wired to the FIQ pin, and you can't change the
> board. Otherwise, if you don't mind the overhead of the standard eCos
> ISR/DSR mechanism, then you'd do better to use a regular interrupt.
> (Remember, you can make any PIO line an interrupt input, although all such
> PIO lines would share an ISR.)
> 
> If you're using FIQ because you want the lower overhead, then routing it to
> an ISR is probably not what you want. FIQ is most useful for implementing a
> software-based smart DMA-like system, where the only thing the FIQ handler
> does is some simple I/O, and not invoking an ISR until some buffer is full
> or empty. In that case, you should be writing it in assembler.

Indeed.  I tried to make the FIQ handling the same as IRQ handling
back when the ARM port was originally done (ca 1998).  Experience
has shown that this probably doesn't make sense and the best way
to handle FIQ (if you need them at all) is to install your own
IHR (interrupt handling routing), typically written 100% in assembler.

Try looking at the audio handling in the Cirrus EDB7xxx platform.
It uses an FIQ routine to perform DMA like feeding of the audio
chip.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]