<?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のトピックLPC802 SDK capture example</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC802-SDK-capture-example/m-p/984009#M38809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to measure a square wave from rising edge to falling edge.&lt;/P&gt;&lt;P&gt;Is there any SDK example for using CTIMER as capture ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Asier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Feb 2020 10:50:18 GMT</pubDate>
    <dc:creator>asier</dc:creator>
    <dc:date>2020-02-05T10:50:18Z</dc:date>
    <item>
      <title>LPC802 SDK capture example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC802-SDK-capture-example/m-p/984009#M38809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to measure a square wave from rising edge to falling edge.&lt;/P&gt;&lt;P&gt;Is there any SDK example for using CTIMER as capture ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Asier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2020 10:50:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC802-SDK-capture-example/m-p/984009#M38809</guid>
      <dc:creator>asier</dc:creator>
      <dc:date>2020-02-05T10:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: LPC802 SDK capture example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC802-SDK-capture-example/m-p/984010#M38810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Asier,&lt;/P&gt;&lt;P&gt;I have checked&amp;nbsp; the examples in SDK package, I do not think the SDK have example for capture function, but the CTimer module supports capture function exactly.&lt;/P&gt;&lt;P&gt;For LPC802, if you can connect the captured signal to pin for example PIO0_12.&lt;/P&gt;&lt;P&gt;I suppose that you can use the code to get the captured value, you can set the CTimer modulo as large as possible.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ctimer_callback_t ctimer_callback_table[] = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL, NULL, NULL, NULL, ctimer_cap0_callback, NULL, NULL, NULL};&lt;/P&gt;&lt;P&gt;//use the PIO0_12 as T0_cap0 signal&lt;BR /&gt;void capInit(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;SYSCON-&amp;gt;SYSAHBCLKCTRL0|=1&amp;lt;&amp;lt;7; //enable SWM clock&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;SWM0-&amp;gt;PINASSIGN.PINASSIGN3=12&amp;lt;&amp;lt;8;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CTIMER_SetupCapture(CTIMER,0,kCTIMER_Capture_RiseEdge,true);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CTIMER_RegisterCallBack(CTIMER, &amp;amp;ctimer_callback_table[0], kCTIMER_MultipleCallback);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;uint32_t captureValue0;&lt;BR /&gt;void ctimer_cap0_callback(uint32_t flags)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//read the capture value&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;captureValue0=CTIMER-&amp;gt;CR[0];&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 05:47:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC802-SDK-capture-example/m-p/984010#M38810</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-02-06T05:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: LPC802 SDK capture example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC802-SDK-capture-example/m-p/984011#M38811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xiangjun,&lt;/P&gt;&lt;P&gt;I think it is needed "CTIMER_StartTimer(CTIMER);" line after registercallback definition in your example.&lt;/P&gt;&lt;P&gt;I got it to work.&lt;/P&gt;&lt;P&gt;Thank you so much,&lt;/P&gt;&lt;P&gt;Asier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2020 18:19:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC802-SDK-capture-example/m-p/984011#M38811</guid>
      <dc:creator>asier</dc:creator>
      <dc:date>2020-02-12T18:19:50Z</dc:date>
    </item>
  </channel>
</rss>

