<?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: How to enter STOP mode in KE04? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356931#M17841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I don't want SysTick to wake the MCU up, that's why I am putting it under WAIT and/or STOP mode with the RTC timer and interrupt enabled. I want the MCU to wake up every 100 ms. However, in my code it seems like SysTick is also waking up my MCU. When I debug the code, debugger is telling me that the MCU has entered the WAIT or STOP mode but SysTick interrupt wakes the MCU up. I am aware that I cannot debug the WAIT or STOP modes with their full functionality that's why I am toggling some pins on the MCU to detect the interrupts, but no luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Mar 2015 08:50:05 GMT</pubDate>
    <dc:creator>abdullahkahrama</dc:creator>
    <dc:date>2015-03-07T08:50:05Z</dc:date>
    <item>
      <title>How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356927#M17837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to make the KE04 wait in STOP mode for about 1 sec, however it wakes up every 800 us. I have set the RTC timer with 100ms interrupt and I have checked that this is correct by toggling a pin in RTC interrupt. I have SysTick interrupt set at 1 ms and I have checked that this is correct by toggling a pin in SysTick interrupt. Also, when the WFI command is given, SysTick interrupt doesn't toggle the pin that should be toggled in the interrupt, so that means the SysTick timer is stopped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code I use for testing and the pin is toggled about every 800 us:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14254601105852833" jivemacro_uid="_14254601105852833" modifiedtitle="true"&gt;
&lt;P&gt;_100_ms_ctr = 0;&lt;/P&gt;
&lt;P&gt;while (_100_ms_ctr &amp;lt; 11) // 1 sec&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Cpu_SetOperationMode(DOM_STOP, NULL, NULL);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* WFI instruction will start entry into STOP mode */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("WFI");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Toggle pin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PTOR = (1 &amp;lt;&amp;lt; 10);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my interrupt code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14254601105585890" jivemacro_uid="_14254601105585890"&gt;
&lt;P&gt;PE_ISR(RTC_Interrupt)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTC_SC |= RTC_SC_RTIF_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WDOG_CNT = 0x02A6; // write the 1st refresh word&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WDOG_CNT = 0x80B4; // write the 2nd refresh word to refresh counter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _100_ms_ctr++;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the reason for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 08:27:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356927#M17837</guid>
      <dc:creator>abdullahkahrama</dc:creator>
      <dc:date>2015-03-04T08:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356928#M17838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdullah,&lt;/P&gt;&lt;P&gt;I'm working on your issue now, however I was wondering if you can share your PE project, then I can fix the issue of the project directly.&lt;/P&gt;&lt;P&gt;I'll update you if I figure out the issue and I'm also looking forward to your project.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&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>Thu, 05 Mar 2015 07:08:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356928#M17838</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-05T07:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356929#M17839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue has changed now and SysTick interrupt is waking the KE04 up I guess.. Anyways, here is my project, attached to this message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2015 07:15:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356929#M17839</guid>
      <dc:creator>abdullahkahrama</dc:creator>
      <dc:date>2015-03-05T07:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356930#M17840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdullah Kahraman,&lt;/P&gt;&lt;P&gt;I think I already figured out the fundamental reason this issue that systick interrupt couldn't wake up the MCU from the STOP mode.&lt;/P&gt;&lt;P&gt;After you've had a brief look through the KE04's RM, you can find that the core clock provide the particular clock source for the systick (Fig 1), however the core clock will become disabled when MCU works under either Wait or Stop mode (Fig 2).&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2015-03-06_16-25-41.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51059i074D61CA1B3CB736/image-size/large?v=v2&amp;amp;px=999" role="button" title="2015-03-06_16-25-41.jpg" alt="2015-03-06_16-25-41.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fig 1&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2015-03-06_16-26-56.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51060i573C5B4D1F67D7AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="2015-03-06_16-26-56.jpg" alt="2015-03-06_16-26-56.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fig 2&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&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, 06 Mar 2015 08:38:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356930#M17840</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-06T08:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356931#M17841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I don't want SysTick to wake the MCU up, that's why I am putting it under WAIT and/or STOP mode with the RTC timer and interrupt enabled. I want the MCU to wake up every 100 ms. However, in my code it seems like SysTick is also waking up my MCU. When I debug the code, debugger is telling me that the MCU has entered the WAIT or STOP mode but SysTick interrupt wakes the MCU up. I am aware that I cannot debug the WAIT or STOP modes with their full functionality that's why I am toggling some pins on the MCU to detect the interrupts, but no luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Mar 2015 08:50:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356931#M17841</guid>
      <dc:creator>abdullahkahrama</dc:creator>
      <dc:date>2015-03-07T08:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356932#M17842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdullah Kahraman,&lt;/P&gt;&lt;P&gt;I guess the reason that SysTick interrupt makes the MCU up would be SysTick Interrupt had been pending before executing WFI instruction. Also in the case, WFI will skip to enter the WAIT/STOP mode. You had better clear pending of SysTick interrupt before execution WFI by writing 1 to ICSR.PENDSTCLR (bit 25 of 0xE000ED04) .&lt;/P&gt;&lt;P&gt;I know this is not the final target of your program.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Yasuhiko Koumoto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Mar 2015 20:45:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356932#M17842</guid>
      <dc:creator>yasuhikokoumoto</dc:creator>
      <dc:date>2015-03-07T20:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356933#M17843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdullah Kahraman,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I'm going to create a simple demo about using RTC interrupt to wake up MCU periodically and run this demo with the FRDM-KE04 for validation.&lt;/P&gt;&lt;P&gt;Then you can refer to it for checking.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&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>Mon, 09 Mar 2015 02:43:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356933#M17843</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-09T02:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356934#M17844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdullah Kahraman,&lt;/P&gt;&lt;P&gt;Please check the attachment and refer to it for details.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&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>Mon, 09 Mar 2015 08:36:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356934#M17844</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-09T08:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356935#M17845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ping,&lt;/P&gt;&lt;P&gt;may I enter the discussion?&lt;/P&gt;&lt;P&gt;How do you realize the RTC interrupt period of 10ms?&lt;/P&gt;&lt;P&gt;I think no RTC setting seems to be in your sample code.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Yasuhiko Koumoto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 21:06:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356935#M17845</guid>
      <dc:creator>yasuhikokoumoto</dc:creator>
      <dc:date>2015-03-09T21:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356936#M17846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yasuhiko Koumoto,&lt;/P&gt;&lt;P&gt;Of course, welcome to join the discussion.&lt;/P&gt;&lt;P&gt;I've configured 1.408s as the RTC interrupt period as an example in the project, not the 10ms.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2015-03-10_8-50-23.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51211iF0AB276A0D396F2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="2015-03-10_8-50-23.jpg" alt="2015-03-10_8-50-23.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&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>Tue, 10 Mar 2015 00:59:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356936#M17846</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-10T00:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356937#M17847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yasuhiko,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer and sorry for my late reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to clear pending interrupts using following code and the CPU still enters SysTick interrupt and wake up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14262490720972660" jivemacro_uid="_14262490720972660" modifiedtitle="true"&gt;
&lt;P&gt;while (1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PTOR = (1 &amp;lt;&amp;lt; 13);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCB_SCR &amp;amp;= (uint32_t) ~(uint32_t) (SCB_SCR_SLEEPONEXIT_MASK);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_ICPR = 0xFFFFFFFF;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PE_WFI();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 12:18:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356937#M17847</guid>
      <dc:creator>abdullahkahrama</dc:creator>
      <dc:date>2015-03-13T12:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356938#M17848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your project doesn't implement a SysTick timer or any interrupt other than RTC. If I disable SysTick interrupt before going to sleep and enable it when the CPU wakes up by RTC, everything works fine in my project, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I don't understand is SysTick is running and generating interrupts when the CPU is in STOP or WAIT mode. I am really confused with this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 12:21:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356938#M17848</guid>
      <dc:creator>abdullahkahrama</dc:creator>
      <dc:date>2015-03-13T12:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356939#M17849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdullah Kahraman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't mention NVIC_ICPR but mention ICSR because SysTick interrupt is out of NVIC control.&lt;/P&gt;&lt;P&gt;CPU core interrupt pending would be cleared by ICSR (0xE000ED04).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51391i3AE95A2582611FE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To clear SysTick pending,&lt;/P&gt;&lt;P&gt;*(long *)(0xE000ED04) = (1&amp;lt;&amp;lt;25);&lt;/P&gt;&lt;P&gt;As the register includes SysTick interrupt pending set bit (bit 26), you cannnot write all "1" into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Yasuhiko Koumoto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 23:02:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356939#M17849</guid>
      <dc:creator>yasuhikokoumoto</dc:creator>
      <dc:date>2015-03-13T23:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356940#M17850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, this did not work, as well. &lt;IMG alt="Smiley Sad" class="emoticon emoticon-smileysad" id="smileysad" src="https://community.nxp.com/i/smilies/16x16_smiley-sad.png" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14263310947346046" jivemacro_uid="_14263310947346046" modifiedtitle="true"&gt;
&lt;P&gt;while (1)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PTOR = (1 &amp;lt;&amp;lt; 13);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCB_SCR &amp;amp;= (uint32_t) ~(uint32_t) (SCB_SCR_SLEEPONEXIT_MASK);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCB_ICSR = SCB_ICSR_PENDSTCLR_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PE_WFI();&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:12:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356940#M17850</guid>
      <dc:creator>abdullahkahrama</dc:creator>
      <dc:date>2020-11-02T13:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356941#M17851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;do you say that processor still wake up from STOP mode by SysTick Interrupt?&lt;/P&gt;&lt;P&gt;What does the word 'did not work' mean?&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Yasuhiko Koumoto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 11:39:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356941#M17851</guid>
      <dc:creator>yasuhikokoumoto</dc:creator>
      <dc:date>2015-03-14T11:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356942#M17852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the processor wakes up from the STOP mode by the SysTick interrupt. I can see that the period of the toggling of the LED (PTA.13) in the while loop is 1 ms, which is the same as SysTick frequency. Also, if I disable the SysTick interrupt before going to STOP mode and re-enable it after the processor is waken up, I can see that the processor is waken up only by the RTC interrupt with a period of 100ms, which is what I want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 12:02:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356942#M17852</guid>
      <dc:creator>abdullahkahrama</dc:creator>
      <dc:date>2015-03-14T12:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356943#M17853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;as the result, I think that Systick Interrupt wakes up the MCU from STOP mode.&lt;/P&gt;&lt;P&gt;Also any interrupts can wake up the MCU from STOP mode.&lt;/P&gt;&lt;P&gt;Please look at Table 7-1 of the MKE04 Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51392iF29600E86E981FAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seems to show any interrupts can be wake-up resources.&lt;/P&gt;&lt;P&gt;If you want not to occur SysTick interrupt, you can clear SYST_CSR[TCKINT].&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Yasuhiko Koumoto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 18:49:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356943#M17853</guid>
      <dc:creator>yasuhikokoumoto</dc:creator>
      <dc:date>2015-03-14T18:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356944#M17854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I am aware of that information and I have already applied the solution you've suggested and it works. But what I do not understand is how the SysTick timer is operational in STOP mode? Please refer to Ping's answer above showing with below attached pictures from the reference manual that SysTick timer is not operational in STOP mode since its clock source is "core clock" which is disabled in STOP mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2015-03-06_16-25-41.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51397iDAB5A6D895C799DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="2015-03-06_16-25-41.jpg" alt="2015-03-06_16-25-41.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2015-03-06_16-26-56.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51370i6DB3A906797B4B6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2015-03-06_16-26-56.jpg" alt="2015-03-06_16-26-56.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Mar 2015 10:52:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356944#M17854</guid>
      <dc:creator>abdullahkahrama</dc:creator>
      <dc:date>2015-03-15T10:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356945#M17855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;of course, I know that.&lt;/P&gt;&lt;P&gt;However, I think there are no descriptions that SysTick stops during WAIT or STOP mode.&lt;/P&gt;&lt;P&gt;I confirmed from ARM that clock supply for NVIC and SysTick is not stopped in at least WAIT mode.&lt;/P&gt;&lt;P&gt;As for STOP mode, it might stop but the experiment of a real board shows SysTick was operational in STOP mode.&lt;/P&gt;&lt;P&gt;I guess the reason would be that SysTick timer was exclusive.&lt;/P&gt;&lt;P&gt;That is, no clock gating mechanism would be added to SysTick timer.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Yasuhiko Koumoto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Mar 2015 20:45:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356945#M17855</guid>
      <dc:creator>yasuhikokoumoto</dc:creator>
      <dc:date>2015-03-15T20:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter STOP mode in KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356946#M17856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would like to continue the discussion a little more although it seems to become almost out of the theme of this post.&lt;/P&gt;&lt;P&gt;I have found descriptions as "This (the deep sleep mode) has the side effect of stopping the SysTick timer" in "Cortex-M0+ Devices Generic User Guide (&lt;A href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/BABGGCHI.html"&gt;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/BABGGCHI.html&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Also I have found descriptions as "It (the SysTick) WILL NOT wake up the system from Stop modes" in Freescale Technology Forum 2014 material (&lt;A href="http://2014ftf.ccidnet.com/pdf/0462.pdf"&gt;http://2014ftf.ccidnet.com/pdf/0462.pdf&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;In the FTF material also "If debugger attached it (SysTick) will continue to run" is described.&lt;/P&gt;&lt;P&gt;From these facts, the SysTick behavior which remains operation in the DeepSleep (or Stop) mode would be FRDM board specific phenomenon.&lt;/P&gt;&lt;P&gt;I guess that to have OpenSDA interface is to be in the debug mode.&lt;/P&gt;&lt;P&gt;Anyway, If you use LLS mode instead of STOP mode, the SysTick interrupt cannot be an wakeup source.&lt;/P&gt;&lt;P&gt;Any comments are welcome for my guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Yasuhiko Koumoto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 00:46:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-enter-STOP-mode-in-KE04/m-p/356946#M17856</guid>
      <dc:creator>yasuhikokoumoto</dc:creator>
      <dc:date>2015-03-16T00:46:35Z</dc:date>
    </item>
  </channel>
</rss>

