<?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: MPC5744 etimer capture fail in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685288#M8364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you will clear the capture FIFO by reading the CAPT1/CAPT2 registers.&lt;BR /&gt;&lt;/SPAN&gt;CTRL3[CnFCNT] bits reflect number of words in CAPTn FIFO, so can be used to know how many times the CATPn should be read.&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, 02 Aug 2017 05:00:29 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2017-08-02T05:00:29Z</dc:date>
    <item>
      <title>MPC5744 etimer capture fail</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685285#M8361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NXP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using etimer capture with MPC5744p chip.&lt;/P&gt;&lt;P&gt;I want to implement etimer capture by port A0 and get data and enter interrupt ISR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When CFWM=0 after etimer capture done, it can enter into interrupt IRQ.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But CFWM=1 or CFWM=2 after etimer capture done, it can't enter into interrupt IRQ.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In this time the C2FCNT and C1FCNT always 0 that means the capture FIFO is not working ???&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want use etimer and 1 capture pin to detect frequency.&lt;/P&gt;&lt;P&gt;Does following setting correct??&lt;BR /&gt;Please Help me thanks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The following setting as bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ETIMER_0.ENBL.R = 0x0; // disable Timer0 channels&lt;/P&gt;&lt;P&gt;ETIMER_0.CH[0].CTRL1.R = 0x3801; // Counts only rising edge of the MC_CLK (100MHz in RUN0),&lt;BR /&gt;// divide by 1, count up, count repeatedly, rollover&lt;BR /&gt;ETIMER_0.CH[0].CTRL1.B.SECSRC = 0;&lt;/P&gt;&lt;P&gt;ETIMER_0.CH[0].COMP1.R = 0xFFFF;&lt;BR /&gt;ETIMER_0.CH[0].CCCTRL.R = (0x0264) ; // compare on COMP1 when counting up, COMP2 when counting down&lt;BR /&gt;// CAPT2 on falling edge, CAPT1 on rising edge, 2 entries&lt;BR /&gt;// free-running mode&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ETIMER_0.CH[0].CCCTRL.B.ONESHOT = 1;&lt;/P&gt;&lt;P&gt;ETIMER_0.CH[0].CCCTRL.B.CFWM = 1; //capture flag set as soon as more than 3 values will be in FIFOs&lt;BR /&gt;//CFWM=1: 2 capture enter IRQ, CFWM=0: 1 capture enter IRQ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ETIMER_0.CH[0].CTRL3.R = 0; //1:halt channel during debug mode, 0:Continue with normal operation during debug mode. (default)&lt;/P&gt;&lt;P&gt;ETIMER_0.CH[0].CTRL3.B.ROC = 0x03;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//interrupt&lt;BR /&gt;ETIMER_0.CH[0].INTDMA.B.ICF1IE = 1;&lt;BR /&gt;ETIMER_0.CH[0].INTDMA.B.ICF2IE = 1;&lt;BR /&gt;INTC_0.PSR[611].R = 0x8003; //priority setting 611 is INT vector index&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//---clear interrupt flag&lt;BR /&gt;ETIMER_0.CH[0].STS.R=0xFFC0;&lt;/P&gt;&lt;P&gt;//=====pad setting&lt;BR /&gt;SIUL2.MSCR[0].B.IBE = 1; /* PA1: Enable pad for input - eTimer0 ch1 */&lt;BR /&gt;// SIUL2.MSCR[0].B.HYS = 1;&lt;BR /&gt;SIUL2.IMCR[59].B.SSS = 2; /* eTimer0 ch1: connected to pad PA1 */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ETIMER_0.ENBL.R = 0x0001; // Enable Timer0 channel 0&lt;/P&gt;&lt;P&gt;ETIMER_0.CH[0].CCCTRL.R |= 1; // starts the input capture process&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 06:37:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685285#M8361</guid>
      <dc:creator>jefferson_ll</dc:creator>
      <dc:date>2017-07-27T06:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744 etimer capture fail</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685286#M8362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue, you have, is because the ONESHOT mode is selected. In this case after ARM is set single capture is performed, then no further captures will be performed until the ARM bit is set again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some time ago I posted frequency measurement example in the Community, you can refer to it; see&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-104285"&gt;https://community.nxp.com/docs/DOC-104285&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-330571"&gt;https://community.nxp.com/docs/DOC-330571&lt;/A&gt;&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, 27 Jul 2017 08:31:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685286#M8362</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2017-07-27T08:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744 etimer capture fail</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685287#M8363</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;&lt;BR /&gt;Thanks for your description about ONESHOT and ARM bit.&lt;/P&gt;&lt;P&gt;I have modified the register setting the ONESHOT bit to 0 as free run mode and CFWM bit to 1.&lt;/P&gt;&lt;P&gt;In this case set ARM bit to 1, the rising and falling interrupt could be triggered after two times capture repeatedly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another question needs your help.&lt;/P&gt;&lt;P&gt;When the ARM bit to 1 the capture function works continuously when external signal always imports.&lt;/P&gt;&lt;P&gt;After some times capture the ARM bit set to 0 the capture function stopped.&lt;/P&gt;&lt;P&gt;There are no any rising and falling interrupt be triggered.&lt;/P&gt;&lt;P&gt;But I want to clear CAPT1 and CAPT2 before ARM bit to 1 again.&lt;/P&gt;&lt;P&gt;How do I clear CAPT1 and CAPT2 ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 01:32:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685287#M8363</guid>
      <dc:creator>jefferson_ll</dc:creator>
      <dc:date>2017-08-02T01:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744 etimer capture fail</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685288#M8364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you will clear the capture FIFO by reading the CAPT1/CAPT2 registers.&lt;BR /&gt;&lt;/SPAN&gt;CTRL3[CnFCNT] bits reflect number of words in CAPTn FIFO, so can be used to know how many times the CATPn should be read.&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, 02 Aug 2017 05:00:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685288#M8364</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2017-08-02T05:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744 etimer capture fail</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685289#M8365</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;converted the attached example for MPC5643L board. The code gets stuck at -&amp;nbsp;&lt;/P&gt;&lt;P&gt;while(!(0x0080 &amp;amp; ETIMER_0.CHANNEL[1].STS.R)){} // wait for channel 1's capture2 flag&lt;BR /&gt;while(!(0x0080 &amp;amp; ETIMER_0.CHANNEL[0].STS.R)){}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get a 32-bit counter going and need to read the values of CAPT1 and CAPT2 for it when the ICF2 flag is set. My code is getting stuck though and the flag never gets set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what might be going on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tanmayee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 14:58:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744-etimer-capture-fail/m-p/685289#M8365</guid>
      <dc:creator>tanmayeesapre</dc:creator>
      <dc:date>2018-03-05T14:58:02Z</dc:date>
    </item>
  </channel>
</rss>

