<?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: LLS state and LLWU module in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LLS-state-and-LLWU-module/m-p/202372#M2991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;You will receive LLWU interrupt constantly if LLWU wakeup flags are not cleared. For LPT you need to clear LLWU_M0IF bit (at least in K60). It can be done in LLWU ISR, or in LPT ISR. Clearing LLWU wakeup flags is the only thing I do in LLWU ISR.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 05 Feb 2012 23:01:02 GMT</pubDate>
    <dc:creator>namfuak</dc:creator>
    <dc:date>2012-02-05T23:01:02Z</dc:date>
    <item>
      <title>LLS state and LLWU module</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LLS-state-and-LLWU-module/m-p/202371#M2990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working with K60 on Tower board.I have a question about LLWU module and enter-exit from LLS mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My simple project &amp;nbsp;example code has&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Start system like in Freescale example projects&lt;/LI&gt;&lt;LI&gt;Start the lpt timer and lpt interrupt.&lt;/LI&gt;&lt;LI&gt;In loop:&lt;UL&gt;&lt;LI&gt;Some artificial delay function&lt;/LI&gt;&lt;LI&gt;Enter to LLS mode&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The LLWU ISR function is also defined in vector isr table. From datasheet the LLWU isr must not be masked.&lt;/P&gt;&lt;P&gt;The result is&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The program enters to LLS mode&lt;/LI&gt;&lt;LI&gt;LLWU wakeup isr is occurred&lt;/LI&gt;&lt;LI&gt;LPT isr is occurred right after LLWU Isr&lt;/LI&gt;&lt;LI&gt;But after LPT Isr,the LLWU Isr is occurred again,so LLWU Isr is encapsulate LPT Isr.(I right a simple log to see this scenario).Could you help me to understand, why LLWU Isr is “pending” again after LPT Isr?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second question is what need to be in the body of LLWU Isr function? Now I didn’t do nothing in the context of LLWU Isr,and after LPT ISR I make the following:&lt;/P&gt;&lt;P&gt;“&amp;nbsp; &lt;EM&gt;NVICICPR0|=(1&amp;lt;&amp;lt;21); //Clear LLWU interrupt&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;NVICISER0|=(1&amp;lt;&amp;lt;21); //Enable LLWU interrupt&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;“&lt;/P&gt;&lt;P&gt;The additional LLWU Isr didn’t occurred, but the J-link disconnected from CPU.&lt;/P&gt;&lt;P&gt;Any help will be welcomed!!!Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 22:23:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LLS-state-and-LLWU-module/m-p/202371#M2990</guid>
      <dc:creator>renka</dc:creator>
      <dc:date>2012-02-01T22:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: LLS state and LLWU module</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LLS-state-and-LLWU-module/m-p/202372#M2991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;You will receive LLWU interrupt constantly if LLWU wakeup flags are not cleared. For LPT you need to clear LLWU_M0IF bit (at least in K60). It can be done in LLWU ISR, or in LPT ISR. Clearing LLWU wakeup flags is the only thing I do in LLWU ISR.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Feb 2012 23:01:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LLS-state-and-LLWU-module/m-p/202372#M2991</guid>
      <dc:creator>namfuak</dc:creator>
      <dc:date>2012-02-05T23:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: LLS state and LLWU module</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LLS-state-and-LLWU-module/m-p/202373#M2992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is very likely that the LPTMR isr you have created does not clear the LPTMR flag.&amp;nbsp; A good way to check this is in run mode.&amp;nbsp; Once the flag crearing is working then you can re-enable the LLS mode entry. &lt;/P&gt;&lt;P&gt;For a complete guide to the low power modes please see an application note I've written on this subject.&amp;nbsp; AN4503.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a number of other things to consider.&amp;nbsp; One is the clearing of the LPTMR flag sequence and code execution timing.&lt;/P&gt;&lt;P&gt;The clearing of the LPTMR flag takes a number of cycles (up to 7 bus cycles).&amp;nbsp; If you clear the LPTRM flag with a write to an LPTRM register then you should do a read of the LPTMR register to make sure the flag is cleared before exiting the isr.&lt;/P&gt;&lt;P&gt;This is what I put in my LLWU isr. &lt;/P&gt;&lt;P&gt;&amp;nbsp; if (LLWU_F3 &amp;amp; LLWU_F3_MWUF0_MASK) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("****WUF3_MWUF0 IF&amp;nbsp; LPTMR&amp;nbsp; *****\r\n"); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIM_SCGC5 |= SIM_SCGC5_LPTMR_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPTMR0_CSR = ( LPTMR_CSR_TEN_MASK | LPTMR_CSR_TIE_MASK | LPTMR_CSR_TCF_MASK&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPTMR0_CSR |=&amp;nbsp; LPTMR_CSR_TCF_MASK;&amp;nbsp;&amp;nbsp; // write 1 to TCF to clear the LPT timer compare flag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;If you do this the LPTMR isr will not be taken and both the LPTRM flag and the LLWU flag are cleared.&amp;nbsp; Writing only to the LLWU module llag is not required and will not clear the LPTRM flag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Philip&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 16:13:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LLS-state-and-LLWU-module/m-p/202373#M2992</guid>
      <dc:creator>philip_drake</dc:creator>
      <dc:date>2012-09-10T16:13:18Z</dc:date>
    </item>
  </channel>
</rss>

