<?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 What´s wrong with the MM9Z1_638 Wake-Up function? in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-s-wrong-with-the-MM9Z1-638-Wake-Up-function/m-p/505684#M12361</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;I´m trying to wake up a sleeping MM9Z1j638 (OPM==01; S12Z STOP) using TIMER3 / PTB3 but without luck.&lt;/P&gt;&lt;P&gt;I can see some current peak after about 10s but no more activity. Wake-up Using WUCTH will work before and after the&amp;nbsp; 10 seconds.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the related code is use:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_GPIO_CTL =&amp;nbsp; B_GPIO_CTL_DIR3M_MASK | B_GPIO_CTL_DIR3_MASK \&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;| B_GPIO_CTL_PE4M_MASK | B_GPIO_CTL_PE4_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_GPIO_OUT3_WKUP = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_GPIO_OUT3_TCOMP3 = 1;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TIOS_IOS3 = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_OC3M_OC3M3 = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; B_TCTL1 = 0xC0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TC3 = B_TC3 + 0x2710;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // reload 10s&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TFLG1_C3F = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_PCR_WUE_WUPTB3 = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_INT_MASK = 0x0000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;IrqEnable();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;__asm(STOP);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;So whats wrong with it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Michael.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Mar 2016 03:25:58 GMT</pubDate>
    <dc:creator>m3</dc:creator>
    <dc:date>2016-03-28T03:25:58Z</dc:date>
    <item>
      <title>What´s wrong with the MM9Z1_638 Wake-Up function?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-s-wrong-with-the-MM9Z1-638-Wake-Up-function/m-p/505684#M12361</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;I´m trying to wake up a sleeping MM9Z1j638 (OPM==01; S12Z STOP) using TIMER3 / PTB3 but without luck.&lt;/P&gt;&lt;P&gt;I can see some current peak after about 10s but no more activity. Wake-up Using WUCTH will work before and after the&amp;nbsp; 10 seconds.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the related code is use:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_GPIO_CTL =&amp;nbsp; B_GPIO_CTL_DIR3M_MASK | B_GPIO_CTL_DIR3_MASK \&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;| B_GPIO_CTL_PE4M_MASK | B_GPIO_CTL_PE4_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_GPIO_OUT3_WKUP = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_GPIO_OUT3_TCOMP3 = 1;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TIOS_IOS3 = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_OC3M_OC3M3 = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; B_TCTL1 = 0xC0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TC3 = B_TC3 + 0x2710;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // reload 10s&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TFLG1_C3F = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_PCR_WUE_WUPTB3 = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_INT_MASK = 0x0000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;IrqEnable();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;__asm(STOP);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;So whats wrong with it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Michael.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2016 03:25:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-s-wrong-with-the-MM9Z1-638-Wake-Up-function/m-p/505684#M12361</guid>
      <dc:creator>m3</dc:creator>
      <dc:date>2016-03-28T03:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: What´s wrong with the MM9Z1_638 Wake-Up function?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-s-wrong-with-the-MM9Z1-638-Wake-Up-function/m-p/505685#M12362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure the MCU goes into Stop mode?&lt;/P&gt;&lt;P&gt;what about clearing the S bit in CPU CCR register prior to asm STOP instruction? You don't have that line in the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asm ANDCC #0x7F;&amp;nbsp; //clear S bit - enable the stop mode.&lt;/P&gt;&lt;P&gt;/* If the S bit is not cleared then STOP instruction has no effect and is executed as a dummy instruction NOP. */&lt;/P&gt;&lt;P&gt;asm STOP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;iggi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 08:33:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-s-wrong-with-the-MM9Z1-638-Wake-Up-function/m-p/505685#M12362</guid>
      <dc:creator>iggi</dc:creator>
      <dc:date>2016-03-29T08:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: What´s wrong with the MM9Z1_638 Wake-Up function?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-s-wrong-with-the-MM9Z1-638-Wake-Up-function/m-p/505686#M12363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, i´m pretty sure about that. i just have not included the ANDCC and PCR house-keeping.&lt;/P&gt;&lt;P&gt;All signs show that it will go into STOP:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;VDDH == Low (OK, more related to the Analog die)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;Current &amp;lt;= 5mA,&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;OSC goes down.(actually i use pseudo-stop so this is currently no the case)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;BDM not able to resume :-( (if i had set a Breakpoint at the D2D_Int() and apply some current to the shunt the debugger will come back to this point.)&lt;SPAN class="st"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the missing part i use for clearing the S Bit:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;B_ACQ_SRH = 0xFF;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;B_PCR_SR =&amp;nbsp; 0xFFFF;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;B_INT_MSK = 0x0000;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;B_PCR_CTL = OPM_SET_STOP;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;__asm(ANDCC #0x6F)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;__asm(STOP);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;By the way, What really triggers the wakeup? Is it the state of the Output (&lt;STRONG&gt;OC3M-&amp;gt;OC3Mx&lt;/STRONG&gt;) or the Interrupt &lt;STRONG&gt;(TIE-&amp;gt;CxI&lt;/STRONG&gt;) from the Timer? And what settings other then &lt;STRONG&gt;PCR_WUE-&amp;gt;PCR_WUPTBx&lt;/STRONG&gt;, are really needed? According to Figure 33 on page 116, &lt;STRONG&gt;GPIO_OUTx-&amp;gt;TCOMPx&lt;/STRONG&gt; seems to be mandatory but what is about:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GPIO_OUTx-&amp;gt;WKUP,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GPIO_OUTx-&amp;gt;PTBx,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GPIO_CTL_DDRx and &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GPIO_CTL-&amp;gt;PEx?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 16:28:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-s-wrong-with-the-MM9Z1-638-Wake-Up-function/m-p/505686#M12363</guid>
      <dc:creator>m3</dc:creator>
      <dc:date>2016-03-29T16:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: What´s wrong with the MM9Z1_638 Wake-Up function?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-s-wrong-with-the-MM9Z1-638-Wake-Up-function/m-p/505687#M12364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the wakeup is triggered by the &lt;STRONG&gt;rising edge&lt;/STRONG&gt; of the internal PTB3 signal therefore its required to ensure the internal PTB3 is low. Important to notice is that the timer clock is changing in low power mode. To get exact timing the Timer should be disabled, configured ... Entering Stop mode will then enable the Timer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;can you try the following code&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;// PTB3 must be set to output&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_GPIO_CTL =&amp;nbsp; B_GPIO_CTL_DIR3M_MASK | B_GPIO_CTL_DIR3_MASK;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; // route Timer OC3 to PTB3&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through; font-size: 10pt;"&gt;B_GPIO_OUT3_WKUP = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_GPIO_OUT3_TCOMP3 = 1;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;// set Timer Ch3 to OC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TIOS_IOS3 = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through; font-size: 10pt;"&gt;B_OC3M_OC3M3 = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;// force internal PTB3 to low&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TSCR1_TEN = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TCTL1 = 0x80;&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; // clear on OC&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_CFORC_FOC3 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // force OC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TSCR1_TEN = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;// setup a rising edge in 10s&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TCTL1 = 0xC0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set on OC&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TC3 = B_TC3 + 0x2710;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // reload 10s&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_TFLG1_C3F = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;//enable wakeup on ptb3 (rising edge)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;B_PCR_WUE_WUPTB3 = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;W.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 15:05:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-s-wrong-with-the-MM9Z1-638-Wake-Up-function/m-p/505687#M12364</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2016-05-04T15:05:48Z</dc:date>
    </item>
  </channel>
</rss>

