<?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>Kinetis Microcontrollers中的主题 Re:  FRDM K22 POWER management DEMO</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759589#M46302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Nov 2017 09:56:26 GMT</pubDate>
    <dc:creator>nesrinemhiri</dc:creator>
    <dc:date>2017-11-14T09:56:26Z</dc:date>
    <item>
      <title>FRDM K22 POWER management DEMO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759588#M46301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I start from the power management demo unde the SDK library:&lt;/P&gt;&lt;P&gt;Freescale\KSDK_1.3.0\examples\frdmk22f\demo_apps\power_manager_hal_demo&lt;/P&gt;&lt;P&gt;I try to simplify this demo to have only the system in&amp;nbsp; run mode&amp;nbsp; at 20MHz then enter in VLLS2 mode and&amp;nbsp; wakeup using RTC&amp;nbsp; each 1second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I modify the&amp;nbsp;configuration for enter RUN mode to have Core clock = 20MHz :&lt;/P&gt;&lt;P&gt;in board.c file :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;/* Configuration for enter RUN mode. Core clock = 80MHz. */&lt;BR /&gt;const clock_manager_user_config_t g_defaultClockConfigRun =&lt;BR /&gt;{&lt;BR /&gt; .mcgConfig =&lt;BR /&gt; {&lt;BR /&gt; .mcg_mode = kMcgModePEE, // Work in PEE mode.&lt;BR /&gt; .irclkEnable = true, // MCGIRCLK enable.&lt;BR /&gt; .irclkEnableInStop = false, // MCGIRCLK disable in STOP mode.&lt;BR /&gt; .ircs = kMcgIrcSlow, // Select IRC32k.&lt;BR /&gt; .fcrdiv = 0U, // FCRDIV is 0.&lt;/P&gt;&lt;P&gt;.frdiv = 0U,//3U,&lt;BR /&gt; .drs = kMcgDcoRangeSelLow, // Low frequency range&lt;BR /&gt; .dmx32 = kMcgDmx32Default, // DCO has a default range of 25%&lt;BR /&gt; .oscsel = kMcgOscselOsc, // Select OSC&lt;/P&gt;&lt;P&gt;.pll0EnableInFllMode = false, // PLL0 disable&lt;BR /&gt; .pll0EnableInStop = false, // PLL0 disalbe in STOP mode&lt;BR /&gt; .prdiv0 = 0x3U,&lt;BR /&gt; .vdiv0 = 0x10U,&lt;BR /&gt; },&lt;BR /&gt; .simConfig =&lt;BR /&gt; {&lt;BR /&gt; .pllFllSel = kClockPllFllSelPll, // PLLFLLSEL select PLL.&lt;BR /&gt; .er32kSrc = kClockEr32kSrcRtc, // ERCLK32K selection, use RTC.&lt;BR /&gt;// .outdiv1 = 0U,&lt;BR /&gt;// .outdiv2 = 1U,&lt;BR /&gt;// .outdiv3 = 2U,&lt;BR /&gt;// .outdiv4 = 3U,&lt;BR /&gt; .outdiv1 = 4U,&lt;BR /&gt; .outdiv2 = 4U,&lt;BR /&gt; .outdiv3 = 4U,&lt;BR /&gt; .outdiv4 = 4U,&lt;BR /&gt; },&lt;BR /&gt; .oscerConfig =&lt;BR /&gt; {&lt;BR /&gt; .enable = true, // OSCERCLK enable.&lt;BR /&gt; .enableInStop = false, // OSCERCLK disable in STOP mode.&lt;BR /&gt; .erclkDiv = 0U, // OSCERCLK divider setting.&lt;BR /&gt; }&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;then I modify the define in the&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;board.h file&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;#ifndef CLOCK_INIT_CONFIG&lt;BR /&gt;#define CLOCK_INIT_CONFIG CLOCK_RUN&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;#if (CLOCK_INIT_CONFIG == CLOCK_RUN)&lt;BR /&gt;#define CORE_CLOCK_FREQ 40000000U&lt;BR /&gt;#elif (CLOCK_INIT_CONFIG == CLOCK_HSRUN)&lt;BR /&gt;#define CORE_CLOCK_FREQ 120000000U&lt;BR /&gt;#else&lt;BR /&gt;#define CORE_CLOCK_FREQ 4000000U&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the main.c as attached.&lt;/P&gt;&lt;P&gt;but the issue it that I have the VLLS2 eash 2 second and note 1second and am note sure if I have the right senario with run at 20MHz then VLLS2 the wakeup each 1s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could yoy please help me to implement this&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 12:41:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759588#M46301</guid>
      <dc:creator>nesrinemhiri</dc:creator>
      <dc:date>2017-11-09T12:41:36Z</dc:date>
    </item>
    <item>
      <title>Re:  FRDM K22 POWER management DEMO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759589#M46302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2017 09:56:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759589#M46302</guid>
      <dc:creator>nesrinemhiri</dc:creator>
      <dc:date>2017-11-14T09:56:26Z</dc:date>
    </item>
    <item>
      <title>Re:  FRDM K22 POWER management DEMO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759590#M46303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the late reply!&lt;/P&gt;&lt;P&gt;Do you mean when you select RTC Alarm interrupt as Wakeup sources and configure it wakeup after 1s.&lt;/P&gt;&lt;P&gt;But the MCU wakeup every 2s?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you try to select RTC Second interrupt as Wakeup sources?&lt;/P&gt;&lt;P&gt;The RTC is clock by the 32768Hz crystal,should not be impact by your core clock configuration modify.&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>Thu, 16 Nov 2017 07:41:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759590#M46303</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-11-16T07:41:03Z</dc:date>
    </item>
    <item>
      <title>Re:  FRDM K22 POWER management DEMO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759591#M46304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;Thank you for your reply , am able now to have the RTC wake each 1s&lt;/P&gt;&lt;P&gt;and I configure may VLLS2 as follow:&lt;/P&gt;&lt;P&gt;volatile unsigned int dummyread; &lt;BR /&gt; SMC_PMPROT = SMC_PMPROT_AVLLS_MASK;&lt;BR /&gt; SMC_PMCTRL &amp;amp;= ~SMC_PMCTRL_STOPM_MASK ;&lt;BR /&gt; SMC_PMCTRL |= SMC_PMCTRL_STOPM(0x4) ;&lt;BR /&gt; SMC_STOPCTRL &amp;amp;= ~SMC_STOPCTRL_LLSM_MASK;&lt;BR /&gt; SMC_STOPCTRL |=SMC_STOPCTRL_LLSM(0x2);&lt;BR /&gt; dummyread = SMC_STOPCTRL;&lt;BR /&gt; /* Set the SLEEPDEEP bit to enable deep sleep mode - enter stop mode*/&lt;BR /&gt; SCB-&amp;gt;SCR |= SCB_SCR_SLEEPDEEP_Msk; &lt;BR /&gt; __WFI();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the issue that i have 75µA instead of 1.9µA stated in datasheet.&lt;/P&gt;&lt;P&gt;what can be the cause of this higher consumption? could you please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you nesrine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 08:43:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759591#M46304</guid>
      <dc:creator>nesrinemhiri</dc:creator>
      <dc:date>2017-11-16T08:43:41Z</dc:date>
    </item>
    <item>
      <title>Re:  FRDM K22 POWER management DEMO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759592#M46305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nesrine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure that you have no floating inputs (set as outputs or use pull-ups/-downs) since these can otherwise cause higher current consumption: Set continuously to VLSS2 mode and touch all pins whilst monitoring the current - if the current measurement fluctuates it means that such an effect is present.&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, 16 Nov 2017 11:01:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K22-POWER-management-DEMO/m-p/759592#M46305</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-11-16T11:01:27Z</dc:date>
    </item>
  </channel>
</rss>

