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 tried to execute a timer program in ARM7- LPC2148 series.....but i got a problem in matching the vector address....can anyone help me to find a solution for this....
this was the program
#include "lpc21xx.h"
void initTimer(void); //void initPLL(void); void T0ISR(void) __irq;
int main(void) { initTimer(); while(1) { __nop(); } return 0; }
void initTimer(void) { VPBDIV=0x00000002; // 60 MHz - Div by 6 T0IR = 0x00000000; IODIR1=0x000F0000; // P1^16 =LED --> Output T0PR = 0x0000001E; // Clk => 1 MHz => 1 uSec T0TCR= 0x00000000; // Disable Timer0 T0MCR= 0x00000003; // T0MR0= 10000000; // Count upto 1 Sec duration T0TCR= 0x00000001; // Enable Timer0 VICVectAddr4=(unsigned) T0ISR; VICVectCntl4=0x00000024; // Timer 0 - Slot VICIntEnable |=0x00000010; // Enable Timer 0 Interrupt }
void T0ISR(void) __irq { IOPIN1 ^= 0x00010000; T0IR |= 0x00000001; VICVectAddr = 0x00000000; }