<?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: LPC1549 input capture missing edges. in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-input-capture-missing-edges/m-p/816843#M32702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.&lt;/P&gt;&lt;P&gt;I have found the problem.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;Chip_SCT_Config(SCT_CAP,(SCT_CONFIG_32BIT_COUNTER |SCT_CONFIG_CLKMODE_BUSCLK | SCT_CONFIG_NORELOADL_U |&amp;nbsp; (1&amp;lt;&amp;lt;9)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSYNC needs to be set, i had tried it before and didn`t work, when i saw in my code that i was configuring CONFIG&amp;nbsp; register twice and&amp;nbsp;INSYNC configured before were being lost.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2018 16:42:46 GMT</pubDate>
    <dc:creator>Edrianocarlos</dc:creator>
    <dc:date>2018-06-26T16:42:46Z</dc:date>
    <item>
      <title>LPC1549 input capture missing edges.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-input-capture-missing-edges/m-p/816842#M32701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I am new to this LPC world.&lt;/P&gt;&lt;P&gt;And i am trying to configure the input capture timer, right now i am injecting a 1HZ and at fist glance the code was working. as i could see the led toggling every time i got int to the interrupt.&lt;/P&gt;&lt;P&gt;but when measuring the time i could see that sometimes i was getting double of it was supposed to be. and seing the led it indeed is missing some pulses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you take a look and see am i doing anything wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void SCT0_IRQHandler(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;if (SCT_CAP-&amp;gt;EVFLAG &amp;amp; SCT_EVT_0)&lt;BR /&gt;{&lt;BR /&gt; frequencia2 = SCT_CAP-&amp;gt;CAP[0].U;&lt;BR /&gt; Chip_SCT_SetClrControl(SCT_CAP, SCT_CTRL_HALT_L,ENABLE);&lt;BR /&gt; SCT_CAP-&amp;gt;COUNT_U = 0;&lt;BR /&gt; Chip_SCT_SetClrControl(SCT_CAP, SCT_CTRL_HALT_L, DISABLE);&lt;BR /&gt; frequencia2s[contador] = frequencia2;&lt;BR /&gt; frequencia2 = 0;&lt;BR /&gt; ++contador;&lt;BR /&gt; if (contador &amp;gt; 19)&lt;BR /&gt; {&lt;BR /&gt;// Board_LED_Toggle(1);&lt;BR /&gt; contador = 0;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Board_LED_Toggle(2);&lt;/P&gt;&lt;P&gt;Chip_SCT_ClearEventFlag(SCT_CAP, SCT_EVT_0);&lt;/P&gt;&lt;P&gt;}else&lt;BR /&gt;{&lt;BR /&gt; Board_LED_Toggle(1);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void init_timer(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 17, (IOCON_MODE_PULLDOWN));&lt;/P&gt;&lt;P&gt;Chip_SCT_Init(SCT_CAP);&lt;BR /&gt; Chip_SCT_Config(LPC_SCT0,SCT_CONFIG_32BIT_COUNTER+SCT_CONFIG_CLKMODE_BUSCLK+SCT_CONFIG_NORELOADL_U );&lt;/P&gt;&lt;P&gt;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM);&lt;BR /&gt; /* Use PIO0_15 as CTIN_0 */&lt;BR /&gt;// Chip_SWM_MovablePinAssign(SWM_CTIN_0_I, GPIO_CAPTURE);&lt;/P&gt;&lt;P&gt;/* Configure the SCT as a 32bit counter using the bus clock */&lt;BR /&gt; Chip_SCT_Config(SCT_CAP, SCT_CONFIG_32BIT_COUNTER | SCT_CONFIG_CLKMODE_BUSCLK);&lt;/P&gt;&lt;P&gt;/* The match/capture REGMODE defaults to capture mode */&lt;BR /&gt; SCT_CAP-&amp;gt;REGMODE_L = 1;&lt;BR /&gt; SCT_CAP-&amp;gt;REGMODE_H = 1;&lt;/P&gt;&lt;P&gt;LPC_INMUX-&amp;gt;SCT0_INMUX[0] = 2;//SCT0_IN0 = P0IO_17&lt;/P&gt;&lt;P&gt;/* Enable an Interrupt on the Capture Event */&lt;BR /&gt; Chip_SCT_EnableEventInt(SCT_CAP, SCT_EVT_0);&lt;/P&gt;&lt;P&gt;/* event 0 is causing capture 0 */&lt;BR /&gt; SCT_CAP-&amp;gt;CAPCTRL[0].U = SCT_EVT_0;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; /* setup channel 0 capture event */&lt;BR /&gt; /* use CTIN_0, Rise, I/O condition only */&lt;BR /&gt; SCT_CAP-&amp;gt;EVENT[0].CTRL = 0x00006400;&lt;BR /&gt; /* event happens in all states */&lt;BR /&gt; SCT_CAP-&amp;gt;EVENT[0].STATE = 0xFFFFFFFF;&lt;/P&gt;&lt;P&gt;//SCT_CAP-&amp;gt;LIMIT = 0X7FFFFFFF;&lt;/P&gt;&lt;P&gt;/* Enable the IRQ for the SCT */&lt;BR /&gt; NVIC_EnableIRQ(SCT_IRQn);&lt;BR /&gt; SCT_CAP-&amp;gt;COUNT_U = 0;&lt;BR /&gt; frequencia2= 0;&lt;BR /&gt; frequencia = 0;&lt;/P&gt;&lt;P&gt;/* Unhalt the counter to start */&lt;BR /&gt; Chip_SCT_SetClrControl(SCT_CAP, SCT_CTRL_HALT_L, DISABLE);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;sys_init();&lt;BR /&gt; Ini_Mux();&lt;BR /&gt; contador = 0;&lt;BR /&gt; init_timer();&lt;/P&gt;&lt;P&gt;while(1)&lt;BR /&gt; {&lt;BR /&gt; }&lt;BR /&gt; return 0 ;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 03:43:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-input-capture-missing-edges/m-p/816842#M32701</guid>
      <dc:creator>Edrianocarlos</dc:creator>
      <dc:date>2018-06-26T03:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1549 input capture missing edges.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-input-capture-missing-edges/m-p/816843#M32702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.&lt;/P&gt;&lt;P&gt;I have found the problem.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;Chip_SCT_Config(SCT_CAP,(SCT_CONFIG_32BIT_COUNTER |SCT_CONFIG_CLKMODE_BUSCLK | SCT_CONFIG_NORELOADL_U |&amp;nbsp; (1&amp;lt;&amp;lt;9)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSYNC needs to be set, i had tried it before and didn`t work, when i saw in my code that i was configuring CONFIG&amp;nbsp; register twice and&amp;nbsp;INSYNC configured before were being lost.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 16:42:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-input-capture-missing-edges/m-p/816843#M32702</guid>
      <dc:creator>Edrianocarlos</dc:creator>
      <dc:date>2018-06-26T16:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1549 input capture missing edges.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-input-capture-missing-edges/m-p/816844#M32703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Edriano Araujo,&lt;BR /&gt;Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.&lt;BR /&gt;I'm glad to hear you found the problem, If you have any further questions about it, please feel free to contact me.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 01:41:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-input-capture-missing-edges/m-p/816844#M32703</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-06-27T01:41:09Z</dc:date>
    </item>
  </channel>
</rss>

