<?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>LPC MicrocontrollersのトピックInterrupt not serviced when using two capture pins on the same timer on LPC2132</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-not-serviced-when-using-two-capture-pins-on-the-same/m-p/549805#M13889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gvengineering on Mon Jan 11 15:03:04 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have problems on my board trying to use two capture pins on the same timer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My purpose is to use CAP0.2 (PIN0.28) and CAP0.3 (PIN0.29) on Timer0 in order to generate two interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CAP0.2 is set to generate an interrupt on a Rising Edge and CAP0.3 on a falling edge.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that if I use only CAP0.3 I have the Interrupt serviced and handled correctly, If I add also CAP0.2, no interrupts are handled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In debug I can see the Interrupt request on the VIC peripheral but no call to ISR is done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use only CAP0.2 again, no Interrupt is serviced even if the request is in the VIC&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems only CAP0.3 it is working properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the simple code I'm trying to run:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;

void __irq timers_isr0 ( void) 
{

if ( T0CR2 != StoreA )
{
StoreA = T0CR2;
countA++;
T0IR |= 0x40;
}

if ( T0CR3 != StoreB )
{
StoreB = T0CR3;
countB++;
T0IR |= 0x80;
}

T0TCR |= 0x02;//ResetCounter
T0TCR &amp;amp;= 0xFD;

VICVectAddr = 0x00;
} 

int main (void)
{

PINSEL0 = 0x00000000;
PINSEL1 = 0x0A000000;
// Enable Debug Port
PINSEL2 |= 0x00000034;
// Do Not Remove

// configure timer 0
T0CTCR = 0x08 ;&amp;nbsp; //&amp;nbsp;&amp;nbsp; bit 00001000

T0TC&amp;nbsp;&amp;nbsp; = 0;&amp;nbsp; /* Set Timer 0 Counter*/
T0PR&amp;nbsp;&amp;nbsp; = 0;&amp;nbsp; /*&amp;nbsp; Set Prescaler */
T0CCR = 0x00000D40;

T0MCR = 0x00;
T0MR0 = 0x01;
T0MR1 = 0x00;
T0MR2 = 0x00;
T0MR3 = 0x00;
T0TCR = 0x01;&amp;nbsp; /* Start Timer*/

VICIntSelect = 0x00; /* */
VICVectCntl1 = 0x20 | 0x04; /* */
VICVectAddr1 = (unsigned) timers_isr0; /**/
VICIntEnable = 1 &amp;lt;&amp;lt; 0x04; /* */

T0IR |= 0xFF;
while (1);

} // timers_init

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THanks to anyone who could provide a suggestion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gabriele&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:52:43 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:52:43Z</dc:date>
    <item>
      <title>Interrupt not serviced when using two capture pins on the same timer on LPC2132</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-not-serviced-when-using-two-capture-pins-on-the-same/m-p/549805#M13889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gvengineering on Mon Jan 11 15:03:04 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have problems on my board trying to use two capture pins on the same timer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My purpose is to use CAP0.2 (PIN0.28) and CAP0.3 (PIN0.29) on Timer0 in order to generate two interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CAP0.2 is set to generate an interrupt on a Rising Edge and CAP0.3 on a falling edge.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that if I use only CAP0.3 I have the Interrupt serviced and handled correctly, If I add also CAP0.2, no interrupts are handled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In debug I can see the Interrupt request on the VIC peripheral but no call to ISR is done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use only CAP0.2 again, no Interrupt is serviced even if the request is in the VIC&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems only CAP0.3 it is working properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the simple code I'm trying to run:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;

void __irq timers_isr0 ( void) 
{

if ( T0CR2 != StoreA )
{
StoreA = T0CR2;
countA++;
T0IR |= 0x40;
}

if ( T0CR3 != StoreB )
{
StoreB = T0CR3;
countB++;
T0IR |= 0x80;
}

T0TCR |= 0x02;//ResetCounter
T0TCR &amp;amp;= 0xFD;

VICVectAddr = 0x00;
} 

int main (void)
{

PINSEL0 = 0x00000000;
PINSEL1 = 0x0A000000;
// Enable Debug Port
PINSEL2 |= 0x00000034;
// Do Not Remove

// configure timer 0
T0CTCR = 0x08 ;&amp;nbsp; //&amp;nbsp;&amp;nbsp; bit 00001000

T0TC&amp;nbsp;&amp;nbsp; = 0;&amp;nbsp; /* Set Timer 0 Counter*/
T0PR&amp;nbsp;&amp;nbsp; = 0;&amp;nbsp; /*&amp;nbsp; Set Prescaler */
T0CCR = 0x00000D40;

T0MCR = 0x00;
T0MR0 = 0x01;
T0MR1 = 0x00;
T0MR2 = 0x00;
T0MR3 = 0x00;
T0TCR = 0x01;&amp;nbsp; /* Start Timer*/

VICIntSelect = 0x00; /* */
VICVectCntl1 = 0x20 | 0x04; /* */
VICVectAddr1 = (unsigned) timers_isr0; /**/
VICIntEnable = 1 &amp;lt;&amp;lt; 0x04; /* */

T0IR |= 0xFF;
while (1);

} // timers_init

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THanks to anyone who could provide a suggestion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gabriele&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:52:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-not-serviced-when-using-two-capture-pins-on-the-same/m-p/549805#M13889</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:52:43Z</dc:date>
    </item>
  </channel>
</rss>

