<?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>8-bit MicrocontrollersのトピックSTOP2 mode wakeup, restore register content issue</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/STOP2-mode-wakeup-restore-register-content-issue/m-p/411610#M21399</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use a MC9S08QE16CLC mcu, CW10.6 and processor expert.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to make S08 to enter STOP2 mode and exit&amp;nbsp; by asserting IRQ pin ==&amp;gt; No problem to do that it works well&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before entering STOP2, I save to RAM the content of some registers I'd like to restore when MCU wakes up. This is where I get the issue.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in start08.c: The _Startup(void) is called after reset (and also wakeup) which itself call the Init(); function which ZERO-OUT all RAM content ==&amp;gt; the register content copy I stored in RAM before entering STOP2 is also initialized/erased.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to prevent my stored datas to be initialized by Init() function in the StartUp code?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I proceed?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Sorry for my poor english.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Nov 2015 15:39:41 GMT</pubDate>
    <dc:creator>marmotte</dc:creator>
    <dc:date>2015-11-13T15:39:41Z</dc:date>
    <item>
      <title>STOP2 mode wakeup, restore register content issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/STOP2-mode-wakeup-restore-register-content-issue/m-p/411610#M21399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use a MC9S08QE16CLC mcu, CW10.6 and processor expert.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to make S08 to enter STOP2 mode and exit&amp;nbsp; by asserting IRQ pin ==&amp;gt; No problem to do that it works well&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before entering STOP2, I save to RAM the content of some registers I'd like to restore when MCU wakes up. This is where I get the issue.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in start08.c: The _Startup(void) is called after reset (and also wakeup) which itself call the Init(); function which ZERO-OUT all RAM content ==&amp;gt; the register content copy I stored in RAM before entering STOP2 is also initialized/erased.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to prevent my stored datas to be initialized by Init() function in the StartUp code?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I proceed?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Sorry for my poor english.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 15:39:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/STOP2-mode-wakeup-restore-register-content-issue/m-p/411610#M21399</guid>
      <dc:creator>marmotte</dc:creator>
      <dc:date>2015-11-13T15:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: STOP2 mode wakeup, restore register content issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/STOP2-mode-wakeup-restore-register-content-issue/m-p/411611#M21400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In PRM file you can replace READ_WRITE with NO_INIT. This will prevent initialization variables, which are placed in specified memory segments.&lt;/P&gt;&lt;P&gt;You can also split RAM segment into two segments, READ_WRITE part and NO_INIT part like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PRM SEGMENTS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*RAM&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; READ_WRITE&amp;nbsp;&amp;nbsp; 0x0100 TO 0x047F;*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RAM&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; READ_WRITE&amp;nbsp;&amp;nbsp; 0x0100 TO 0x037F;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NIRAM&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; NO_INIT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0380 TO 0x047F;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in PRM PLACEMENT add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NOINITRAM&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; INTO&amp;nbsp; NIRAM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In C code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG NOINITRAM&lt;/P&gt;&lt;P&gt;// data in NOINITRAM won't be initialized by startup code&lt;/P&gt;&lt;P&gt;int v1, v2, v3; &lt;/P&gt;&lt;P&gt;#pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 10:43:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/STOP2-mode-wakeup-restore-register-content-issue/m-p/411611#M21400</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2015-11-16T10:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: STOP2 mode wakeup, restore register content issue</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/STOP2-mode-wakeup-restore-register-content-issue/m-p/411612#M21401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your help, it now works as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2015 09:15:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/STOP2-mode-wakeup-restore-register-content-issue/m-p/411612#M21401</guid>
      <dc:creator>marmotte</dc:creator>
      <dc:date>2015-11-19T09:15:45Z</dc:date>
    </item>
  </channel>
</rss>

