This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ISR is not excuting any body help

Hi every body i am using lpc2129 , compiler is keil uvision 4 in simulation(debugging) mode isr is not executing any body help me .im not able to find the whats the problem.i have write code for timer match interrupt.in this code no errors no warnings. isr is not excuting...

#include<lpc21xx.h>
unsigned long test=0;
void toisr(void) __irq
{ test++;
toir=0x1;
VIcvectaddr=0x00;
} void Init_PLL(void)
{ PLLCFG = 0x24;

/* Enable PLL0 */ PLLFEED = 0xAA; PLLFEED = 0x55; PLLCON = 0x01; PLLFEED = 0xAA; PLLFEED = 0x55;

/* Update PLL Registers with Feed Sequence */ PLLFEED = 0xAA; PLLFEED = 0x55;

// Check the Lock Bit while(Is_Bit_Clr(PLL0STAT,BIT10));

PLLCON = 0x03; PLLFEED = 0xAA; PLLFEED = 0x55; MAMCR = 0x02; MAMTIM = 0x04; VPBDIV = 0x01; // PCLK = CCLK
} void Init_Timer0(void)
{ Set_Bit(PCONP,BIT1);// T0PR = 59;

T0MR0 = 999; /* 1mSec = 1000 -1 counts */

T0MCR |= (1<<BIT1) | (1<<BIT0); /* Interrupt and Reset on MR0 */

}
init_vic()
{ VICEnclr=0x00; VICVEctaddr=(unsigned long)t0isr; VICcntl=0x24; VICIntenble=(1<<4);
} int main()
{ Init_pll(); Init_Timer0(); init_vic(); Totcr|=(1<<0); while(1);
}

Parents
  • Don't you believe in all the good code examples available, that also happens to cover your processor and the use of the timers?

    Please use the PRE tags when posting source code. There wouldn't be any "Tips for Posting Messages" above the message input box if it wasn't valuable to read and use.

    As it is, we can't even see if your code is even performing any T0PR = 59; which would imply that the previous source code line had an empty one-line comment...

Reply
  • Don't you believe in all the good code examples available, that also happens to cover your processor and the use of the timers?

    Please use the PRE tags when posting source code. There wouldn't be any "Tips for Posting Messages" above the message input box if it wasn't valuable to read and use.

    As it is, we can't even see if your code is even performing any T0PR = 59; which would imply that the previous source code line had an empty one-line comment...

Children
No data