<?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のトピックRe: Error in frequency measurement using capture inputs of LPC11U68</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755882#M30422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="310121" data-username="akhilesh_sreedharan" href="https://community.nxp.com/people/akhilesh_sreedharan"&gt;Akhilesh Sreedharan&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;Please giving a try after reomve pull-up setting when configure the capture pin.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31235i6FA62CCA1EC2D118/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In addition, I was wondering if you can introudce the testing process in details.&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>Thu, 07 Jun 2018 07:53:31 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2018-06-07T07:53:31Z</dc:date>
    <item>
      <title>Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755879#M30419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am&amp;nbsp;using 16-bit Timer of LPC11U68 and its associated capture inputs to measuring frequency of a source (function generator generating a square wave of 50Hz and 50% duty cycle. The source frequency is 50Hz, however LPC11U68 randomly detects a wrong frequency after some random no. of cycles.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;hardware setup&lt;/STRONG&gt; consists of a &lt;STRONG&gt;OM13058: LPCXpresso Board for LPC11U68&lt;/STRONG&gt; connected to a function generator configured to generate a square wave of 50Hz going from 0V to +3.3V. The pins&amp;nbsp;&lt;STRONG&gt;PIO1_18,&amp;nbsp;PIO1_7,&amp;nbsp;PIO0_2&amp;nbsp; &lt;/STRONG&gt;are shorted together and connected to the output of function generator. The IDE used is&lt;STRONG&gt; LPCXpresso v8.2.2_650&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My idea for frequency measurement is to measure time difference between rising and falling edges every half cycle and&amp;nbsp;to use the previous half cycle time to compute frequency using the formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;STRONG&gt;&lt;EM&gt;Frequency = 1/(current_half_cycle_time + previous_half_cycle_time)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;To compute this following steps are taken in the algorithm:&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI style="text-align: justify;"&gt;A match is configured for the timer to detect the 16-bit timer overflow, which then increments an overflow count stored in the variable&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ui32_overflow&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;in the Timer's ISR.&amp;nbsp;&lt;/LI&gt;&lt;LI style="text-align: justify;"&gt;Capture inputs on pin &lt;STRONG&gt;PIO1_18,&amp;nbsp;PIO1_7,&amp;nbsp;PIO0_2&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;are configured on both rising and falling edges.&lt;OL&gt;&lt;LI style="text-align: justify;"&gt;When the capture event occurs, the value loaded in CRx register is stored in the variable&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ui32_current_capture_count.&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI style="text-align: justify;"&gt;Also, the number of overflows stored in the&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ui32_overflow&lt;/STRONG&gt;&lt;/EM&gt; variable is loaded in the&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ui32_save_overflow.&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI style="text-align: justify;"&gt;A flag&amp;nbsp;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ui32_new_cap_event&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;is then set to indicate the code executing in the main that data from the new cycle is ready for computation.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Once the flag is&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ui32_new_cap_event&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;is detected by the main, &lt;STRONG&gt;Compute_Frequency&lt;/STRONG&gt; function is called and the frequency is computed as follows:&lt;OL&gt;&lt;LI&gt;If&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ui32_save_overflow&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;is equal to zero, the half cycle time&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;STRONG&gt;ui32_current_half_cycle_time =&amp;nbsp;ui32_current_capture_count -&amp;nbsp;ui32_previous_capture_count&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;LI&gt;If&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ui32_save_overflow &lt;/STRONG&gt;&lt;/EM&gt;is not equal to zero then the&amp;nbsp;&lt;SPAN&gt;half cycle time&lt;/SPAN&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;STRONG&gt;ui32_current_half_cycle_time = (ui32_save_overflow * 65535) +&amp;nbsp;ui32_current_capture_count -&amp;nbsp;ui32_previous_capture_count&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &amp;nbsp;Once the half cycle time is computed, the frequency is calculated as:&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;STRONG&gt;ui32_frequency = 1000*(ui32_timerFreq/(ui32_current_half_cycle_time+ui32_previous_half_cycle_time))&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;where &lt;EM&gt;&lt;STRONG&gt;ui32_timerFreq = SystemClockFrequency/(TIMER_PRESCALE_VALUE+1)&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp; Note that 1000 is added to recover three decimal places of the frequency.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Once the frequency is computed, the previous variables are updated with the current variable values for next cycle computation:&amp;nbsp;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;STRONG&gt;ui32_previous_half_cycle_time =&amp;nbsp;ui32_current_half_cycle_time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ui32_previous_capture_count =&amp;nbsp;ui32_current_capture_count&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;Also, the&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ui32_new_cap_event&lt;/STRONG&gt;&lt;/EM&gt; flag is set to 0.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached project shows that&amp;nbsp;CT16B1_CAP0 on pin PIO1_7,&amp;nbsp;&amp;nbsp;&amp;nbsp;CT16B1_CAP1 on pin PIO1_18 and&amp;nbsp;CT16B0_CAP0 on pin PIO0_2 are configured since three frequencies are to be measured.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help regarding this would be highly appreciated.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Akhilesh Sreedharan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 06:55:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755879#M30419</guid>
      <dc:creator>akhilesh_sreedh</dc:creator>
      <dc:date>2018-06-06T06:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755880#M30420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akhilesh Sreedharan,&lt;BR /&gt;Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.&lt;BR /&gt;Firstly, I think the computing algorithm of frequency can work, secondly, I was wondering if you can introduce what kind of the problem happen in details.&lt;/P&gt;&lt;P&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>Thu, 07 Jun 2018 01:31:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755880#M30420</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-06-07T01:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755881#M30421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jeremy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most of the times the frequency read in&amp;nbsp;&lt;EM&gt;&lt;STRONG style="color: #51626f; border: 0px; font-weight: bold;"&gt;ui32_frequency&lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG style="color: #51626f; border: 0px; font-weight: bold;"&gt;&amp;nbsp;&lt;/STRONG&gt;variable is 50000 when 50.000Hz is applied at the input. However, at times it is observed that the some&amp;nbsp;random values of frequencies are read. I have observed values like 53000, 62000, 82000 etc. being read. The error doesn't persist and it gets corrected very soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know what is causing this problem. Is this the result of some wrong configurations in timer or the capture?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Akhilesh.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 03:26:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755881#M30421</guid>
      <dc:creator>akhilesh_sreedh</dc:creator>
      <dc:date>2018-06-07T03:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755882#M30422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="310121" data-username="akhilesh_sreedharan" href="https://community.nxp.com/people/akhilesh_sreedharan"&gt;Akhilesh Sreedharan&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;Please giving a try after reomve pull-up setting when configure the capture pin.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31235i6FA62CCA1EC2D118/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In addition, I was wondering if you can introudce the testing process in details.&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>Thu, 07 Jun 2018 07:53:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755882#M30422</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-06-07T07:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755883#M30423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Jeremy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal pull-up was added to prevent the capture interrupt from getting triggered due to any noise. Intially, I had not enabled the internal pull-up in my code and I was getting garbage&amp;nbsp; frequency readings even when the inputs square wave was not applied. Enabling the internal pull-up solved that problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, regarding the testing process I had added the following to the end of the while (1) in the main:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;if(channels[0].ui32_frequency&amp;gt;51000 ||channels[0].ui32_frequency&amp;lt;49000)
 {
 isFreq_Wrong = TRUE;
 }‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;isFreq_Wrong&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;is a boolean variable defined in&amp;nbsp;begining of&amp;nbsp;main.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do the testing I had applied the input and after some time (after few cycles had passed) breakpoint was placed on &lt;EM&gt;&lt;STRONG&gt;isFreq_Wrong&lt;/STRONG&gt;&lt;/EM&gt; statement in the main. The code was found to encounter the breakpoint,&amp;nbsp;few seconds (approx 30s to 1min)&amp;nbsp;after the breakpoint was placed. The frequency which was read on the watch window did not match the applied value of 50Hz.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had repeated this on all the channels and the same problem was observed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Akhilesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 08:45:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755883#M30423</guid>
      <dc:creator>akhilesh_sreedh</dc:creator>
      <dc:date>2018-06-07T08:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755884#M30424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akhilesh Sreedharan,&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;I'd like to simplify your code for testing, just use one timer to measure the frequency and another timer is used to generating 50Hz PWM, and I will respond to you later.&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>Thu, 07 Jun 2018 09:04:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755884#M30424</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-06-07T09:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755885#M30425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akhilesh Sreedharan,&lt;/P&gt;&lt;P&gt;Hi Akhilesh Sreedharan,&lt;BR /&gt;I've replicated the phenomenon and I'd like to share some suggestion for improvement.&lt;BR /&gt;1. Just use one capturing pins of CT16B0, and the pin will trigger an interrupt on rising edge, in the interrupt, reset the PC courter when detecting the first rising edge and read the capture value on second rising edge.&lt;BR /&gt;This way will simplify the code with overflow handling and allow much more time to compute the frequency, it also avoids interrupts interfering.&lt;BR /&gt;2. Adding a coupling capacitance, get closer to the capture pin would be better, to discard random noise.&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>Fri, 08 Jun 2018 09:33:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755885#M30425</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-06-08T09:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755886#M30426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jeremy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Just use one capturing pins of CT16B0, and the pin will trigger an interrupt on rising edge, in the interrupt, reset the PC courter when detecting the first rising edge and read the capture value on second rising edge.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Does this mean that both the capture inputs of CT16B0 or CT16B1of LPC11U68 cannot be used simultaneously since we have a requirement of using atleast 3 captures available on 16-bit Timer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, since you are suggesting to make the timer counter zero on every rising edge, I feel it will still not solve the problem of overflow handling. This is because the tick of the timer is approx 20ns and the timer will expire in 20nsx65535 = 1.3ms. So in a half cycle span of 10ms atleast 6-7 overflows will be expected and to handle that a match will have to be configured.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Akhilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2018 03:34:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755886#M30426</guid>
      <dc:creator>akhilesh_sreedh</dc:creator>
      <dc:date>2018-06-09T03:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755887#M30427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akhilesh Sreedharan,&lt;BR /&gt;Of course,&amp;nbsp; CT16B0 and CT16B1 can work simultaneously, I 'd recommend you to use one, as I suspect that repeated interrupt handlers are not necessary and it will make the code become more complicated.&lt;BR /&gt;Yes, I made a mistake, it needs to add overflow handling when detecting the frequency of PWM, such as 50 Hz, etc.&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;-----------------------------------------------------------------------------------------------------------------------&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>Sun, 10 Jun 2018 09:48:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755887#M30427</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-06-10T09:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755888#M30428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jeremy,&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Of course,&amp;nbsp; CT16B0 and CT16B1 can work simultaneously, I 'd recommend you to use one, as I suspect that repeated interrupt handlers are not necessary and it will make the code become more complicated.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;My question was, since I have a requirement of using any &lt;STRONG&gt;3 capture channels available with 16-bit timer&lt;/STRONG&gt;. Can I achieve the correct functionality by using&amp;nbsp;&lt;STRONG&gt;CT16B0_CAP0 capture input available with&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;CT16B0&lt;/STRONG&gt; and &lt;STRONG&gt;capture inputs CT16B1_CAP0,&amp;nbsp;CT16B1_CAP1 avaialble along with&amp;nbsp;CT16B1 simultaneously&amp;nbsp;&lt;/STRONG&gt;along with overflow handling?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Akhilesh Sreedharan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 03:18:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755888#M30428</guid>
      <dc:creator>akhilesh_sreedh</dc:creator>
      <dc:date>2018-06-11T03:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755889#M30429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akhilesh Sreedharan,&lt;BR /&gt;As I shared before, one capturing pins of CT16B0 is capable of measuring the frequency in my way, definitely, you can use three pins with the same way simultaneously.&lt;BR /&gt;Please giving it a try.&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>Mon, 11 Jun 2018 03:31:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755889#M30429</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-06-11T03:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755890#M30430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the lpc11u6x, Can anybody can share the logic for calculating the gpio pulse width (Hight to low transition) using time32 without ISR.&lt;/P&gt;&lt;P&gt;I want to count the pulse using timer counter when i am in while loop for checking the condition pulse as high to low or low to high.period in msec or any....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 07:58:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755890#M30430</guid>
      <dc:creator>anilkumarraj200</dc:creator>
      <dc:date>2018-10-01T07:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error in frequency measurement using capture inputs of LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755891#M30431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="295432" data-username="anilkumarraj2001@gmail.com" href="https://community.nxp.com/people/anilkumarraj2001@gmail.com"&gt;anil kumar&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I've attached a 32-bit timer driver, please refer to it for details.&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, 03 Oct 2018 07:15:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Error-in-frequency-measurement-using-capture-inputs-of-LPC11U68/m-p/755891#M30431</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-10-03T07:15:25Z</dc:date>
    </item>
  </channel>
</rss>

