<?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 Using of TPM to calculate pulse width in KL25Z in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/Using-of-TPM-to-calculate-pulse-width-in-KL25Z/m-p/430343#M3500</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using Init_TPM of KL25Z, trying to calculate the pulse width of the input signal. I have finished the configuration of the component in processor expert. But I have problem to get the calculation result.&lt;/P&gt;&lt;P&gt;Can someone give me an example of using TPM to calculate pulse width or you have another methode to calculate pulse width of a input signal with frdm kl25z.&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Xiaocong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jul 2015 15:20:17 GMT</pubDate>
    <dc:creator>xiaocongfu</dc:creator>
    <dc:date>2015-07-21T15:20:17Z</dc:date>
    <item>
      <title>Using of TPM to calculate pulse width in KL25Z</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Using-of-TPM-to-calculate-pulse-width-in-KL25Z/m-p/430343#M3500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using Init_TPM of KL25Z, trying to calculate the pulse width of the input signal. I have finished the configuration of the component in processor expert. But I have problem to get the calculation result.&lt;/P&gt;&lt;P&gt;Can someone give me an example of using TPM to calculate pulse width or you have another methode to calculate pulse width of a input signal with frdm kl25z.&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Xiaocong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 15:20:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Using-of-TPM-to-calculate-pulse-width-in-KL25Z/m-p/430343#M3500</guid>
      <dc:creator>xiaocongfu</dc:creator>
      <dc:date>2015-07-21T15:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using of TPM to calculate pulse width in KL25Z</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Using-of-TPM-to-calculate-pulse-width-in-KL25Z/m-p/430344#M3501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xiaocong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the&amp;nbsp; input capture function of TPM,&lt;/P&gt;&lt;P&gt;For example , firstly set the rising edge interruption , when run into this interrupt , save the TPM counter and set falling edge interrupt.&lt;/P&gt;&lt;P&gt;and when&amp;nbsp; reach the interrupt , also save the the TPM counter , then&amp;nbsp; calculate&amp;nbsp; the time between the time use the two TPM counter data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Alice&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>Tue, 28 Jul 2015 07:41:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Using-of-TPM-to-calculate-pulse-width-in-KL25Z/m-p/430344#M3501</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-07-28T07:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using of TPM to calculate pulse width in KL25Z</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Using-of-TPM-to-calculate-pulse-width-in-KL25Z/m-p/430345#M3502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;I did the same as you said, but it seems that the edge can not be changed during the excutation of code. &lt;span class="lia-inline-image-display-wrapper" image-alt="event.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54382i3D3FCE5B072B9E63/image-size/large?v=v2&amp;amp;px=999" role="button" title="event.PNG" alt="event.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;and in my code, I use the function :&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Cap1_SelectCaptureEdge(Cap1DeviceData,EDGE_BOTH);&amp;nbsp; or &lt;STRONG style="color: #51626f; font-family: inherit; font-style: inherit;"&gt;Cap1_SelectCaptureEdge(Cap1DeviceData,EDGE_FALLING); &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;to change the property of Edge.&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;All the values I got are time of the apprance of rising edge.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;PS: in my Event.c, I have:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;extern LDD_TDeviceData *Cap1DeviceData;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;extern Cap1_TValueType CapValue_E,Cap_E[4];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;extern&amp;nbsp; int countCap_E;&amp;nbsp; // 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;void Cap1_OnCapture(LDD_TUserData *UserDataPtr)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cap1_GetCaptureValue(Cap1DeviceData,&amp;amp;CapValue_E);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (countCap_E){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 0:&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; if(CapValue_E!=0){&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; Cap_E[countCap_E]=CapValue_E;&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; countCap_E++;&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; Cap1_SelectCaptureEdge(Cap1DeviceData,EDGE_FALLING);&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; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 1:&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; if(CapValue_E!=0){&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; Cap_E[countCap_E]=CapValue_E;&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; countCap_E++;&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; Cap1_SelectCaptureEdge(Cap1DeviceData,EDGE_RISING);&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; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 2:&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; if(CapValue_E!=0){&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; Cap_E[countCap_E]=CapValue_E;&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; countCap_E++;&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; Cap1_SelectCaptureEdge(Cap1DeviceData,EDGE_FALLING);&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; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 3:&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; if(CapValue_E!=0){&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; Cap_E[countCap_E]=CapValue_E;&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; countCap_E = 0;&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; Cap1_SelectCaptureEdge(Cap1DeviceData,EDGE_RISING);&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; Cap1_Reset(Cap1DeviceData);&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; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a signal of 200Hz and 40% duty cycle, TimerUnit counter frequency is 375kHz.&lt;/P&gt;&lt;P&gt;And the result of Cap_E[4] is : 1870,&amp;nbsp; 3745, 5620, 7495. It has a difference of 1875 between two values, 375kHz/1875 = 200Hz. &lt;/P&gt;&lt;P&gt;That is to say, 1870,&amp;nbsp; 3745, 5620, 7495 are the time of rising edge.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 08:03:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Using-of-TPM-to-calculate-pulse-width-in-KL25Z/m-p/430345#M3502</guid>
      <dc:creator>xiaocongfu</dc:creator>
      <dc:date>2015-07-28T08:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using of TPM to calculate pulse width in KL25Z</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Using-of-TPM-to-calculate-pulse-width-in-KL25Z/m-p/430346#M3503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have answered the issue at the discussion thread &lt;A href="https://community.nxp.com/message/540398"&gt;Re: Capture_LDD SelectCaptureEdge&lt;/A&gt; &lt;/P&gt;&lt;P&gt;There is a problem width the update of the channel status and control register (TPMx_CnSC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Marek Neuzil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 08:58:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Using-of-TPM-to-calculate-pulse-width-in-KL25Z/m-p/430346#M3503</guid>
      <dc:creator>marek_neuzil</dc:creator>
      <dc:date>2015-07-29T08:58:03Z</dc:date>
    </item>
  </channel>
</rss>

