...implement a FIQ interrupt service routine in C?
Do I need to do anything special to implement a FIQ interrupt service routine in C?
You will need to write the fiq handler in ARM assembly code. You will need to import the device specific _startup.s and crt0.s files into your project. In the crt0.s file you can set the initial values of the FIQ banked registers. In the device specific _startup.s file you can write your fiq_handler.
Your application code will need to program the interrupt controller of the device and call libarm_enable_fiq.
-
The default exception handlers are usually defined as weak symbols, so you don't need to branch to your FIQ handler from the default handler, you just need to name it fiq_handler and it will be linked in instead of the default handler.
-
Michael Johnson
yes please
i'd like to see an example of timer driven FIQ etc...
regards
Peter Scott
-
Hi there,
I'm currently trying to use the FIQ in C language on LPC2138, but I don't know what needs to be edited in the startup.s file and how to manipulate the fiq_handler function. Can you explain to me briefly and send me an example of FIQ as well? Any help will be much appreciated. :P
Regards,
Allen
Please sign in to leave a comment.
Comments
9 comments