<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>PROBLEM IN TIMER MATCH REGISTER INTERRUPT.</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25654/problem-in-timer-match-register-interrupt</link><description> 
hi, 
I have written code that generate Interrupt on Timer-0
match.(LPC2138) 
But problem is that when I debuge the code in Keil Complier it does
not go to ISR. 
I aslo use the Sample code from keil that genrate interrupt on Timer
match.But that aslo</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: PROBLEM IN TIMER MATCH REGISTER INTERRUPT.</title><link>https://community.arm.com/thread/103985?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2010 01:40:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a574cfec-d8a4-46fb-9079-b3178251e765</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes, the simulator do support interrupts. If it didn&amp;#39;t, it would
be meaningless to use it.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PROBLEM IN TIMER MATCH REGISTER INTERRUPT.</title><link>https://community.arm.com/thread/78345?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2010 01:12:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e175507f-44b4-4242-a4d6-86d5783efcfb</guid><dc:creator>AMOGH PRABHULKAR</dc:creator><description>&lt;p&gt;&lt;p&gt;
Dear Martin,&lt;/p&gt;

&lt;p&gt;
Thanks for reply.&lt;/p&gt;

&lt;p&gt;
I complied your code in keil(Evaluation version).Does &amp;quot;interrupt &amp;quot;
simulate in Evaluation mode?&lt;/p&gt;

&lt;p&gt;
I used your program Hex code in &amp;quot;Proteus-7&amp;quot; for hardware(LPC2138)
simulation to see interrupt but it don&amp;#39;t work.&lt;/p&gt;

&lt;p&gt;
Does there is problem in Keil compiler or Proteus-7?&lt;/p&gt;

&lt;p&gt;
regads,&lt;br /&gt;
Amogh&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PROBLEM IN TIMER MATCH REGISTER INTERRUPT.</title><link>https://community.arm.com/thread/65634?ContentTypeID=1</link><pubDate>Fri, 21 May 2010 02:35:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:59357db8-c44b-47fd-8d0f-ad71d5a49ce6</guid><dc:creator>Martin G&amp;#195;&amp;#188;nther</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hello AMOGH PRABHULKAR,&lt;/p&gt;

&lt;p&gt;
it is not necessary to change the startup code.&lt;br /&gt;
Be aware that interrupts are disabled during debugging with single
steps. It is better to set a breakpoint inside the interrupt function
and then perform a GO command.&lt;/p&gt;

&lt;p&gt;
Below is your modified code which works on a Keil MCB2130 board
and also in uVision Simulation.&lt;/p&gt;

&lt;pre&gt;
#include &amp;lt;LPC213x.H&amp;gt;              // LPC213x definitions

unsigned int x = 0;

__irq void T0isr (void) {
  x ^= 1;

  if (x)
    IOSET1 = 1UL &amp;lt;&amp;lt; 16;           // switch LED on
  else
    IOCLR1 = 1UL &amp;lt;&amp;lt; 16;           // switch LED off

  T0IR        = 0x00000001;       // Clear match 0 interrupt
  VICVectAddr = 0x00000000;       // Dummy write to signal end of interrupt
}

int main(void) {
  IODIR1  = 0x00FF0000;           // P1.16..23 defined as Outputs (LEDs)
  IOCLR1  = 0x00FF0000;           // Turn LEDs off


  T0TCR  = 0x00000000;            // TIMER0 COUNTER DISABLE
  T0PR   = 0x00000080;            // PRESCLAR FOR TIMER0
  T0MCR  = 0x00000003;            // MR0 SET TO RESET AND GENERATE INT
  T0MR0  = 0xFFFF;                // MR0 SET 0XFFFF

  VICVectAddr4 = (unsigned)T0isr; // Set the timer ISR vector address
  VICVectCntl4 = 0x00000024;      // Set channel
  VICIntEnable = 0x00000010;      // Enable the TIMER-0 interrupt

  T0TCR = 0x00000001;             // TIMER0 COUNTER ENABLE

  for(;;);
}
&lt;/pre&gt;

&lt;p&gt;
Best Regards,&lt;br /&gt;
Martin Guenther&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>