Hi,
I could not write a code works for FIQ
My code is here:
void InitFIQ(){ VICIntEnClr = 1<<EINT0_INT VICIntSelect = 1<<EINT0_INT; }
In startup file:
Vectors . . LDR PC, [PC, #-0x0120] ; Vector from VicVectAddr LDR PC, FIQ_Addr . . . PRESERVE8 EXTERN PIXCLK_Handler FIQ_Addr DCD PIXCLK_Handler . . IRQ_Handler B IRQ_Handler FIQ_Handler B PIXCLK_Handler
And the handler:
void PIXCLK_Handler(void) __irq // EINT0 FIQ { volatile u16 h; EXTINT = EINT0; // clear interrupt // TO DO !! //VICVectAddr = 0 // Acknowledge Interrupt // no acknowledge in FIQ }
when i use __fiq, it doesn't compile.
Where is my mistake?
Best regards
any idea?
how about posting the compile-time error you get?
Hello Philip Philipov,
you must enable the the interrupt for EINT_0.
VICIntEnable = 1<<EINT0_INT;
Writing a one to register VICIntEnClr disables the Interrupt.
Please see LPC24xx User manual chapter 7.4 VIC registers.
Best Regards, Martin Guenther
Hi, thanks your answers! yes i enable the EINT0, when pressed button. but it doesn't work..
after to enable, the processor blocks.
how do you write a initial code of FIQ?
shall you write an example code for configuration and interrupt routin?