lpc2388 interrupt is not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpc2388 interrupt is not working

618 Views
mohammadfaizan
Contributor III

Hi,

I am working on RTC, I am getting a difference of 3 second, so i try to calibrate the RTC time, I had generate the 1Hz clock using a timer0, Interrupt Subroutine  is called when Timer Tick is equal to Match register value, code is working fine on simulator but not on my board,  code without interrupt  works fine on board.

Routine code 

__irq void myTimer0_ISR (void) 
{
   long int regval;
   regval = T0IR;
   // RTC_Time set_time;   
   RTC_SEC = RTC_SEC - 3;
   T0IR = ( T0IR | (0x01) );
   VICVectAddr  = 0x00;
}

main 

if(T0TC==T0MR0);
{

   // RTC_Get_Time();
   VICVectAddr4 = (unsigned) myTimer0_ISR;
   VICVectCntl4 = 0x00000024;
   VICIntEnable = 0x00000010;
   VICIntSelect = 0x00000000;

   //T0TCR = 0X00;
}

What I missed here, Please suggest.

Thanks & regards

Labels (2)
1 Reply

482 Views
mohammadfaizan
Contributor III

Solved