<?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 Software Development Kit中的主题 Re:  ? How to create input-capture (TPM0) Handler in KL25Z</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-create-input-capture-TPM0-Handler-in-KL25Z/m-p/754351#M7732</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Ofir&lt;/P&gt;&lt;P&gt;From hardware perspective, you have to connect the external signal to TPM_CHx pin, all the TPM function share the same interrupt vector, so you have to check the interrupt source in the FTM0_IRQHandler(), which is the ISR of the FTM capture interrupt.&lt;/P&gt;&lt;P&gt;From software perspective, all TPM pins are multiplexed with the GPIO pins, this is the process:&lt;/P&gt;&lt;P&gt;1)enable PORT&amp;nbsp; clock in the SIM_SCGC5&lt;/P&gt;&lt;P&gt;2)set the MUX bits of&amp;nbsp; PORTx_PCRy so that the pin function as TPM.&lt;/P&gt;&lt;P&gt;3)configure the TPM module&lt;/P&gt;&lt;P&gt;4)enable interrupt for example&lt;/P&gt;&lt;P&gt;I attach an example for capture function based on KE02, pls refer to it.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Apr 2018 03:18:32 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2018-04-02T03:18:32Z</dc:date>
    <item>
      <title>? How to create input-capture (TPM0) Handler in KL25Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-create-input-capture-TPM0-Handler-in-KL25Z/m-p/754350#M7731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;BR /&gt;&amp;nbsp;I'm new in programming KL25Z, and I'm trying to understand how I can handle an interrupt in input-capture mode of&amp;nbsp; TPM. I got build-in handles for a lot of ports and timers such as PORT A/D, timer PIT and I don't know who created them or how (I'm working on code that was given to me&amp;nbsp;by university).&amp;nbsp;unfortunately, there is not any handler for any TPM.&lt;BR /&gt;without having an handler for it, it seems to me useless to use&amp;nbsp;&amp;nbsp;input-capture mode.&lt;BR /&gt;&lt;BR /&gt;I'm adding the startup code with all the handlers I got.&amp;nbsp;&lt;BR /&gt;I will appreciate a solution for that,&lt;BR /&gt;&lt;IMG class="js-dropPosition" src="https://assets2.jiveon.com/core/2016.3.9.0.b96715f/images/tiny_mce4/themes/advanced/skins/default/img/dropPosition.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2018 14:08:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-create-input-capture-TPM0-Handler-in-KL25Z/m-p/754350#M7731</guid>
      <dc:creator>ofiryaish</dc:creator>
      <dc:date>2018-03-30T14:08:45Z</dc:date>
    </item>
    <item>
      <title>Re:  ? How to create input-capture (TPM0) Handler in KL25Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-create-input-capture-TPM0-Handler-in-KL25Z/m-p/754351#M7732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Ofir&lt;/P&gt;&lt;P&gt;From hardware perspective, you have to connect the external signal to TPM_CHx pin, all the TPM function share the same interrupt vector, so you have to check the interrupt source in the FTM0_IRQHandler(), which is the ISR of the FTM capture interrupt.&lt;/P&gt;&lt;P&gt;From software perspective, all TPM pins are multiplexed with the GPIO pins, this is the process:&lt;/P&gt;&lt;P&gt;1)enable PORT&amp;nbsp; clock in the SIM_SCGC5&lt;/P&gt;&lt;P&gt;2)set the MUX bits of&amp;nbsp; PORTx_PCRy so that the pin function as TPM.&lt;/P&gt;&lt;P&gt;3)configure the TPM module&lt;/P&gt;&lt;P&gt;4)enable interrupt for example&lt;/P&gt;&lt;P&gt;I attach an example for capture function based on KE02, pls refer to it.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2018 03:18:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-create-input-capture-TPM0-Handler-in-KL25Z/m-p/754351#M7732</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2018-04-02T03:18:32Z</dc:date>
    </item>
  </channel>
</rss>

