<?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のトピックOne-shot Counter/Timer operation on LPC1347</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/One-shot-Counter-Timer-operation-on-LPC1347/m-p/525837#M8473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mathseng on Fri Dec 05 01:58:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to find out how to use the Counter/Timer on the LPC1347 as a one-shot, and cannot find the references in the User Manual.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically, I have a signal on the CT16B1CAP0 input, and want to use the timer in one-shot mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried using the standard ISR model, capturing edges and interrupting, however, this consumes far too much CPU for higher (200KHz) signal frequencies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone assist, please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the interested:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The scenario is to measure the duty cycle of a 200KHz signal. The first code developed was for a 20KHz signal, with both Rising and Falling edges captured in an ISR and retrieved using a task under FreeRTOS. Even at 20KHz, some edges were missed in an application with FreeRTOS, USB_HID, I2C&amp;nbsp; and ADC interrupts all running at the same time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The revised hardware now uses a 200KHz PWM signal. The old algorithm just doesn't work. A fiddle and another algorithm allows PWM calculations for higher frequencies (tested at up to 2MHz signal (accuracy between 3 - 10% @ 2MHz)), but there are lots of assumptions, so results are approximate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:55:21 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:55:21Z</dc:date>
    <item>
      <title>One-shot Counter/Timer operation on LPC1347</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/One-shot-Counter-Timer-operation-on-LPC1347/m-p/525837#M8473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mathseng on Fri Dec 05 01:58:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to find out how to use the Counter/Timer on the LPC1347 as a one-shot, and cannot find the references in the User Manual.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically, I have a signal on the CT16B1CAP0 input, and want to use the timer in one-shot mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried using the standard ISR model, capturing edges and interrupting, however, this consumes far too much CPU for higher (200KHz) signal frequencies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone assist, please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the interested:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The scenario is to measure the duty cycle of a 200KHz signal. The first code developed was for a 20KHz signal, with both Rising and Falling edges captured in an ISR and retrieved using a task under FreeRTOS. Even at 20KHz, some edges were missed in an application with FreeRTOS, USB_HID, I2C&amp;nbsp; and ADC interrupts all running at the same time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The revised hardware now uses a 200KHz PWM signal. The old algorithm just doesn't work. A fiddle and another algorithm allows PWM calculations for higher frequencies (tested at up to 2MHz signal (accuracy between 3 - 10% @ 2MHz)), but there are lots of assumptions, so results are approximate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:55:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/One-shot-Counter-Timer-operation-on-LPC1347/m-p/525837#M8473</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:55:21Z</dc:date>
    </item>
  </channel>
</rss>

