<?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: PIT Does not Seem to Work Properly After Waking from VLPS in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1552658#M64293</link>
    <description>&lt;P&gt;Wow, that seems to have fixed the issue. When I inherited this function I assumed the WFI operation was trivial. Still not sure why there is only an issue after VLPS, but I can go and learn more about WFE and WFI.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2022 15:21:51 GMT</pubDate>
    <dc:creator>nick_schneider</dc:creator>
    <dc:date>2022-11-11T15:21:51Z</dc:date>
    <item>
      <title>PIT Does not Seem to Work Properly After Waking from VLPS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1548510#M64267</link>
      <description>&lt;P&gt;When I attempt to initialize the PIT after waking from VLPS, the PIT does not behave how I would expect. From what I can tell, the PIT is taking 18,707 times longer to trigger an interrupt after waking from VLPS when compared to before doing any operation related to VLPS.&lt;/P&gt;&lt;P&gt;I hope the attached code explains what I am attempting to do well enough. I made a barebones program where I use the PIT to wait 1ms. Everything works before I enter VLPS but after I come out of VLPS it is taking 18.707s to do the same wait operation. If I do it with a 2ms baseline it will take 37.413s after VLPS and so on. If I keep the PIT constantly on it seems to interrupt in a consistent manner but if I try to fully init OR just restart the timer using&amp;nbsp;PIT_StartTimer() after VLPS I get this really long wait.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would really like to be able to turn off the PIT and only periodically use it otherwise I would just leave it on. I checked everything I could think of after doing the VLPS operation including verifying the power mode state (SMC_GetPowerModeState()), verifying the bus clock rate (CLOCK_GetBusClkFreq()), checking the priority of the PIT irq (NVIC_GetPriority()), calling all initialization functions again, and others but nothing I saw seemed out of place.&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Device:&amp;nbsp;MKL16Z128VFM4&lt;/P&gt;&lt;P&gt;Installed SDK: SDK_2.x_MKL16Z128xxx4 version 2.2.0 manifest version 3.0.0&lt;/P&gt;&lt;P&gt;IDE: MCUExpresso version 11.6.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 21:15:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1548510#M64267</guid>
      <dc:creator>nick_schneider</dc:creator>
      <dc:date>2022-11-03T21:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Does not Seem to Work Properly After Waking from VLPS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1548641#M64268</link>
      <description>&lt;P&gt;Hi&amp;nbsp;nick_schneider,&lt;/P&gt;
&lt;P&gt;Can you send a complete test project, so that I can test it on FRDM-KL26Z board? I am not able to test your pit_issue_example.c due to lack of some configurations, such as clock configuration, LPTMR settings, etc.&lt;BR /&gt;Is it PEE mode before entering VLPS? Note: &lt;EM&gt;During exits from LLS or VLPS when the MCG is in PEE&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;mode, the MCG will reset to PBE clock mode and the C1[CLKS] and S[CLKST] will automatically be set to 2’b10.&lt;/EM&gt;&lt;BR /&gt;The clock source of PIT is Bus clock, please output it to CLKOUT pin. (&lt;BR /&gt;SIM_SOPT2[CLKOUTSEL]=010 Bus clock&lt;BR /&gt;Configure the PTC3 as CLKOUT function by change the PORTC_PCR3[MUX]=101 Alternative 5&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;Please tell me how to measure time of PIT. Do you measure the time of high pulse at LED after power on? Or measure in debug mode?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Robin&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 03:50:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1548641#M64268</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2022-11-04T03:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Does not Seem to Work Properly After Waking from VLPS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1551103#M64283</link>
      <description>&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;I will look into getting a complete project set up that I can hand over. Also, I will look into setting the Bus clock to the CLKOUT pin and the related suggestions.&lt;/P&gt;&lt;P&gt;For measuring the time of the PIT, I was measuring the pulse of the LED after power on using an oscilloscope .&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 14:19:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1551103#M64283</guid>
      <dc:creator>nick_schneider</dc:creator>
      <dc:date>2022-11-09T14:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Does not Seem to Work Properly After Waking from VLPS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1551175#M64285</link>
      <description>&lt;P&gt;Here is a full project that I hope demonstrates what I am trying to do a little better than the previous files. Let me know if there are any issues using this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am still looking into the tips and suggestions mentioned above.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 15:35:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1551175#M64285</guid>
      <dc:creator>nick_schneider</dc:creator>
      <dc:date>2022-11-09T15:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Does not Seem to Work Properly After Waking from VLPS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1551213#M64286</link>
      <description>&lt;P&gt;Hey Robin,&lt;/P&gt;&lt;P&gt;I have checked a few more things that you recommended.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Is it PEE mode before entering VLPS?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;- No, it appears to always be in FEI mode. I checked this before and after going into VLPS by calling&amp;nbsp;CLOCK_GetMode()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also output the bus clock on the CLKOUT pin on the code I have here locally. I then used an oscilloscope to check the frequency of the clock. Before and after I go into VLPS my oscilloscope is reporting that the frequency is 10.540 MHz which sounded about right to me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 16:54:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1551213#M64286</guid>
      <dc:creator>nick_schneider</dc:creator>
      <dc:date>2022-11-09T16:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Does not Seem to Work Properly After Waking from VLPS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1552642#M64292</link>
      <description>&lt;P&gt;Sorry for the delay.&lt;/P&gt;
&lt;P&gt;Please try to delete the __WFI(); in&amp;nbsp;Timer_Hal_delay_ms function.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WFI.png" style="width: 721px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/200051iB97DA3405D688A5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="WFI.png" alt="WFI.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 14:09:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1552642#M64292</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2022-11-11T14:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Does not Seem to Work Properly After Waking from VLPS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1552658#M64293</link>
      <description>&lt;P&gt;Wow, that seems to have fixed the issue. When I inherited this function I assumed the WFI operation was trivial. Still not sure why there is only an issue after VLPS, but I can go and learn more about WFE and WFI.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 15:21:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PIT-Does-not-Seem-to-Work-Properly-After-Waking-from-VLPS/m-p/1552658#M64293</guid>
      <dc:creator>nick_schneider</dc:creator>
      <dc:date>2022-11-11T15:21:51Z</dc:date>
    </item>
  </channel>
</rss>

