<?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: mc9s12xep100 stop mode + API interrupt  in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869122#M16247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kang,&lt;/P&gt;&lt;P&gt;The floating digital inputs may increase power consumption.&lt;/P&gt;&lt;P&gt;Please ensure that all digital pins are in one of defined state (output, input with internal pull-up/down, or &lt;SPAN&gt;input with external pull-up/down&lt;/SPAN&gt;). This is not valid for port AD until we enable digital buffer in DIEN register.&lt;/P&gt;&lt;P&gt;Be aware, that this should be done also for pins which are not directly routed in your version of the package - for example Port R.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Radek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Mar 2019 09:26:26 GMT</pubDate>
    <dc:creator>RadekS</dc:creator>
    <dc:date>2019-03-05T09:26:26Z</dc:date>
    <item>
      <title>mc9s12xep100 stop mode + API interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869119#M16244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;There is a problem confuse me for a long time. When using MC9S12xep100, I entered the full stop mode with API interrupt enabled. The current consumption is about 2.2mA, but I found the datasheet said like belows:(Table A-14)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78745i31ACFFDF079B3FCD/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;yeah, we can see it says the&amp;nbsp;&lt;SPAN&gt;current consumption is about 42 uA, &lt;STRONG&gt;How to make it ?&amp;nbsp;&lt;/STRONG&gt; If I just enter the full stop mode without API enable,&amp;nbsp;the&amp;nbsp;&lt;SPAN&gt;current consumption is about 62 uA.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there anything I haven't noticed or missed?&amp;nbsp;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The following is part of the code for reference:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;void MCU_EnterFSTPMode(void)&lt;BR /&gt;{&lt;BR /&gt; PLLCTL |= 0x80; // set FSTWKP = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CLKSEL_PSTP = 0;&lt;BR /&gt; //MCU enter into full sleep mode&lt;BR /&gt; asm ANDCC #0x7F;&amp;nbsp;&lt;BR /&gt; asm STOP;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;void API_Init(void)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;VREGAPICL |= 0x01; // clear Autonomous Periodical Interrupt Flag VREGAPICL_APIF&lt;BR /&gt; VREGAPIR = 4999; // set interval time&lt;BR /&gt; VREGAPITR = 0; // initial trim value&lt;BR /&gt; VREGAPICL = 0x07; // source of clock, API enable, interrupt enable, clear flag if set&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void interrupt 64 API_Interrupt(void)&lt;BR /&gt;{&lt;BR /&gt; VREGAPICL |= 0x01; //write 1 to clear VREGAPICL_APIF&lt;/P&gt;&lt;P&gt;PORTA_PA1 = ~PORTA_PA1;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 07:37:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869119#M16244</guid>
      <dc:creator>xiaokangkp</dc:creator>
      <dc:date>2019-03-05T07:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12xep100 stop mode + API interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869120#M16245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you measuring stop mode current with CPU reset/powered on&amp;nbsp;with BDM disconnected? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 08:15:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869120#M16245</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2019-03-05T08:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12xep100 stop mode + API interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869121#M16246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your timely reply, Edward .&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;The process of&amp;nbsp;&lt;/SPAN&gt;measuring stop mode current is like follow steps:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;step1. download the programme, and remove BDM. then the&amp;nbsp;&lt;SPAN&gt;xep100 board is power down.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;step2. Powered the xep100 board with a DC power supply.&amp;nbsp;A current meter is connected in series to measure the current.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 08:26:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869121#M16246</guid>
      <dc:creator>xiaokangkp</dc:creator>
      <dc:date>2019-03-05T08:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12xep100 stop mode + API interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869122#M16247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kang,&lt;/P&gt;&lt;P&gt;The floating digital inputs may increase power consumption.&lt;/P&gt;&lt;P&gt;Please ensure that all digital pins are in one of defined state (output, input with internal pull-up/down, or &lt;SPAN&gt;input with external pull-up/down&lt;/SPAN&gt;). This is not valid for port AD until we enable digital buffer in DIEN register.&lt;/P&gt;&lt;P&gt;Be aware, that this should be done also for pins which are not directly routed in your version of the package - for example Port R.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Radek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 09:26:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869122#M16247</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2019-03-05T09:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12xep100 stop mode + API interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869123#M16248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Radek,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thanks for your reply. I have processed the IO port you mentioned.&amp;nbsp; The&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;current consumption is&lt;SPAN&gt;&amp;nbsp;also about 2.2mA.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;Just a quick summary of my current situation:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;situation1. just enter into full stop mode, all the IO and modes have be handled.&amp;nbsp;current consumption is&lt;SPAN&gt;&amp;nbsp;about 62uA.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; "&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;situation2. Based on&amp;nbsp;situation1,&amp;nbsp;also enable the API function and its interrupt.&amp;nbsp;current consumption is&lt;SPAN&gt;&amp;nbsp;about &lt;SPAN style="background-color: #ffffff;"&gt;2.2mA.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; what i want do is to get a lower&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;current consumption when i enter the full stop mode with API functions enabled. thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 09:41:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869123#M16248</guid>
      <dc:creator>xiaokangkp</dc:creator>
      <dc:date>2019-03-05T09:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12xep100 stop mode + API interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869124#M16249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks and sorry, I shouldn't ask this keeping in mind you see only 62uA without API. &lt;/P&gt;&lt;P&gt;I would check if it helps changing API trim settings, max, min and middle.&lt;/P&gt;&lt;P&gt;BTW, 4999 period setting is about 1s. How long does it take to immediately reenter stop mode to let you keep measuring stop current? High current wake spikes can increase your average current. Did you try using maximum API period setting or perhaps use oscilloscope to read supply current high and low?&lt;/P&gt;&lt;P&gt;No more ideas, don't have any S12XE board at hand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 09:49:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869124#M16249</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2019-03-05T09:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12xep100 stop mode + API interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869125#M16250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kang,&lt;/P&gt;&lt;P&gt;I agree with Edward. The current consumption measurement method may be the key. If possible, please check&amp;nbsp;consumption via shunt at power line and oscilloscope. That way you will get at least a&amp;nbsp;ratio between&amp;nbsp;times in stop and run mode.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You wrote, that you use full stop mode. The running oscillator in pseudo stop mode increases slightly immediate power consumption. On the other side, it may significantly decrease the time for clock stabilization after leaving stop mode and this way effectively decrease average&amp;nbsp;power consumption. If you will see significant improvement with pseudo stop mode, you may focus on oscillator&amp;nbsp;circuit parameters and time for oscillation&amp;nbsp;starts.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you implement PLL re-init in API interrupt?&lt;BR /&gt;It is rather useless for code with just a&amp;nbsp;few instructions. However, it may&amp;nbsp;play a role when you execute a longer piece of code or if you implement any waiting loops. If you will see lower power consumption&amp;nbsp;without PLL, the issue may be in PLL settings and long PLL lock time. In such case, please use the PLL calculator for S12XE.&lt;BR /&gt;&lt;BR /&gt;The pin staus stay unchanged in stop mode. Are any loads connected to MCU during stop mode (LEDs, transistors, ICs, ...)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Radek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2019 14:32:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12xep100-stop-mode-API-interrupt/m-p/869125#M16250</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2019-03-08T14:32:31Z</dc:date>
    </item>
  </channel>
</rss>

