<?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: PROBLEM IN CREATING INTERRUPT THROUGH PIT in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265573#M8545</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to Zhe Tian's reply, please refer below PIT example code for K60 100MHz product.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Apr 2013 02:59:40 GMT</pubDate>
    <dc:creator>Hui_Ma</dc:creator>
    <dc:date>2013-04-19T02:59:40Z</dc:date>
    <item>
      <title>PROBLEM IN CREATING INTERRUPT THROUGH PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265571#M8543</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 am trying to create an interrupt through pit.&lt;/P&gt;&lt;P&gt;But I didn't find any resourceful material in order to call an interrupt.&lt;/P&gt;&lt;P&gt;I want to know what all modification is required to be done in order to call interrupt isr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All i know is I have to define vector in isr.h for the required isr function only. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Apr 2013 06:08:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265571#M8543</guid>
      <dc:creator>gagangarg</dc:creator>
      <dc:date>2013-04-13T06:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN CREATING INTERRUPT THROUGH PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265572#M8544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I do not know which series chip you use. So here, I give you a PIT example initial code for your reference. In this code, it use interrupt flag check method.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ///////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_MCR= 0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_LDVAL = 0x16E3600; &lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_TCTRL = PIT_TCTRL0_TIE_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_TCTRL |= PIT_TCTRL0_TEN_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(PIT_TFLG == 0) ;//Waiting Interrupt &lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_TFLG&amp;nbsp; = PIT_TFLG0_TIF_MASK; // Clear Interrupt flag&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_TCTRL = 0 ; //Disable TEN&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ///////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 12:00:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265572#M8544</guid>
      <dc:creator>Paul_Tian</dc:creator>
      <dc:date>2013-04-18T12:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN CREATING INTERRUPT THROUGH PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265573#M8545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to Zhe Tian's reply, please refer below PIT example code for K60 100MHz product.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 02:59:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265573#M8545</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2013-04-19T02:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN CREATING INTERRUPT THROUGH PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265574#M8546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Gagan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Here is a simple example for the KL25Z MCU.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;// PIT Initialization&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;SIM_SCGC6 |= SIM_SCGC6_PIT_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable the clock to the PIT module&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;PIT_LDVAL0 = 8000000;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Default start value &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;PIT_MCR = PIT_MCR_FRZ_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable clock for timer, freeze timer in debug mode &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;PIT_TCTRL0 = PIT_TCTRL_TIE_MASK | PIT_TCTRL_TEN_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable timer and timer interrupt &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;// Initialize the NVIC to enable the PIT interrupt &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;NVIC_ICPR |= 1 &amp;lt;&amp;lt; ((INT_PIT - 16) % 32);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;NVIC_ISER |= 1 &amp;lt;&amp;lt; ((INT_PIT - 16) % 32);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;In CW 10.3 and for FRDM-KL25Z the GCC compiler is used, this compiler creates the vector table with the names of each interrupt. So it is just necessary to name you ISR with the same name in the vector table (PIT_IRQHandler in the kinetis_sysinit.c).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;void PIT_IRQHandler()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;PIT_TCTRL0 = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #3f7f5f;"&gt;// Disable timer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0.5in;"&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;PIT_TFLG0 |= PIT_TFLG_TIF_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #3f7f5f;"&gt;// Clear the timer interrupt flag&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0.5in;"&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;PIT_TCTRL0 |= PIT_TCTRL_TEN_MASK | PIT_TCTRL_TIE_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3f7f5f;"&gt;/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #3f7f5f;"&gt;/ Enable timer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Hope it helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Tomas&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 13:34:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265574#M8546</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2013-04-19T13:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN CREATING INTERRUPT THROUGH PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265575#M8547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P&gt;Hello Tomas, i'm trying to follow your example but it didn't work...i've copied your code but i've a question...i have to write the instruction for the interrupt in Kinetis_sysinit.c or in main.c?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Davide.&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 13:35:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PROBLEM-IN-CREATING-INTERRUPT-THROUGH-PIT/m-p/265575#M8547</guid>
      <dc:creator>davidemanzati</dc:creator>
      <dc:date>2014-12-11T13:35:46Z</dc:date>
    </item>
  </channel>
</rss>

