<?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: Wake on CAN message receive in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Wake-on-CAN-message-receive/m-p/1558675#M18964</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I do not want to repeat what was already written so I will use links.&lt;/P&gt;
&lt;P&gt;There are a few questions and answers related to your issue. Plus there is an S12XE CAN wake up example in the answer in the item 1)&lt;/P&gt;
&lt;P&gt;Also it is good to go through entire CAN setup. You can compare it&amp;nbsp; with 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Contains S12XE CAN wake up example in the answer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12G128-wake-up-from-Pseudo-Stop-Mode/m-p/910594" target="_blank"&gt;https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12G128-wake-up-from-Pseudo-Stop-Mode/m-p/910594&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Do not be surprised the question is related to S12G because modules and principles are the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MSCAN-Module-for-MC9S12XEQ512-MAL/m-p/466185" target="_blank"&gt;https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MSCAN-Module-for-MC9S12XEQ512-MAL/m-p/466185&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Ladislav&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 15:22:54 GMT</pubDate>
    <dc:creator>lama</dc:creator>
    <dc:date>2022-11-23T15:22:54Z</dc:date>
    <item>
      <title>Wake on CAN message receive</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Wake-on-CAN-message-receive/m-p/1557645#M18959</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to put the S12XEQ to sleep and wake when either when the CAN bus is energised or a CAN message is received.&amp;nbsp; Before I put the micro to sleep I put the CAN tranceiver into SLEEP (High on STB pin of TJA1042).&lt;/P&gt;&lt;P&gt;I have asked a similar question before but have never gotten this to work.&amp;nbsp; The micro would goto sleep happily, current on supply would reduce, but would never wake.&amp;nbsp; I expect either CAN0 or CAN1 to wake the micro&lt;/P&gt;&lt;P&gt;My code looks like this when I want to start sleep.&lt;/P&gt;&lt;P&gt;CAN_Shutdown_OFF(); // Pull TJA1042 Stanby High = 5V = Standby&lt;/P&gt;&lt;P&gt;CAN0CTL0 |= WUPE;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable Wake Up&lt;BR /&gt;CAN1CTL0 |= WUPE;&amp;nbsp;&amp;nbsp;&amp;nbsp; // WUPE allows restart from Sleep&lt;/P&gt;&lt;P&gt;CAN0RIER |= WUPIE;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable Wake Up Interrupt Enable&lt;BR /&gt;CAN1RIER |= WUPIE;&lt;/P&gt;&lt;P&gt;CAN0CTL0 |= SLPRQ;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Request sleep mode, clock continues to run&lt;BR /&gt;CAN1CTL0 |= SLPRQ;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Request sleep mode&lt;BR /&gt;while ((CAN0CTL1 &amp;amp; SLPAK) == 0) ; // Wait for SLPAK to == 1 Correct !&lt;BR /&gt;while ((CAN1CTL1 &amp;amp; SLPAK) == 0) ; // Wait for SLPAK to == 1&lt;/P&gt;&lt;P&gt;_asm ("ANDCC #$7f"); // Clear S bit. If not S is Set then STOP is disabled and it does a 2 cycle NOP&lt;BR /&gt;_asm ("NOP");&lt;BR /&gt;_asm ("STOP"); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Enter STOP mode Correct !&lt;BR /&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; // Processor will now SLEEP here&lt;BR /&gt;_asm ("ORCC #$80"); &amp;nbsp;&amp;nbsp; // Set STOP bit&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; // And wakeup here...&lt;BR /&gt;CAN_Shutdown_ON();&amp;nbsp; // Pull TJA1042 Stanby low = 0V = working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have some code in "CAN Wake ISR", but it is much the same as above.&lt;/P&gt;&lt;P&gt;Can you see what I am missing?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wade&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 08:53:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Wake-on-CAN-message-receive/m-p/1557645#M18959</guid>
      <dc:creator>dastek</dc:creator>
      <dc:date>2022-11-22T08:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Wake on CAN message receive</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Wake-on-CAN-message-receive/m-p/1558675#M18964</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I do not want to repeat what was already written so I will use links.&lt;/P&gt;
&lt;P&gt;There are a few questions and answers related to your issue. Plus there is an S12XE CAN wake up example in the answer in the item 1)&lt;/P&gt;
&lt;P&gt;Also it is good to go through entire CAN setup. You can compare it&amp;nbsp; with 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Contains S12XE CAN wake up example in the answer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12G128-wake-up-from-Pseudo-Stop-Mode/m-p/910594" target="_blank"&gt;https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12G128-wake-up-from-Pseudo-Stop-Mode/m-p/910594&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Do not be surprised the question is related to S12G because modules and principles are the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MSCAN-Module-for-MC9S12XEQ512-MAL/m-p/466185" target="_blank"&gt;https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MSCAN-Module-for-MC9S12XEQ512-MAL/m-p/466185&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Ladislav&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 15:22:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Wake-on-CAN-message-receive/m-p/1558675#M18964</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2022-11-23T15:22:54Z</dc:date>
    </item>
  </channel>
</rss>

