<?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>Kinetis Microcontrollers中的主题 Re: TPM count set to zero</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507051#M31853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before TPM_HAL_ClearCounter(TPM2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58384i83AA6646D4BDF94D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After.&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/58420i83E099F3D7A0CB97/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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Mar 2016 12:36:37 GMT</pubDate>
    <dc:creator>calvinday</dc:creator>
    <dc:date>2016-03-07T12:36:37Z</dc:date>
    <item>
      <title>TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507045#M31847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a K66 and the documentation says writing any value to the COUNT register sets it to zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried that and cannot see it reset in the debugger. Is there something else I have to do to cause a reset?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 20:25:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507045#M31847</guid>
      <dc:creator>calvinday</dc:creator>
      <dc:date>2016-03-03T20:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507046#M31848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Calvin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please attach your project, that we can check it and help you sooner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2016 06:05:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507046#M31848</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-03-04T06:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507047#M31849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;// turn off low power timer&lt;BR /&gt;LPTMR_BWR_CSR_TEN(LPTMR0, (uint8_t)false);&lt;/P&gt;&lt;P&gt;// clear interrupts&lt;BR /&gt;TPM_WR_STATUS(TPM2, 1 &amp;lt;&amp;lt; TPM_STATUS_TOF_SHIFT);&lt;BR /&gt;TPM_WR_STATUS(TPM2, 1 &amp;lt;&amp;lt; TPM_STATUS_CH0F_SHIFT);&lt;/P&gt;&lt;P&gt;// turn off tpm clocks&lt;BR /&gt;TPM_HAL_SetClockMode(TPM1, kTpmClockSourceNoneClk);&lt;BR /&gt;TPM_HAL_SetClockMode(TPM2, kTpmClockSourceNoneClk);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;TPM_HAL_ClearCounter(TPM1);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;TPM_HAL_ClearCounter(TPM2);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// restart this timer when lptmr overflows&lt;BR /&gt;TPM_HAL_SetTriggerMode(TPM1, true);&lt;BR /&gt;TPM_HAL_SetTriggerMode(TPM2, true);&lt;/P&gt;&lt;P&gt;TPM_HAL_SetClockMode(TPM1, kTpmClockSourceModuleClk);&lt;BR /&gt;TPM_HAL_SetClockMode(TPM2, kTpmClockSourceModuleClk);&lt;/P&gt;&lt;P&gt;// reset counters&lt;BR /&gt;lptmrCnt = 0;&lt;BR /&gt;ppsTotal1 = 0;&lt;BR /&gt;ppsTotal2 = 0;&lt;/P&gt;&lt;P&gt;// reenable lptmr to overflow in 10 msec&lt;BR /&gt;LPTMR_BWR_CSR_TEN(LPTMR0, (uint8_t)true);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Mar 2016 15:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507047#M31849</guid>
      <dc:creator>calvinday</dc:creator>
      <dc:date>2016-03-06T15:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507048#M31850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Calvin,&lt;/P&gt;&lt;P&gt;From your code , have you turn on the clock of LPTMRO ?&lt;/P&gt;&lt;P&gt;And do you want operate the LPTMR0, if yes , i have not find about your this words&lt;/P&gt;&lt;P&gt;"writing any value to the COUNT register sets it to zero" of LPTMR0 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 04:11:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507048#M31850</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-03-07T04:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507049#M31851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Calvin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you show me a dump of the TPM module registers? Did you see CMOD bits set for TPMx_SC register?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 09:30:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507049#M31851</guid>
      <dc:creator>cutworth</dc:creator>
      <dc:date>2016-03-07T09:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507050#M31852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;43.4.2 Counter (TPMx_CNT)&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 18pt; font-family: HelveticaLTStd-Bold;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The CNT register contains the TPM counter value.&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Reset clears the CNT register. &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Writing any value to COUNT also clears the counter&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When debug is active, the TPM counter does not increment unless configured otherwise.&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Reading the CNT register adds two wait states to the register access due to&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;synchronization delays.&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 12:05:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507050#M31852</guid>
      <dc:creator>calvinday</dc:creator>
      <dc:date>2016-03-07T12:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507051#M31853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before TPM_HAL_ClearCounter(TPM2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58384i83AA6646D4BDF94D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After.&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/58420i83E099F3D7A0CB97/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 12:36:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507051#M31853</guid>
      <dc:creator>calvinday</dc:creator>
      <dc:date>2016-03-07T12:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507052#M31854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;43.5.3.3 Counter Reset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any write to CNT resets the TPM counter and the channel outputs to their initial values&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;(except for channels in output compare mode).&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TPM2 is in the capture mode so that shouldn't be an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;SPAN lang="JA" style="font-family: TimesLTStd-Roman; font-size: 14pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 13:32:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507052#M31854</guid>
      <dc:creator>calvinday</dc:creator>
      <dc:date>2016-03-07T13:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507053#M31855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking I could use the software trigger mode and reload to zero on trigger. But I don't see how to cause a software trigger.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 13:35:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507053#M31855</guid>
      <dc:creator>calvinday</dc:creator>
      <dc:date>2016-03-07T13:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507054#M31856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By disabling the clocks with this statement TPM_HAL_SetClockMode(TPM1, kTpmClockSourceNoneClk), the timers would not reset. Instead, I leave them running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is all that is required at this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TPM_HAL_ClearCounter(TPM1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TPM_HAL_ClearCounter(TPM2);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 15:03:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507054#M31856</guid>
      <dc:creator>calvinday</dc:creator>
      <dc:date>2016-03-07T15:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: TPM count set to zero</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507055#M31857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Calvin,&lt;/P&gt;&lt;P&gt;There is a reset function you can use :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/22230iA60CD51103DE0B59/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice Yang&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, 09 Mar 2016 11:09:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TPM-count-set-to-zero/m-p/507055#M31857</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-03-09T11:09:34Z</dc:date>
    </item>
  </channel>
</rss>

