<?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: MM9Z1_J638 Wake from STOP Reason in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-J638-Wake-from-STOP-Reason/m-p/1221855#M17702</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;It seems like the issue has been discussed privately already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2021 09:40:25 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2021-01-27T09:40:25Z</dc:date>
    <item>
      <title>MM9Z1_J638 Wake from STOP Reason</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-J638-Wake-from-STOP-Reason/m-p/1219837#M17696</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am leveraging the Demo Project&amp;nbsp;MM9Z1J638-Demo-APPSW.zip provided by NXP and am trying to add Low Power Modes.&lt;/P&gt;&lt;P&gt;I have added a STOP method (attached)&lt;/P&gt;&lt;P&gt;What I am finding is a great many times when the micro wakes, the WakeUpReason / B_PCR_SR is 0x0000.&amp;nbsp; &amp;nbsp;I do not see anywhere in the D2D IRQ (or any other IRQ's) where B_PCR_SR is cleared, so I am confused by the differing results on wake.&amp;nbsp; &amp;nbsp;Also, I am wanting to take some action based on the reason for waking, and the unknown reason is throwing me a curve.&lt;/P&gt;&lt;P&gt;Is there something I am missing in the prep for STOP or need to do in the wakeup to make the data in the B_PCR_SR more reliable??&lt;/P&gt;&lt;P&gt;Thanks in advance for your suggestions....&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 21:10:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-J638-Wake-from-STOP-Reason/m-p/1219837#M17696</guid>
      <dc:creator>mike_sims</dc:creator>
      <dc:date>2021-01-22T21:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_J638 Wake from STOP Reason</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-J638-Wake-from-STOP-Reason/m-p/1221855#M17702</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;It seems like the issue has been discussed privately already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 09:40:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-J638-Wake-from-STOP-Reason/m-p/1221855#M17702</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-01-27T09:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: MM9Z1_J638 Wake from STOP Reason</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-J638-Wake-from-STOP-Reason/m-p/1222891#M17704</link>
      <description>&lt;P&gt;Hi, I&lt;STRONG&gt; did reply to this thread yesterday, but its somehow lost!!! Sorry for that.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Let me try to recapture....&lt;/P&gt;
&lt;P&gt;The PCR_SR should indicate the reason for the wakeup. If its not (= 0x0000) something is wrong. I expect some configuration is wrong and&lt;EM&gt;&lt;STRONG&gt; e.g.&lt;/STRONG&gt; &lt;/EM&gt;the device does not enter STOP mode and therefor no wakeup is indicated.&lt;/P&gt;
&lt;P&gt;One specific issue with the software sent is that the following statement should be done when the TEN = 1: (please see //xx)&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;void WakeUpTimerInit(void)
{
	/* TIMER CLK 
	 * 
	 * When in STOP or SLEEP mode, this timer is clocked by ALFCLK
	 * ALFCLK is configured to be 1khz (1mS)
	 * 
	 */
	
	// PTB2 must be set to output
	B_GPIO_CTL = GPIO_CTL_PTB2_OUTPUT;

	// route Timer OC3 to PTB3
	B_GPIO_OUT2_TCOMP3 = 1;  

	// set Timer Ch3 to OC
	B_TIOS_IOS3 = 1;

	// force internal PTB3 to low
	B_TSCR1_TEN = 1;
	B_TCTL1 = 0x80;							// set OC3 for Falling 
	B_CFORC_FOC3 = 1;          				// force OC on OC3
//xx clearing must be done with TEN = 1	
	B_TFLG1_C3F = 1;						// Clear Irq Flag
	B_TSCR1_TEN = 0;
	 
	// setup a rising edge in 10s
	B_TCTL1 = 0xC0;							// set OC3 for Rising

	B_TC3 = B_TCNT + 10000;          		// reload 10s
//xx	B_TFLG1_C3F = 1;						// Clear Irq Flag

}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:28:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MM9Z1-J638-Wake-from-STOP-Reason/m-p/1222891#M17704</guid>
      <dc:creator>Q_man</dc:creator>
      <dc:date>2021-01-28T21:28:14Z</dc:date>
    </item>
  </channel>
</rss>

