<?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: Etimer Pulse Capture in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495771#M2736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks. I correct this line. But the value of CAPT1 is always 0.&amp;nbsp; Actually I'd like to use only the etimer channel 0 to capture the frequency of the signal. It counts the rising edge.&lt;/P&gt;&lt;P&gt;How should I configure it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 May 2016 02:44:31 GMT</pubDate>
    <dc:creator>ronliu</dc:creator>
    <dc:date>2016-05-05T02:44:31Z</dc:date>
    <item>
      <title>Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495767#M2732</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'm working in the MPC5775K.&amp;nbsp; I'd like to use the ETIMER module to capture the frequency of a 2.5MHz signal. I want to get the number of the signal in 1ms. How could I make it? Thanks.&lt;/P&gt;&lt;P&gt;Best Regard.&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 14:14:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495767#M2732</guid>
      <dc:creator>ronliu</dc:creator>
      <dc:date>2016-05-03T14:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495768#M2733</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;You can directly use the Capture feature of the eTimer module to measure the external signal frequency.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;See &lt;/SPAN&gt;&lt;A class="jive-link-wiki-small" data-containerid="11363" data-containertype="14" data-objectid="104285" data-objecttype="102" href="https://community.freescale.com/docs/DOC-104285"&gt;https://community.freescale.com/docs/DOC-104285&lt;/A&gt;&lt;SPAN&gt; for a possible implementation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;However for such high rates the accuracy is low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus the option will be counting of external signal edges per defined interval, e.g. 1 ms and finaly calculate the frequency.&lt;/P&gt;&lt;P&gt;For this case 2 channels can be used. The first channel is set for Gated-count mode, so the counter will count while the selected secondary input signal is high (or low, if SIPS=1). External pin will be selected as primary count source.&lt;/P&gt;&lt;P&gt;Second eTimer channel will be used to generate the gate signal on its output for the first channel, and for example One-shot mode can be used, thus a measurement is SW triggered.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; See Counting mode description of the RM for more info.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 08:43:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495768#M2733</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-05-04T08:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495769#M2734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your sharing code. I'm using the eTimer1 now. &lt;/P&gt;&lt;P&gt;So I adjust some module configuration.&lt;/P&gt;&lt;P&gt;But when I want to capture the pulse.&lt;/P&gt;&lt;P&gt;It's always running the line &lt;STRONG&gt;'while(!(0x0080 &amp;amp; ETIMER_1.CH[1].STS.R)){}&lt;/STRONG&gt;' .&lt;/P&gt;&lt;P&gt;What's wrong with my project? Could you give me some suggestions?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;void FdivInit(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //FDIV&amp;nbsp;&amp;nbsp; PAD_4&amp;nbsp; GPIO[4]&amp;nbsp;&amp;nbsp; Etimer 1 timer channel 0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //SAT_RX PAD_45 GPIO[45]&amp;nbsp; Etimer 1 timer channel 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //GPIO&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIUL2.MSCR[4].B.IBE = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* GPIO[4]: Enable pad for input - eTimer1 ch0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIUL2.MSCR[4].B.PUE = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIUL2.IMCR[27].B.SSS = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* eTimer1 ch0: connected to pad4 */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; SIUL2.MSCR[45].B.IBE = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* GPIO[45]: Enable pad for input - eTimer1 ch1 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; SIUL2.IMCR[28].B.SSS = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* eTimer1 ch1: connected to pad */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //ETIME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.ENBL.R = 0x0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CTRL1.R = 0x3801; &lt;/P&gt;&lt;P&gt; // Counts only rising edge of the MC_CLK (133MHz in RUN0), divide by 1, count up, count repeatedly, rollover&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].COMP1.R = 0xFFFF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CCCTRL.R = 0x0264;&amp;nbsp; // compare on COMP1 when counting up, COMP2 when counting down&lt;BR /&gt;&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; // CAPT2 on falling edge, CAPT1 on rising edge, 2 entries&lt;BR /&gt;&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; // free-running mode&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CTRL3.R = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].CTRL1.R = 0xF001;&amp;nbsp; // cascaded mode, count up, rollover, count repeatedly&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].COMP1.R = 0xFFFF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].CCCTRL.R = 0x0264;&amp;nbsp; // compare on COMP1 when counting up, COMP2 when counting down&lt;BR /&gt;&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; // CAPT2 on falling edge, CAPT1 on rising edge, 2 entries&lt;BR /&gt;&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; // free-running mode&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].CTRL3.R = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.ENBL.R = 0x0003; //Channel 0 and 1&lt;BR /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CCCTRL.B.ARM = 1;&amp;nbsp; // starts the input capture process&lt;BR /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].CCCTRL.B.ARM = 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;void PulseFreqCal(void)&lt;BR /&gt;{&lt;BR /&gt; float freq;&lt;BR /&gt; uint32_t counts, edge1,edge2,edge3,edge4 ;&lt;BR /&gt; uint32_t capture_ch0[8],capture_ch1[8];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CCCTRL.B.ARM = 1;&amp;nbsp; // starts the input capture process&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].CCCTRL.B.ARM = 1;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;while(!(0x0080 &amp;amp; ETIMER_1.CH[1].STS.R)){}&amp;nbsp; // wait for channel 1's capture2 flag&lt;/STRONG&gt;&lt;BR /&gt; while(!(0x0080 &amp;amp; ETIMER_1.CH[0].STS.R)){}&lt;/P&gt;&lt;P&gt; capture_ch1[0] = ETIMER_1.CH[1].CAPT1.R;&lt;BR /&gt; capture_ch1[1] = ETIMER_1.CH[1].CAPT2.R;&lt;BR /&gt; capture_ch1[2] = ETIMER_1.CH[1].CAPT1.R;&lt;BR /&gt; capture_ch1[3] = ETIMER_1.CH[1].CAPT2.R;&lt;/P&gt;&lt;P&gt; capture_ch0[0] = ETIMER_1.CH[0].CAPT1.R;&lt;BR /&gt; capture_ch0[1] = ETIMER_1.CH[0].CAPT2.R;&lt;BR /&gt; capture_ch0[2] = ETIMER_1.CH[0].CAPT1.R;&lt;BR /&gt; capture_ch0[3] = ETIMER_1.CH[0].CAPT2.R;&lt;/P&gt;&lt;P&gt; capture_ch1[4] = ETIMER_1.CH[1].CAPT1.R;&lt;BR /&gt; capture_ch1[5] = ETIMER_1.CH[1].CAPT2.R;&lt;BR /&gt; capture_ch1[6] = ETIMER_1.CH[1].CAPT1.R;&lt;BR /&gt; capture_ch1[7] = ETIMER_1.CH[1].CAPT2.R;&lt;/P&gt;&lt;P&gt; capture_ch0[4] = ETIMER_1.CH[0].CAPT1.R;&lt;BR /&gt; capture_ch0[5] = ETIMER_1.CH[0].CAPT2.R;&lt;BR /&gt; capture_ch0[6] = ETIMER_1.CH[0].CAPT1.R;&lt;BR /&gt; capture_ch0[7] = ETIMER_1.CH[0].CAPT2.R;&lt;/P&gt;&lt;P&gt; edge1 = capture_ch1[0]*65536 + capture_ch0[0]; // save 1st rising edge&lt;BR /&gt; edge2 = capture_ch1[1]*65536 + capture_ch0[1]; // save 1st falling edge&lt;BR /&gt; edge3 = capture_ch1[2]*65536 + capture_ch0[2]; // save 2nd rising edge&lt;BR /&gt; edge4 = capture_ch1[3]*65536 + capture_ch0[3]; // save 2nd falling edge&lt;/P&gt;&lt;P&gt; // calculate period, pulseH, pulseL, freq and duty&lt;BR /&gt; if(edge3 &amp;gt; edge1)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; counts = edge3 - edge1;&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; counts = (0xFFFFFFFF - edge1 + 1) + edge3;&lt;BR /&gt; }&lt;BR /&gt;// freq = (float)100000000.0/counts;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].STS.R = 0x00C0;&amp;nbsp; // clear eTimer0 channel 1's capture1/2 flags&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].STS.R = 0x00C0;&amp;nbsp; // clear eTimer0 channel 0's capture1/2 flags&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 09:49:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495769#M2734</guid>
      <dc:creator>ronliu</dc:creator>
      <dc:date>2016-05-04T09:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495770#M2735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the signal is connected to channel 0, then this channel’s input pin should be selected as secondary clock source for both ch0 and ch1.&lt;/P&gt;&lt;P&gt;Try to use&lt;/P&gt;&lt;P&gt;ETIMER_1.CH[0].CTRL1.R = 0x3800;&lt;/P&gt;&lt;P&gt;ETIMER_1.CH[1].CTRL1.R = 0xF000;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Petr &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 11:26:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495770#M2735</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-05-04T11:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495771#M2736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks. I correct this line. But the value of CAPT1 is always 0.&amp;nbsp; Actually I'd like to use only the etimer channel 0 to capture the frequency of the signal. It counts the rising edge.&lt;/P&gt;&lt;P&gt;How should I configure it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 02:44:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495771#M2736</guid>
      <dc:creator>ronliu</dc:creator>
      <dc:date>2016-05-05T02:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495772#M2737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see attached example I created and tested on the MPC5775K EVB. It works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 12:39:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495772#M2737</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-05-05T12:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495773#M2738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;I'm using Etimer1 Channel 0 to capture the pulse on the MPC5775K.&amp;nbsp; The GPIO is PAD_4.&amp;nbsp; And I only want to count the rising edge.&amp;nbsp; I don't understand the CAPT 4-deep FIFO.The below part is my test code. I adjust some lines to adapt my own hardware platform.&amp;nbsp; But it couldn't work. The value of CAPT is always 0. Could you correct it for me? GPIO? Etimer?&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; void EtimerCapture(void)&lt;BR /&gt; {&lt;BR /&gt; //FDIV&amp;nbsp;&amp;nbsp; PAD_4&amp;nbsp; GPIO[4]&amp;nbsp;&amp;nbsp; Etimer 1 timer channel 0&lt;/P&gt;&lt;P&gt; //GPIO&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIUL2.MSCR[4].B.IBE = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* GPIO[4]: Enable pad for input - eTimer1 ch0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIUL2.IMCR[27].B.SSS = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* eTimer1 ch0: connected to pad4 */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //ETIMER&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.ENBL.R = 0x0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CTRL1.R = 0x3800;&amp;nbsp; // Counts only rising edge of the MC_CLK (133MHz in RUN0), divide by 1, count up, count repeatedly, rollover&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].COMP1.R = 0xFFFF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CCCTRL.R = 0x0264;&amp;nbsp; // compare on COMP1 when counting up, COMP2 when counting down&lt;BR /&gt;&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; // CAPT2 on falling edge, CAPT1 on rising edge, 2 entries&lt;BR /&gt;&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; // free-running mode&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CTRL3.R = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.ENBL.R = 0x0001; //Channel 0&lt;BR /&gt; &lt;BR /&gt; ETIMER_1.CH[0].CCCTRL.B.ARM = 1;&lt;BR /&gt; while(!(0x0080 &amp;amp; ETIMER_1.CH[0].STS.R)){}&lt;BR /&gt; short capture_ch0[4],capture_ch1[4];&lt;/P&gt;&lt;P&gt; capture_ch0[0] = ETIMER_1.CH[0].CAPT1.R;&lt;BR /&gt; capture_ch0[1] = ETIMER_1.CH[0].CAPT1.R;&lt;BR /&gt; capture_ch0[2] = ETIMER_1.CH[0].CAPT1.R;&lt;BR /&gt; capture_ch0[3] = ETIMER_1.CH[0].CAPT1.R;&lt;/P&gt;&lt;P&gt; capture_ch1[0] = ETIMER_1.CH[0].CAPT2.R;&lt;BR /&gt; capture_ch1[1] = ETIMER_1.CH[0].CAPT2.R;&lt;BR /&gt; capture_ch1[2] = ETIMER_1.CH[0].CAPT2.R;&lt;BR /&gt; capture_ch1[3] = ETIMER_1.CH[0].CAPT2.R;&lt;/P&gt;&lt;P&gt; ETIMER_1.CH[0].STS.R = 0x00C0;&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 07:37:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495773#M2738</guid>
      <dc:creator>ronliu</dc:creator>
      <dc:date>2016-05-13T07:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495774#M2739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;My project is working now . But there is a new problem that the frequency of signal is too high. I couldn't get the exact frequency of the signal by capturing double rising edges. So I'd like to capture a thousand times of rising edges and count the total time. How could I make it work.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 09:21:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495774#M2739</guid>
      <dc:creator>ronliu</dc:creator>
      <dc:date>2016-05-18T09:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495775#M2740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Yes, that is a drawback of this method I pointed to in the first reply. For the high input rates the accuracy will be low.&lt;/P&gt;&lt;P&gt;I also outlined option for counting external edges over defined time. See the first reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 10:45:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495775#M2740</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-05-18T10:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495776#M2741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;You're right. The accuracy is low. I review your reply again. But I'm not clear how to use these two channels to capture this signal. Could you please write a very simple project to function well for me?&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 01:37:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495776#M2741</guid>
      <dc:creator>ronliu</dc:creator>
      <dc:date>2016-05-19T01:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495777#M2742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following your instructions, I have tried some methods to configure the registers.&amp;nbsp; It's really a difficult problem for me to make it work now. Could you help me, please? &lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 10:10:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495777#M2742</guid>
      <dc:creator>ronliu</dc:creator>
      <dc:date>2016-05-23T10:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495778#M2743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;uint32_t counts;&lt;/P&gt;&lt;P&gt;float freq,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void eTimer_Init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.ENBL.R = 0x0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // disable Timer1 channels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CTRL1.R = 0x6011;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Counts only rising edge of ch0 input while secondary (ch1 output) is high,&lt;/P&gt;&lt;P&gt;&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;&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;&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; // count up, count repeatedly, rollover&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].CTRL1.R = 0x1FC0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // counts rising edge of MCclock/128, count till compare then stop and reinit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].CTRL2.R = 0x8009;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // output enable, assert while counter is active, clear if stopped&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].COMP1.R = 16625;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // generate 16ms pulse on output, assuming MCclock=133MHz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].CCCTRL.R = 0x0200;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // compare with COMP1 if counting up, with COMP2 if counting down&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.ENBL.R = 0x0003;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable Timer1 channel 0/1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void main (void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&amp;nbsp; eTimer_Init();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].CTRL1.B.CNTMODE = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // start measurement&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!(0x0002 &amp;amp; ETIMER_1.CH[1].STS.R)){};&amp;nbsp; // wait for channel compare flag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; counts = ETIMER_1.CH[0].CNTR.R;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[0].CNTR.R = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETIMER_1.CH[1].STS.R = 2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; freq = counts/0.016;&lt;/P&gt;&lt;P&gt;&amp;nbsp; } &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frequency resolution is given by measuring window, ▲fx = 1/Tn, here ▲fx= 1/.016 = 62.5Hz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 12:31:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495778#M2743</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-05-23T12:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Etimer Pulse Capture</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495779#M2744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Petr,&lt;/P&gt;&lt;P&gt;Thank you very much. It could work now.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 02:47:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Etimer-Pulse-Capture/m-p/495779#M2744</guid>
      <dc:creator>ronliu</dc:creator>
      <dc:date>2016-05-24T02:47:21Z</dc:date>
    </item>
  </channel>
</rss>

