<?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>Wireless MCUのトピックMKW2xD Low Power considerations</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/MKW2xD-Low-Power-considerations/m-p/365432#M178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H2&gt;System considerations&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;The MKW2xD family incorporates a complete low power 2.4GHz&lt;BR /&gt;radio frequency transceiver and a Kinetis family low power ARM Cortex M4 based&lt;BR /&gt;MCU into a single package. Therefore a low power mode for this SiP is a&lt;BR /&gt;combination between a transceiver low power mode and a MCU low power mode. Out&lt;BR /&gt;of reset the MCG is in its default FEI mode. Initialization software configures&lt;BR /&gt;the transceiver to provide a 4MHz clock to the MCU and then switch the MCG mode&lt;BR /&gt;from FEI to PEE. There are two types of low power modes defined: sleep modes (based&lt;BR /&gt;on the ARM sleep mode) and deep sleep modes (based on the ARM deep sleep modes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;When/How to enter low power&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system should enter low power when the entire system is&lt;BR /&gt;idle and all software layers agree on that. So, the system enters low power on&lt;BR /&gt;idle task, which runs only when there are no events for other tasks. The user&lt;BR /&gt;shall place a call to the function PWR_EnterLowPower in its idle task through a&lt;BR /&gt;construction like bellow:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Courier;"&gt;&lt;STRONG&gt;if (PWR_CheckIfDeviceCanGoToSleep())&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Courier;"&gt;&lt;STRONG&gt;&amp;nbsp; {&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wakeupReason = PWR_EnterLowPower();&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Courier;"&gt;&lt;STRONG&gt;&amp;nbsp; }&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Each software layer/entity running on the system can prevent it from entering low power by&lt;BR /&gt;calling PWR_DisallowDeviceToSleep(). The system will stay awake until all software&lt;BR /&gt;layers that called PWR_DisallowDeviceToSleep() call back PWR_AllowDeviceToSleep() and&lt;BR /&gt;the system reaches idle task. The system will enter either sleep or deep sleep&lt;BR /&gt;depending on the type of the timers started. Low power timers are the only&lt;BR /&gt;timers that do not prevent the system from entering deep sleep. If any other&lt;BR /&gt;timers are started the system will enter in sleep instead of deep sleep. So, if&lt;BR /&gt;you want the system to enter deep sleep, stop all timers other then low power&lt;BR /&gt;ones. Be aware that functions like LED_StartFlash starts timers which will&lt;BR /&gt;prevent the system from entering deep sleep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Deep sleep modes&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user can choose one out of fifteen low power modes at&lt;BR /&gt;compile time by setting the value of cPWR_DeepSleepMode define in the&lt;BR /&gt;PWR_Configuration.h register. They are combinations of MCU deep sleep modes (VLPS,&lt;BR /&gt;LLS or VLLS), transceiver low power modes (doze or hibernate), and wakeup sources&lt;BR /&gt;(LPTMR, RTC, GPIO, transceiver timer, UART) and are extensively described in PWR_Configuration.h&lt;BR /&gt;header file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Entering deep sleep mechanism&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let’s take deep sleep mode 10(default deep sleep mode) as&lt;BR /&gt;example. MCU should put transceiver to hibernate and then enter LLS itself.&lt;BR /&gt;Since MCU is clocked by the transceiver, the first thing to do is to switch the&lt;BR /&gt;clock configuration from PEE to FEI. Now the MCU is clocked by its slow internal&lt;BR /&gt;reference clock and it continues the procedure by putting the transceiver to&lt;BR /&gt;hibernate. Next the LPTMR is configured and started to clock the wakeup timeout&lt;BR /&gt;and MCU enters LLS. When deep sleep ends, the MCU updates wakeup reason, stops LPTMR&lt;BR /&gt;clock, gets the transceiver out of hibernate, configures it to output the 4MHz&lt;BR /&gt;clock and switches the clock configuration back to PEE. Last thing to do is to&lt;BR /&gt;synchronize low power timers with the timeout value (clocked by LPTMR) and the&lt;BR /&gt;system is ready to start.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Oct 2014 12:51:14 GMT</pubDate>
    <dc:creator>dragosadrianmus</dc:creator>
    <dc:date>2014-10-03T12:51:14Z</dc:date>
    <item>
      <title>MKW2xD Low Power considerations</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/MKW2xD-Low-Power-considerations/m-p/365432#M178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H2&gt;System considerations&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;The MKW2xD family incorporates a complete low power 2.4GHz&lt;BR /&gt;radio frequency transceiver and a Kinetis family low power ARM Cortex M4 based&lt;BR /&gt;MCU into a single package. Therefore a low power mode for this SiP is a&lt;BR /&gt;combination between a transceiver low power mode and a MCU low power mode. Out&lt;BR /&gt;of reset the MCG is in its default FEI mode. Initialization software configures&lt;BR /&gt;the transceiver to provide a 4MHz clock to the MCU and then switch the MCG mode&lt;BR /&gt;from FEI to PEE. There are two types of low power modes defined: sleep modes (based&lt;BR /&gt;on the ARM sleep mode) and deep sleep modes (based on the ARM deep sleep modes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;When/How to enter low power&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system should enter low power when the entire system is&lt;BR /&gt;idle and all software layers agree on that. So, the system enters low power on&lt;BR /&gt;idle task, which runs only when there are no events for other tasks. The user&lt;BR /&gt;shall place a call to the function PWR_EnterLowPower in its idle task through a&lt;BR /&gt;construction like bellow:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Courier;"&gt;&lt;STRONG&gt;if (PWR_CheckIfDeviceCanGoToSleep())&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Courier;"&gt;&lt;STRONG&gt;&amp;nbsp; {&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wakeupReason = PWR_EnterLowPower();&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Courier;"&gt;&lt;STRONG&gt;&amp;nbsp; }&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Each software layer/entity running on the system can prevent it from entering low power by&lt;BR /&gt;calling PWR_DisallowDeviceToSleep(). The system will stay awake until all software&lt;BR /&gt;layers that called PWR_DisallowDeviceToSleep() call back PWR_AllowDeviceToSleep() and&lt;BR /&gt;the system reaches idle task. The system will enter either sleep or deep sleep&lt;BR /&gt;depending on the type of the timers started. Low power timers are the only&lt;BR /&gt;timers that do not prevent the system from entering deep sleep. If any other&lt;BR /&gt;timers are started the system will enter in sleep instead of deep sleep. So, if&lt;BR /&gt;you want the system to enter deep sleep, stop all timers other then low power&lt;BR /&gt;ones. Be aware that functions like LED_StartFlash starts timers which will&lt;BR /&gt;prevent the system from entering deep sleep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Deep sleep modes&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user can choose one out of fifteen low power modes at&lt;BR /&gt;compile time by setting the value of cPWR_DeepSleepMode define in the&lt;BR /&gt;PWR_Configuration.h register. They are combinations of MCU deep sleep modes (VLPS,&lt;BR /&gt;LLS or VLLS), transceiver low power modes (doze or hibernate), and wakeup sources&lt;BR /&gt;(LPTMR, RTC, GPIO, transceiver timer, UART) and are extensively described in PWR_Configuration.h&lt;BR /&gt;header file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Entering deep sleep mechanism&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let’s take deep sleep mode 10(default deep sleep mode) as&lt;BR /&gt;example. MCU should put transceiver to hibernate and then enter LLS itself.&lt;BR /&gt;Since MCU is clocked by the transceiver, the first thing to do is to switch the&lt;BR /&gt;clock configuration from PEE to FEI. Now the MCU is clocked by its slow internal&lt;BR /&gt;reference clock and it continues the procedure by putting the transceiver to&lt;BR /&gt;hibernate. Next the LPTMR is configured and started to clock the wakeup timeout&lt;BR /&gt;and MCU enters LLS. When deep sleep ends, the MCU updates wakeup reason, stops LPTMR&lt;BR /&gt;clock, gets the transceiver out of hibernate, configures it to output the 4MHz&lt;BR /&gt;clock and switches the clock configuration back to PEE. Last thing to do is to&lt;BR /&gt;synchronize low power timers with the timeout value (clocked by LPTMR) and the&lt;BR /&gt;system is ready to start.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Oct 2014 12:51:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/MKW2xD-Low-Power-considerations/m-p/365432#M178</guid>
      <dc:creator>dragosadrianmus</dc:creator>
      <dc:date>2014-10-03T12:51:14Z</dc:date>
    </item>
  </channel>
</rss>

