lpc2388 interrupt is not working

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

lpc2388 interrupt is not working

815 次查看
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

标签 (2)
1 回复

679 次查看
mohammadfaizan
Contributor III

Solved