We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want to write function for fiq interrupt on LPC2378, Here the program which I have try to run. But it gives error.
void T0isr(void) __fiq //__irq {
T0IR = 1; /* clear interrupt flag */
T0TCR = 0;
Enable_Timer1();
T0TCR = 1;
VICVectAddr=0xff; }
void Timer0_Init(int interval) { /*Load prescaler for 1mSec*/
T0PR=PRESCALER; /** * T0TCR: Timer 0 Control Register * 2: reset counters (both timer and prescaler) **/
T0TCR=2; /* * interrupt and clear when counter=match */
T0MCR=3; /* * interrupt every ms */
T0MR0=interval;
/** * T0TCR: Timer 0 Control Register * 1: enable counting **/
T0TCR=1;
// VICVectAddr4= (unsigned)T0isr; // Set the timer ISR address // VICVectCntl4= 0x00000020 | 4;
VICIntSelect = 0x00000010; VICIntEnable= 0x00000010; }
this program give error
freq.c(184): error: #130: expected a "{"
This program is running for irq but not for fiq....... If anyone know the method of writing a fiq ... please reply to me
Andy, I know error & how to find it. I think you not able to understand my problem, if I am not explain my problem neatly then I am sorry & listen again.
Actually I am not able to find out syntax for defining fiq in Keil, In my program I am commented irq syntax, which running neatly.... But when I am converted it for fiq interrupt, I am not understand some things 1) How to give interrupt handler address? 2) Syntax for fiq. 3) Compiler gives error which is explain already...why? above both problems are not occurred in irq.
If you have any solution please explain me..
Thanks to reply... Ani