[Moved] Interrupts in ARM lpc2378.....Urgent please!!!!!!!!!

Status
Not open for further replies.

harinisas

Newbie level 6
Joined
Feb 28, 2012
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,372
Hi all
i have written a simple code for IRQ interrupt which should display one led pattern before interrupt and other after interrupt has occurred. the interrupt is an external interrupt EINT0. i dont have any errors in code i even made changes in the startup file but even then i am not able to see the output on the board after loading it.......pls say what d error is and what changes i should i make in startup file for intterupts so dat i get the output ..
its urgent pls hep me.......
the code is


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "LPC23xx.h"
 
void delay(void)                //delay function
{
    int i;
    for (i = 0; i <=10000000;i++);
}
 
void INT0_ISR() __irq
{
    FIO2CLR = 0X000000FF;
    delay();
    FIO2SET = 0X000000AA;
    EXTINT = (1 << 0);      // Clear the Interrupt Flag for EINT0
    VICVectAddr = 0;
}
 
 
int main()
{
    FIO2DIR = 0X000000FF;
    FIO2CLR = 0X000000FF;
    PINSEL4 = (1 << 20);
    EXTMODE = 0X00;             // Set as Level Sensitive
    EXTPOLAR = 0X00;            // Set as low active
    VICIntSelect = 0X00;        // Set VIC Interrupt slot as IRQ Request
    VICVectPriority14 = 0X00;   // Set the Higest priority for the VIC Interrupt Slot
    VICVectAddr14 = (unsigned) INT0_ISR;    // Load the ISR Address to Address Register
    VICIntEnable = (1 << 14);               // Enable the INT0 Slot
 
    FIO2SET = 0X00000055;
 
    while(1);
    return 0;
}

 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…