<?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: LPC810 ACMP interrupt loop in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573494#M18820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Sat Dec 21 04:51:51 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;How about clearing the interrupt in the NVIC?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:14:15 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:14:15Z</dc:date>
    <item>
      <title>LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573493#M18819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Fri Dec 20 17:24:12 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I get a problem using the ACMP interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As soon as the interrupt is enabled, the MCU does nothing else but call CMP_IRQHandler in a loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Seems either it permanent detect edges or the interrupt is not reset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After hours of debugging and reading the documentation i run out of ideas.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MRT and SCT interrupts are working fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Either I read something wrong or i may have a problem in hardware ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does someone has an idea ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here a code snippet:&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;
#define DEFBITS(last,first,val) ( (val&amp;amp;((1UL &amp;lt;&amp;lt; ((last+1)-first))-1)) &amp;lt;&amp;lt; first)

#define ACMP_CTRL_EDGESEL(val) DEFBITS(4,3,val)
#define ACMP_CTRL_COMPSA(val) DEFBITS(6,6,val)
#define ACMP_CTRL_COMP_VP_SEL(val) DEFBITS(10,8,val)
#define ACMP_CTRL_COMP_VM_SEL(val) DEFBITS(13,11,val)
#define ACMP_CTRL_EDGECLR(val) DEFBITS(20,20,val)
#define ACMP_CTRL_COMPSTAT(val) DEFBITS(21,21,val)
#define ACMP_CTRL_COMPEDGE(val) DEFBITS(23,23,val)
#define ACMP_CTRL_HYS(val) DEFBITS(26,25,val)

void acmp_init() 
{ 
&amp;nbsp; LPC_SYSCON-&amp;gt;PDRUNCFG &amp;amp;= ~( (0x1 &amp;lt;&amp;lt; 15) );
&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= (0x1 &amp;lt;&amp;lt; 19);
&amp;nbsp; LPC_SYSCON-&amp;gt;PRESETCTRL &amp;amp;= ~(0x1 &amp;lt;&amp;lt; 12);
&amp;nbsp; LPC_SYSCON-&amp;gt;PRESETCTRL |= (0x1 &amp;lt;&amp;lt; 12);

&amp;nbsp; LPC_CMP-&amp;gt;CTRL=0;
&amp;nbsp; LPC_CMP-&amp;gt;LAD=(1&amp;lt;&amp;lt;6)|(1&amp;lt;&amp;lt;0);
&amp;nbsp; LPC_CMP-&amp;gt;CTRL=ACMP_CTRL_COMP_VM_SEL(0)|ACMP_CTRL_COMP_VP_SEL(2)|ACMP_CTRL_EDGESEL(2)|ACMP_CTRL_EDGECLR(1);
&amp;nbsp; LPC_CMP-&amp;gt;CTRL&amp;amp;=~(ACMP_CTRL_EDGECLR(1));
&amp;nbsp; NVIC_EnableIRQ( CMP_IRQn );
}

#define _COMPSA(0x1 &amp;lt;&amp;lt; 6)
#define _EDGECLR&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; (0x1 &amp;lt;&amp;lt; 20)
#define _COMPSTAT(0x1 &amp;lt;&amp;lt; 21)
#define _COMPEDGE(0x1 &amp;lt;&amp;lt; 23)
/* statistics of all the interrupts */
volatile uint32_t CompStatCnt = 0;
volatile uint32_t CompEdgeCnt = 0;
void CMP_IRQHandler(void);

void CMP_IRQHandler(void)
{
&amp;nbsp; uint32_t regVal;
&amp;nbsp; regVal = LPC_CMP-&amp;gt;CTRL;
&amp;nbsp; LPC_GPIO_PORT-&amp;gt;CLR0 = 1 &amp;lt;&amp;lt; LED_LOCATION;
&amp;nbsp; if (regVal &amp;amp; _COMPSTAT)
&amp;nbsp; {
CompStatCnt++;
&amp;nbsp; }
&amp;nbsp; if (regVal &amp;amp; _COMPEDGE)
&amp;nbsp; {
CompEdgeCnt++;
&amp;nbsp; }
&amp;nbsp; LPC_GPIO_PORT-&amp;gt;SET0 = 1 &amp;lt;&amp;lt; LED_LOCATION; 
&amp;nbsp; LPC_CMP-&amp;gt;CTRL = regVal | _EDGECLR;
&amp;nbsp; LPC_CMP-&amp;gt;CTRL = regVal &amp;amp; (~_EDGECLR);

&amp;nbsp; return;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573493#M18819</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573494#M18820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Sat Dec 21 04:51:51 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;How about clearing the interrupt in the NVIC?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573494#M18820</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573495#M18821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Sun Dec 22 19:03:44 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the hint.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I inserted &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;NVIC_ClearPendingIRQ(CMP_IRQn);&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;at the end of the IRQ routine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It does not have any effect on the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- do not power up &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- do not enable clock and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- held acmp in reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in all these cases the interrupt does not fire.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But as soon acmp is set up correctly, MCU does nothing else but running CMP_IRQHandler.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried this seuence at end of CMP_IRQHandler:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- disable acmp irq,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- clear acmp irq&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- enable acmp irq&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it still run the irq handler in a loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To make sure its not from real edge detection I connected both VP and NP to voltage ladder and set hysteresis to 30 mv. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So no edge detection can happen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tried same with internal bandgap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;All this ends up with the interrupt loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573495#M18821</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573496#M18822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Mon Dec 23 09:05:00 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;How do you know, it's the ISR your program is looping?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What if it loops because of a corrupt stack or some kind of abort?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573496#M18822</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573497#M18823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Mon Dec 23 09:45:10 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I know from ISR does toggle a pin (LED) . Measurement show its just a couple of cycles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LED is switched on at entry and off at exit of the ISR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So ISR is processed completely.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The main program is just a loop toggle another pin, then wait 500 ms at MRT timer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works correctly if ACMP is disabled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Abort with restart would lead to 1,5 sec pause before init ACMP (in main() so this would be visible on the LED.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have also removed all other code except system clock and gpio init.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Main is a while(1); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LED still toggles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe someone who own a LPC810 mini board can try to run the code on his hardware to see if it behaves same ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573497#M18823</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573498#M18824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wells on Mon Dec 23 10:40:00 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The LPCOpen ACMP example woprked fine at last check and only triggered the interrupt when going through a threshold.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's very similar to yours, but uses different names and functions. Maybe you can pull that one and give it a try?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fnxpfile%2Flpcopen-software-development-platform-lpc8xx-packages" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc8xx-packages&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573498#M18824</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573499#M18825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Mon Dec 23 11:22:48 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Quote: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:onkel.jack@t-online.de"&gt;onkel.jack@t-online.de&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Maybe someone who own a LPC810 mini board can try to run the code on his hardware to see if it behaves same ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have LPC812 boards and gcc toolchain.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Put your code into a .c file and I'll give it a try. I'll have to use the comparator myself, soon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also maybe post your binary and we'll see if that behaves exactly as the one I'll compile.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573499#M18825</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573500#M18826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Mon Dec 23 17:18:37 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for posting that link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try that out in the next days.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a merry x-mas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573500#M18826</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573501#M18827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Mon Dec 23 17:21:57 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for beeing so kind to let the stuff run on yor board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do have gcc toolchain too, but have LPC810 mini board, so maybe the pins need to be changed for that thest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nevertheless, I will post that in the next days if i do not have success with the link sent by wells.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a merry x-mas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573501#M18827</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573502#M18828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Sat Dec 28 15:51:05 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Marc,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here my sample project showing the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;go into test/sonic and call make from there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For running on LPC812 LPCexpresso board the define -DLPC810_MINIBOARD in makefile line 117 need to get removed to address the correct LED pin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the code works correctly, the LED should go on for 1,5 sec then go off and then toggle every 0,5 sec.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the interrupt fires permanent, the LED will dimm indicating the interrupt routine runs continually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sending the binary makes not sense since LED pins are different betwenn our boards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573502#M18828</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573503#M18829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Sun Dec 29 07:05:31 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Quote: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:onkel.jack@t-online.de"&gt;onkel.jack@t-online.de&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sending the binary makes not sense since LED pins are different betwenn our boards.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...unless I have a board that has all pins accessible. ;-) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do have.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573503#M18829</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573504#M18830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Sun Dec 29 12:42:12 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi OnkelJack,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've not yet tested your binary nor am I able to compile your code in my so different environment (no NXP stuff, no libc BS, no nothing whatever - that makes my programs fat and dull).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But one thing puzzles me: you seem to use as input to the comparator the *SAME* internal reference voltage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Without hysteresis that would be a good explanation for your ISR keeping up firing. Imagine some input noise...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just a thought.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm old and slow. Will get a closer look at your program later, once I've completely understood the ACMP 0:) &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573504#M18830</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573505#M18831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Sun Dec 29 13:15:54 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are the binaries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LED pin is P0.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did experiment a little further.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly, if ACMP configured and the pins tied to ACMP_O should be low,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get a 70 us wide low pulse on ACMP_O then it switches back to high and the interrupt fired in a loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I configure and tie the pins in a way ACMP_O is high, nothing happens, no pulse and no interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, since output and interrupt&amp;nbsp; both behaves in a similar strange way, I think its really a hardware problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But a confirmation still is highly welcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573505#M18831</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573506#M18832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Mon Dec 30 15:30:18 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Marc,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for looking at that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just put some update in my last post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using same reference on both inputs is intended, just to make sure no noise is trouble me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried with max hsyeresis (30 mv I think) and different inputs, voltage ladder, I1 I2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Still the same behaviour.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I spend a lot of time on the topic try out different approaches and also re-wrote the code from scratch,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;always getting the same results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The NXP stuff is in the sample zip and get pulled in by the Makefile.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The only symbol pulled from C runtime is __aeabi_uidiv, the unsigned interger division.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately it is needed to calculate clock speed, otherwise it would link with -nostdlib &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did experiment a little further.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Interestingly, if ACMP configured and the pins tied to Vss/Vdd so that ACMP_O should be low,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I get a 70 us wide low pulse on ACMP_O then it switches back to high and the interrupt fired in a loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If I configure and tie the pins in a way ACMP_O is high, nothing happens, no pulse and no interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, since output and interrupt both behaves in a similar strange way, I think its really a hardware problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But a confirmation still is highly welcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573506#M18832</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573507#M18833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Mon Dec 30 17:04:51 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi OnkelJack,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i just run your binary an my LPC812 board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After a 1.5s low on P0.2 it toggles at 1 Hz. No interrupt loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All pins on my board were left open in this test, except for the programming pins PIO0.0, PIO0.1, PIO0.4, PIO0.5.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The crystal is populated, too. See schematic. The device is a sample, Rev 2A, not the ones available today (PIO0.12 as BOOT).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This result seems to confirm you have a hardware problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I reduced the operating voltage down to 2.0V - to my surprise - I have a randomly toggling P0.2 at an average about 2..4.5kHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know, if you handle brown-out so far and if that can be an explanation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573507#M18833</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573508#M18834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Tue Dec 31 17:11:44 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Marc,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a thousand thanks for check that out for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You arere right with the hint at the voltage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will check the power supply too. Fortuntnately, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I not only own a digital analyzer but a oscilloscope too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I also will order a new chip.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a happy new year !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573508#M18834</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573509#M18835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sebi on Thu Apr 23 02:25:30 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi OnkelJack,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;did you solve your Problem? I have the same problem and have no idea to fix it. Once the interrupt occures, it "fires" permanently...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sebastian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573509#M18835</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC810 ACMP interrupt loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573510#M18836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by onkel.jack@t-online.de on Thu Apr 23 11:20:21 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Sebi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unfortunately not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I got attracted by some other problems coming from real world, like fix our cars and house foundation since and did not find time &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to work on the topic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The demo board since then still sit on table in the corner ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But maybe some ideas:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What about to check what happens on output with interrupt disabled ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does the ACMP do switch the output if input changes ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe the interrupt has to be configured for the other edge every time it occurs ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So if it fires on raising edge set it to falling edge and via versa ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe this is how the HW behaves ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't remember all the experiments I did, I this I worked about 2 or 3 weeks on that ....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope the ideas help you ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;also pls have a look there:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2Fmikef5410%2Flpcopen%2Fblob%2Fmaster%2Flpcopen%2Fapplications%2Flpc8xx%2Fexamples%2Fperiph%2Fperiph_acmp%2Facmp.c" rel="nofollow" target="_blank"&gt;https://github.com/mikef5410/lpcopen/blob/master/lpcopen/applications/lpc8xx/examples/periph/periph_acmp/acmp.c&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and there:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Francidbacon.com%2Flpcopen%2Fdocs%2Flpcopen_docs_v2_00a_11xx%2Facmp__11xx_8c_source.html" rel="nofollow" target="_blank"&gt;http://rancidbacon.com/lpcopen/docs/lpcopen_docs_v2_00a_11xx/acmp__11xx_8c_source.html&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe using these functions will make it work ? Then you could compare whats different.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or maybe we both have an early version of the chip that has a problem ???? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:14:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC810-ACMP-interrupt-loop/m-p/573510#M18836</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:14:25Z</dc:date>
    </item>
  </channel>
</rss>

