<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: TIMER1_IRQHandler does not interrupt? in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/TIMER1-IRQHandler-does-not-interrupt/m-p/547008#M9928</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gbm on Wed Oct 24 09:49:49 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The code fragments you attach are incomplete. There might be many errors in your code. I guess the first one is the incorrect declartion of RTC_timeMs variable (volatile specifier is necessary here).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:25:08 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:25:08Z</dc:date>
    <item>
      <title>TIMER1_IRQHandler does not interrupt?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/TIMER1-IRQHandler-does-not-interrupt/m-p/547007#M9927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jaybee on Wed Oct 24 02:23:14 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am implementing a timeout function for my uart2 transmission. However, it did not work as I think it should..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In main.c I added this &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
void TIMER1_IRQHandler(void)
{
&amp;nbsp; RTC_timeMs++;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add the ms counter for fake RTCC
&amp;nbsp; TIM_ClearIntPending(LPC_TIM1, TIM_MR0_INT);
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and in Uart.c I added this&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
char UART2_Getchar()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; timed_out = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; long y;
&amp;nbsp;&amp;nbsp;&amp;nbsp; long delay;
&amp;nbsp;&amp;nbsp;&amp;nbsp; char cout;
&amp;nbsp;&amp;nbsp;&amp;nbsp; long time_delay;
&amp;nbsp;&amp;nbsp;&amp;nbsp; time_delay = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("ms while = %d\n", RTC_timeMs);
&amp;nbsp;&amp;nbsp;&amp;nbsp; time_delay = RTC_timeMs;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while( ((LPC_UART2-&amp;gt;LSR &amp;amp; LSR_RDR) == 0) &amp;amp;&amp;amp; (RTC_timeMs &amp;lt; time_delay+25) )&amp;nbsp; // Nothing received so just block
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; cout = LPC_UART2-&amp;gt;RBR; // Read Receiver buffer register&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //After 100msec if nothing receive = break() and error
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("ms while1 = %d\n", RTC_timeMs);
&amp;nbsp;&amp;nbsp;&amp;nbsp; return cout;
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RTC_timeMs is a global variable that is included in all my files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Somehow TIMER1_IRQHandler, stops interrupting while waiting for data at uart2 buffer. And it just hangs there....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With the exact same code, except this time for LPC_UART3, everything works as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to use both Uart2 and Uart3 and someone point what did i do wrong here?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:25:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/TIMER1-IRQHandler-does-not-interrupt/m-p/547007#M9927</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: TIMER1_IRQHandler does not interrupt?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/TIMER1-IRQHandler-does-not-interrupt/m-p/547008#M9928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gbm on Wed Oct 24 09:49:49 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The code fragments you attach are incomplete. There might be many errors in your code. I guess the first one is the incorrect declartion of RTC_timeMs variable (volatile specifier is necessary here).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:25:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/TIMER1-IRQHandler-does-not-interrupt/m-p/547008#M9928</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: TIMER1_IRQHandler does not interrupt?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/TIMER1-IRQHandler-does-not-interrupt/m-p/547009#M9929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by serge on Thu Oct 25 00:22:56 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the things which can go wrong is interrupt priority.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you checked those? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Your code fragment is very incomplete to draw conclusions&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:25:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/TIMER1-IRQHandler-does-not-interrupt/m-p/547009#M9929</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: TIMER1_IRQHandler does not interrupt?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/TIMER1-IRQHandler-does-not-interrupt/m-p/547010#M9930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jaybee on Thu Oct 25 02:15:16 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, you are so right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems the interrupt for the usbcdc is preventing the timer1 interrupt to occur... Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:25:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/TIMER1-IRQHandler-does-not-interrupt/m-p/547010#M9930</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:25:09Z</dc:date>
    </item>
  </channel>
</rss>

