EmbeddedRelated.com
Forums

FIQ Interrupt Doubt

Started by pauloparoribeiro March 7, 2007
Dear LPC2000 Group,

this is my first message, and I started some months ago using the
LPC microcontrollers.
I use the IAR 4.40A Compiler, and the LPC2138.

Im testing both types of interrupts. The VIC is OK, working
properly. I put three VICs to work at the same time: TIMER1, RTC
Increment Interrupt and RTC Alarm Interrupt.

Now, I want to program a interrupt to work as FIQ. So, I tried to
put the TIMER1 as FIQ interrupt, but it doesnt work.

I think that Im having problems when declaring the FIQ function and
its prototype.

My FIQ function:

void IntTIMER1(void) //TIMER1_FIQ
{
LIGA_LED3();
T1IR = 0x00000001; //TIMER1
}

My FIQ prototype:
void IntTIMER1(void);

Can anyone help me with some suggestion or some FIQ example?

Thank you.

Best regards.

Paulo Ribeiro

An Engineer's Guide to the LPC2100 Series

I use the FIQ. I don't know how you have your startup.s file setup, but you need to program the adr for the FIQ_ISR into memory. It works a little different than the VICs. I have something like this in my startup file:

.extern ISR_FIQ /* external proc for FIQ ISR */

ldr pc,[pc,#-0xFF0] /* Setup for IRQ, read VIC */
ldr pc,FIQ_ADR /* ISR for FIQ ints */

FIQ_ADR: .word ISR_FIQ

Then when you define ISR_FIQ in your C code, it will get linked and programmed correctly.

Chris.
This file in Yahoo! Groups might help you:

AN10254_1.pdf
Simple interrupt handling using Timer 1 peripheral on the LPC2106

http://f1.grp.yahoofs.com/v1/sOzvRRyJj-
mBa5puwVbeQdHJTkeZxVmOL71DvqTFWL_9qOkXB-
Y4q96ruRSreMfZEfr5JAvXQF38FzbrRXiXJW66Vj6bf_U/AN10254_1.pdf

Good Luck!

Thiago
Embedded System Engineer
Brazil.

--- In l..., "pauloparoribeiro"
wrote:
>
> Dear LPC2000 Group,
>
> this is my first message, and I started some months ago using the
> LPC microcontrollers.
> I use the IAR 4.40A Compiler, and the LPC2138.
>
> Im testing both types of interrupts. The VIC is OK, working
> properly. I put three VICs to work at the same time: TIMER1, RTC
> Increment Interrupt and RTC Alarm Interrupt.
>
> Now, I want to program a interrupt to work as FIQ. So, I tried to
> put the TIMER1 as FIQ interrupt, but it doesnt work.
>
> I think that Im having problems when declaring the FIQ function
and
> its prototype.
>
> My FIQ function:
>
> void IntTIMER1(void) //TIMER1_FIQ
> {
> LIGA_LED3();
> T1IR = 0x00000001; //TIMER1
> }
>
> My FIQ prototype:
> void IntTIMER1(void);
>
> Can anyone help me with some suggestion or some FIQ example?
>
> Thank you.
>
> Best regards.
>
> Paulo Ribeiro
>