<?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: How to go in the STOP mode? in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386089#M10869</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In stop mode, the INT module is capable of waking up the CPU if an eligible CPU exception occurs.&lt;/P&gt;&lt;P&gt;Every I-bit maskable interrupt request which is configured to be handled by the CPU is capable of waking&lt;/P&gt;&lt;P&gt;the MCU from stop or wait mode. Additionally machine exceptions can wake-up the MCU from stop or&lt;/P&gt;&lt;P&gt;wait mode.&lt;/P&gt;&lt;P&gt;To determine whether an I-bit maskable interrupts is qualified to wake up the CPU or not, the same settings&lt;/P&gt;&lt;P&gt;as in normal run mode are applied during stop or wait mode:&lt;/P&gt;&lt;P&gt;• If the I-bit in the CCW is set, all I-bit maskable interrupts are masked from waking up the MCU.&lt;/P&gt;&lt;P&gt;• An I-bit maskable interrupt is ignored if it is configured to a priority level below or equal to the current IPL in CCW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The X-bit maskable interrupt request can wake up the MCU from stop or wait mode at anytime, even if&lt;/P&gt;&lt;P&gt;the X-bit in CCW is set1. If the X-bit maskable interrupt request is used to wake-up the MCU with the Xbit&lt;/P&gt;&lt;P&gt;in the CCW set, the associated ISR is not called. The CPU then resumes program execution with the&lt;/P&gt;&lt;P&gt;instruction following the WAI or STOP instruction. This feature works following the same rules like any&lt;/P&gt;&lt;P&gt;interrupt request, i.e. care must be taken that the X-bit maskable interrupt request used for wake-up&lt;/P&gt;&lt;P&gt;remains active at least until the system begins execution of the instruction following the WAI or STOP&lt;/P&gt;&lt;P&gt;instruction; otherwise, wake-up may not occur.&lt;/P&gt;&lt;DIV style="left: 586px; top: 53px;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Mar 2015 14:45:52 GMT</pubDate>
    <dc:creator>Martin35804</dc:creator>
    <dc:date>2015-03-25T14:45:52Z</dc:date>
    <item>
      <title>How to go in the STOP mode?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386086#M10866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;I am working with a MC9S12ZVL and I have a problem when I try to put the micro in stop mode.&lt;/P&gt;&lt;P&gt;The command "asm STOP" has no effects. Probably I need to set some registers but I don't know which ones. I tried to set some bits of the CPMUCLK and CPMUINT registers without getting any results.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second problem regards the WAIT mode. I put the micro in wait using "asm WAI" but I can't wake up it using the PAD port as KWU.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you give me any suggestions?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fabrizio &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 11:10:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386086#M10866</guid>
      <dc:creator>fabrizioimpinna</dc:creator>
      <dc:date>2014-12-02T11:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to go in the STOP mode?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386087#M10867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fabrizio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prior to executing stop command, the S bit in CCR must be cleared to enable the stop mode. If the S bit is not cleared, then STOP instruction has no effect and it is executed as a dummy instruction NOP.&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;&lt;/P&gt;&lt;P&gt;I have attached a simple example code of Stop mode made for S12ZVM, but the main code can be used with S12ZVL as well.&lt;/P&gt;&lt;P&gt;It uses IRQ pin as a trigger to wake up the MCU. When th epin is triggered by falling edge, the MCU goes out of Stop mode into interrupt routine and then after into Stop mode again (kind of loop).&lt;/P&gt;&lt;P&gt;The interrupt routine is indicated by several LED blinks which is done by toggling Port T.&lt;/P&gt;&lt;P&gt;The TRK-S12ZVL board has user RGB LEDs connected to Port P and the LEDs should light when there is logic zero on the port pins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the wake up from WAIT mode by KWU, a pin interrupt must be activated. There is a Port Interrupt Enable Register and for the Port AD it is PIEADH/PIEADL exactly. So you should set the bits in this register to logic 1 to enable interrupts.&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>Thu, 04 Dec 2014 14:02:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386087#M10867</guid>
      <dc:creator>iggi</dc:creator>
      <dc:date>2014-12-04T14:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to go in the STOP mode?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386088#M10868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Iggi,&lt;/P&gt;&lt;P&gt;now I am able to put in STOP mode the device, but I cannot wake up it. &lt;/P&gt;&lt;P&gt;I have enabled the bit &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;PIEADL/H of Port Interrupt Enable Register for the Port AD but it has no effect on the wake up of the device.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Could you confirm that it is possible to wake up the device from STOP mode using the KWU interrupt of port AD and port L?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Is there any other asm instruction that I need for the wake up?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Where have you found the asm instruction for the STOP mode &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;asm ANDCC #0x7F to clear the S bit?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I am afraid that I miss a manual where the asm instructions are contained.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thank you for the help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Best regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Fabrizio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 17:19:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386088#M10868</guid>
      <dc:creator>fabrizioimpinna</dc:creator>
      <dc:date>2014-12-30T17:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to go in the STOP mode?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386089#M10869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In stop mode, the INT module is capable of waking up the CPU if an eligible CPU exception occurs.&lt;/P&gt;&lt;P&gt;Every I-bit maskable interrupt request which is configured to be handled by the CPU is capable of waking&lt;/P&gt;&lt;P&gt;the MCU from stop or wait mode. Additionally machine exceptions can wake-up the MCU from stop or&lt;/P&gt;&lt;P&gt;wait mode.&lt;/P&gt;&lt;P&gt;To determine whether an I-bit maskable interrupts is qualified to wake up the CPU or not, the same settings&lt;/P&gt;&lt;P&gt;as in normal run mode are applied during stop or wait mode:&lt;/P&gt;&lt;P&gt;• If the I-bit in the CCW is set, all I-bit maskable interrupts are masked from waking up the MCU.&lt;/P&gt;&lt;P&gt;• An I-bit maskable interrupt is ignored if it is configured to a priority level below or equal to the current IPL in CCW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The X-bit maskable interrupt request can wake up the MCU from stop or wait mode at anytime, even if&lt;/P&gt;&lt;P&gt;the X-bit in CCW is set1. If the X-bit maskable interrupt request is used to wake-up the MCU with the Xbit&lt;/P&gt;&lt;P&gt;in the CCW set, the associated ISR is not called. The CPU then resumes program execution with the&lt;/P&gt;&lt;P&gt;instruction following the WAI or STOP instruction. This feature works following the same rules like any&lt;/P&gt;&lt;P&gt;interrupt request, i.e. care must be taken that the X-bit maskable interrupt request used for wake-up&lt;/P&gt;&lt;P&gt;remains active at least until the system begins execution of the instruction following the WAI or STOP&lt;/P&gt;&lt;P&gt;instruction; otherwise, wake-up may not occur.&lt;/P&gt;&lt;DIV style="left: 586px; top: 53px;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2015 14:45:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386089#M10869</guid>
      <dc:creator>Martin35804</dc:creator>
      <dc:date>2015-03-25T14:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to go in the STOP mode?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386090#M10870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your guidance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understood now from the datasheet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2015 09:35:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-go-in-the-STOP-mode/m-p/386090#M10870</guid>
      <dc:creator>vijay_anandk</dc:creator>
      <dc:date>2015-04-03T09:35:11Z</dc:date>
    </item>
  </channel>
</rss>

