<?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 No interrupts with MKL04 PIT in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700726#M43091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having an issue with the&amp;nbsp;MKL04Z8VFK4 PIT setup. &amp;nbsp;I've used the following code for years on various Kinetis controllers:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;PIT_MCR &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;= 0x0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;PIT_LDVAL1&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;= 20000L;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;PIT_TCTRL1&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;= PIT_TCTRL_TIE_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;PIT_TCTRL1 |= PIT_TCTRL_TEN_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;enable_irq(&lt;SPAN class=""&gt;PIT_IRQn&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;enable_irq calls&amp;nbsp;NVIC_EnableIRQ.&amp;nbsp;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Also, in main before the timer is initialized, the following is set:&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;SIM_SCGC6 |= SIM_SCGC6_PIT_MASK |&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SIM_SCGC6_ADC0_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;For some reason with this microcontroller, I'm not getting any interrupts.&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;In checking the documentation, the reference manual, KL04P48M48SF1RM.pdf, lists the TIE and TEN bits as bits 30 and 31 of the PIT_TCTRLn registers (these registers are numbered backwards compared to other registers in the same pdf file). &amp;nbsp;The PIT_TCTLR_TIE_MASK is declared as 0x2u and PIT_TCTRL_TEN_MASK is declared as 0x1u in MKL04Z4.h which is automatically included when the project was created.&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I have stepped through all the code to make sure everything is being executed. &amp;nbsp;Interrupts are enabled by calling EnableInterrupts declared as:&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt; EnableInterrupts &lt;SPAN class=""&gt;&lt;STRONG&gt;__asm&lt;/STRONG&gt;&lt;/SPAN&gt;(&lt;SPAN class=""&gt;" CPSIE i"&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;So two things -- it appears as though either the include file, or the documentation is wrong (see attached files). &amp;nbsp;Also, I've tried it both ways and interrupts are not happening. &amp;nbsp;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Any suggestions?&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337449"&gt;MKL04Z4.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Aug 2017 01:12:55 GMT</pubDate>
    <dc:creator>JBM</dc:creator>
    <dc:date>2017-08-17T01:12:55Z</dc:date>
    <item>
      <title>No interrupts with MKL04 PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700726#M43091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having an issue with the&amp;nbsp;MKL04Z8VFK4 PIT setup. &amp;nbsp;I've used the following code for years on various Kinetis controllers:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;PIT_MCR &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;= 0x0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;PIT_LDVAL1&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;= 20000L;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;PIT_TCTRL1&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;= PIT_TCTRL_TIE_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;PIT_TCTRL1 |= PIT_TCTRL_TEN_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;enable_irq(&lt;SPAN class=""&gt;PIT_IRQn&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;enable_irq calls&amp;nbsp;NVIC_EnableIRQ.&amp;nbsp;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Also, in main before the timer is initialized, the following is set:&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;SIM_SCGC6 |= SIM_SCGC6_PIT_MASK |&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SIM_SCGC6_ADC0_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;For some reason with this microcontroller, I'm not getting any interrupts.&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;In checking the documentation, the reference manual, KL04P48M48SF1RM.pdf, lists the TIE and TEN bits as bits 30 and 31 of the PIT_TCTRLn registers (these registers are numbered backwards compared to other registers in the same pdf file). &amp;nbsp;The PIT_TCTLR_TIE_MASK is declared as 0x2u and PIT_TCTRL_TEN_MASK is declared as 0x1u in MKL04Z4.h which is automatically included when the project was created.&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I have stepped through all the code to make sure everything is being executed. &amp;nbsp;Interrupts are enabled by calling EnableInterrupts declared as:&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt; EnableInterrupts &lt;SPAN class=""&gt;&lt;STRONG&gt;__asm&lt;/STRONG&gt;&lt;/SPAN&gt;(&lt;SPAN class=""&gt;" CPSIE i"&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;So two things -- it appears as though either the include file, or the documentation is wrong (see attached files). &amp;nbsp;Also, I've tried it both ways and interrupts are not happening. &amp;nbsp;&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Any suggestions?&lt;/P&gt;&lt;P class="" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337449"&gt;MKL04Z4.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 01:12:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700726#M43091</guid>
      <dc:creator>JBM</dc:creator>
      <dc:date>2017-08-17T01:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: No interrupts with MKL04 PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700727#M43092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Check that the PIT interrupt ID is 22 - it is the same for all KL parts with PIT.&lt;/P&gt;&lt;P&gt;2. The PIT bit numbering is a document errata which has been discussed in another thread somewhere - the header bit defines are correct.&lt;/P&gt;&lt;P&gt;3. I don't think that the KL04 has any reported PIT erratas but I would add erratas 7914 and 2682 workarounds to be sure.&lt;BR /&gt;As reference I have attached the PIT module from the uTasker project that is compatible with all Kinetis (K,K,KEA,KL,KV,KM,KW) parts and includes/documents PIT errata workarounds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 02:13:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700727#M43092</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-08-17T02:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: No interrupts with MKL04 PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700728#M43093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for that. &amp;nbsp;I looked through the code you posted and didn't see anything that struck me as odd or different. &amp;nbsp;I tried both errata and no luck. &amp;nbsp;Just in case it was something I was doing that is stupid, I created a new project (see below) and it also does not get an interrupt. &amp;nbsp;This is straight out of the reference manual (with the exception of the 20000UL as the counter value). &amp;nbsp; I also tried timer 0, not that it should make any difference -- same thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anybody has any other ideas, I would love to hear them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;/*&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;#include &amp;lt;stdint.h&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;#include "MKL04Z4.h"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;uint32_t counter = 0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;void PIT_IRQHandler(void)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;counter++;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_TFLG1 = PIT_TFLG_TIF_MASK;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;int main(void)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;int i;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;volatile uint32_t c;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SIM_SCGC6 |= SIM_SCGC6_PIT_MASK;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;__asm("CPSIE i");&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_MCR = 0x0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_LDVAL1 = 20000L;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_TCTRL1 = PIT_TCTRL_TIE_MASK;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_TCTRL1 |= PIT_TCTRL_TEN_MASK;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;NVIC_EnableIRQ(PIT_IRQn);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;/*&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; *&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;for (;;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c = PIT_CVAL1;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i++;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* Never leave main */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2017 01:41:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700728#M43093</guid>
      <dc:creator>JBM</dc:creator>
      <dc:date>2017-08-18T01:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: No interrupts with MKL04 PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700729#M43094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;I haven't found any obvious problems in your program. Maybe you can attached the whole project after zip it. So that we can test it directly.&lt;/P&gt;&lt;P&gt;You can test the attached project generated by Processor Expert with KDS3.2. It can always run into the PE_ISR(PIT_isr).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PIT_ISR.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25364i46C33C35FC580BD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="PIT_ISR.png" alt="PIT_ISR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;During debug, can you observe the value of PIT_CVAL1 decrease?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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>Fri, 18 Aug 2017 08:41:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700729#M43094</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-08-18T08:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: No interrupts with MKL04 PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700730#M43095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I checked PIT_CVAL1, it is decreasing. &amp;nbsp;I have attached the test project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Aug 2017 01:33:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700730#M43095</guid>
      <dc:creator>JBM</dc:creator>
      <dc:date>2017-08-19T01:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: No interrupts with MKL04 PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700731#M43096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quick question on the project you attached. &amp;nbsp;It uses the Processor Expert and the Kinetis SDK, right? &amp;nbsp;What compiler does that use? &amp;nbsp;I don't seem to be able to open it and make it run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the gcc compiler on a recommendation from NXP due to a bug when returning structures. &amp;nbsp;I had some vector routines on a K22 that didn't work with the other compiler -- they said the only way to solve my problem was to switch to gcc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Aug 2017 15:59:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700731#M43096</guid>
      <dc:creator>JBM</dc:creator>
      <dc:date>2017-08-19T15:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: No interrupts with MKL04 PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700732#M43097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just for the fun of it, I checked the value of the PIT_TFLG1 register -- it has the TIF bit set when the counter is zero. &amp;nbsp;After I write 0x01 to PIT_TFLG1 register, it is zero. &amp;nbsp;So it is set correctly and clears correctly, but no interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also verified the PIT_IRQHandler interrupt in startup_MKL04Z4.S is the 22nd interrupt (the right place in the interrupt vector table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;/*&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;*/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;#include &amp;lt;stdint.h&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;#include "MKL04Z4.h"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;uint32_t counter = 0;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;void PIT_IRQHandler(void)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;counter++;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_TFLG1 = PIT_TFLG_TIF_MASK;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;int main(void)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;int i;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;volatile uint32_t c;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SIM_SCGC6 |= SIM_SCGC6_PIT_MASK;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_MCR = 0x01;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_LDVAL1 = 20000UL;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_TCTRL1 = PIT_TCTRL_TIE_MASK;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_TCTRL1 |= PIT_TCTRL_TEN_MASK;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;NVIC_EnableIRQ(PIT_IRQn);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;__asm("CPSIE i");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;for (;;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c = PIT_CVAL1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (0 == c)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c = PIT_TFLG1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PIT_TFLG1 = 0x1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c = PIT_TFLG1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i++;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* Never leave main */&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Aug 2017 23:59:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700732#M43097</guid>
      <dc:creator>JBM</dc:creator>
      <dc:date>2017-08-19T23:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: No interrupts with MKL04 PIT</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700733#M43098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The project is generated by Processor Expert with &lt;A href="http://www.nxp.com/products/wireless-connectivity/2.4-ghz-wireless-solutions/bluetooth-low-energy-ble/kinetis-design-studio-integrated-development-environment-ide:KDS_IDE"&gt;KDS3.2 ide&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I can't build your project either with CodeWarrior10.7 and KDS3.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Aug 2017 07:21:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/No-interrupts-with-MKL04-PIT/m-p/700733#M43098</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-08-21T07:21:25Z</dc:date>
    </item>
  </channel>
</rss>

