<?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: Configure lpc4337 timer0 as input capture in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Configure-lpc4337-timer0-as-input-capture/m-p/618377#M24185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="288785" data-username="matiasalvarez" href="https://community.nxp.com/people/matiasalvarez"&gt;Matias Alvarez&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;About your demo, using the following the code to replace the " &amp;nbsp;Chip_SCU_PinMuxSet(IC_SCU_PORT, IC_SCU_PIN, &amp;nbsp;SCU_MODE_FUNC4);"&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG style="color: #ff0000;"&gt;Chip_SCU_PinMux(IC_SCU_PORT,IC_SCU_PIN, MD_PLN_FAST, SCU_MODE_FUNC4);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;SPAN style="color: #000000;"&gt;I've also create a demo for LPCXpresso4337 board which toggles the P1.5 in the Timer1 interrupt and set the P1.12 work as the&amp;nbsp;T0_CAP1 to receive the PWM wave.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;When testing the demo, use a wire connect the P1.5 and P1.12, and after enter into the Timer0 interrupt, it will toggle the blue led (Fig 1).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="673834818286369845.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5325i6ABA20A019BC5C6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="673834818286369845.jpg" alt="673834818286369845.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ping&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, 12 Oct 2016 06:39:25 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2016-10-12T06:39:25Z</dc:date>
    <item>
      <title>Configure lpc4337 timer0 as input capture</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Configure-lpc4337-timer0-as-input-capture/m-p/618375#M24183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i'm trryng to configure lpc4337 timer0 as input capture to capture both rising and falling edges. It's still not working. Can you help me?. Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #222222; background-color: #ffffff; border: 0px; font-size: 13px;"&gt; &lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; border: 0px; font-size: 13px;"&gt;#define TIMER_NUMBER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; border: 0px; font-size: 13px;"&gt;&lt;DIV style="border: 0px;"&gt;#define CAP_NUMB &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;#define TIMER0_PRESCALER &amp;nbsp; 10&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt; &lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;#define IC_SCU_PORT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;#define IC_SCU_PIN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 17 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt; &lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;#define LPC_TIMER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LPC_TIMER0&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;#define RGU_TIMER_RST &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RGU_TIMER0_RST&amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;#define LPC_TIMER_IRQ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TIMER0_IRQn&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; border: 0px; font-size: 13px;"&gt;&lt;DIV style="border: 0px;"&gt;#define INPUT &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;0&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;#define OUTPUT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;#define ON &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;1&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;#define OFF &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;0&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; border: 0px; font-size: 13px;"&gt; &lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; border: 0px; font-size: 13px;"&gt;&lt;DIV style="border: 0px;"&gt;volatile uint8_t STATUS=0;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt; &lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt; &lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;__attribute__ ((section(".after_vectors")))&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;void TIMER0_IRQHandler(void){&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;if (STATUS == 0)&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;STATUS=1;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;else&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;STATUS=0;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;}&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; border: 0px; font-size: 13px;"&gt; &lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; border: 0px; font-size: 13px;"&gt;&lt;DIV style="border: 0px;"&gt;int main(void)&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;{&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;SystemCoreClockUpdate();&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;ledConfig();&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;Chip_SCU_PinMuxSet(IC_SCU_PORT, IC_SCU_PIN, &amp;nbsp;SCU_MODE_FUNC4);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;Chip_TIMER_Init(LPC_TIMER);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;LPC_GIMA-&amp;gt;CAP0_IN[TIMER_NUMBER][CAP_NUMB] = (1&amp;lt;&amp;lt;4);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;Chip_RGU_TriggerReset(RGU_TIMER_RST);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;while (Chip_RGU_InReset(RGU_TIMER_RST));&amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt; &lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; Chip_TIMER_Reset(LPC_TIMER);&amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; Chip_TIMER_TIMER_SetCountClockSrc(LPC_TIMER, TIMER_CAPSRC_RISING_PCLK, CAP_NUMB);&amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; Chip_TIMER_PrescaleSet(LPC_TIMER, TIMER0_PRESCALER);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; Chip_TIMER_ClearCapture(LPC_TIMER, CAP_NUMB);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; Chip_TIMER_CaptureRisingEdgeEnable(LPC_TIMER, CAP_NUMB);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; Chip_TIMER_CaptureFallingEdgeEnable (LPC_TIMER, CAP_NUMB );&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; Chip_TIMER_CaptureEnableInt(LPC_TIMER, CAP_NUMB);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; NVIC_ClearPendingIRQ(LPC_TIMER_IRQ);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; NVIC_EnableIRQ(LPC_TIMER_IRQ);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; Chip_TIMER_Enable(LPC_TIMER);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;while(1) {&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ledSet(STATUS);&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;}&lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt; &lt;/DIV&gt;&lt;DIV style="border: 0px;"&gt;Thank you, Matias&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 22:17:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Configure-lpc4337-timer0-as-input-capture/m-p/618375#M24183</guid>
      <dc:creator>matiasalvarez</dc:creator>
      <dc:date>2016-10-07T22:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Configure lpc4337 timer0 as input capture</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Configure-lpc4337-timer0-as-input-capture/m-p/618376#M24184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just recommend, I'm working now and I will inform ASAP if I figure the root cause of the issue.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&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>Tue, 11 Oct 2016 09:35:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Configure-lpc4337-timer0-as-input-capture/m-p/618376#M24184</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-10-11T09:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Configure lpc4337 timer0 as input capture</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Configure-lpc4337-timer0-as-input-capture/m-p/618377#M24185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="288785" data-username="matiasalvarez" href="https://community.nxp.com/people/matiasalvarez"&gt;Matias Alvarez&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;About your demo, using the following the code to replace the " &amp;nbsp;Chip_SCU_PinMuxSet(IC_SCU_PORT, IC_SCU_PIN, &amp;nbsp;SCU_MODE_FUNC4);"&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG style="color: #ff0000;"&gt;Chip_SCU_PinMux(IC_SCU_PORT,IC_SCU_PIN, MD_PLN_FAST, SCU_MODE_FUNC4);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;SPAN style="color: #000000;"&gt;I've also create a demo for LPCXpresso4337 board which toggles the P1.5 in the Timer1 interrupt and set the P1.12 work as the&amp;nbsp;T0_CAP1 to receive the PWM wave.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;When testing the demo, use a wire connect the P1.5 and P1.12, and after enter into the Timer0 interrupt, it will toggle the blue led (Fig 1).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="673834818286369845.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5325i6ABA20A019BC5C6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="673834818286369845.jpg" alt="673834818286369845.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ping&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, 12 Oct 2016 06:39:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Configure-lpc4337-timer0-as-input-capture/m-p/618377#M24185</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-10-12T06:39:25Z</dc:date>
    </item>
  </channel>
</rss>

