<?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のトピックRe: MC13213: RTIisr and STOP2 wakeup</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-RTIisr-and-STOP2-wakeup/m-p/195195#M15535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;News! now the MCU restart from stop2 mode,I control the SPMSC2 register to control if I'm coming from the stop2 mode in the __Startup procedure called by the .prm file but the MCU return in main procedure and the program lost itself in some memory location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's possible that the problem is related to the fact I don't save the system registers?? I'm not doing the reg save procedure because I first want to see if the MCU recover and then go in the right procedure called from __Startup procedure ( vector 0 ) but if when RTI produce a POR reset the MCU go in the main I'm think that the problem is another one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jul 2009 02:35:27 GMT</pubDate>
    <dc:creator>Brodek</dc:creator>
    <dc:date>2009-07-02T02:35:27Z</dc:date>
    <item>
      <title>MC13213: RTIisr and STOP2 wakeup</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-RTIisr-and-STOP2-wakeup/m-p/195194#M15534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm writing here because I need some help with Stop mode 2 used on a MC13213 whit SMAC code.&lt;/P&gt;&lt;P&gt;I think that the problem occurs when the RTI wake up the MCU from the sleep mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've configured all the register needed to put the MCU in stop mode 2 in the SPMSC2 register and also configured RTI with 1,024s period using internal oscillator.&amp;nbsp; Before entering in stop mode using&lt;/P&gt;&lt;P&gt;__asm("STOP")&amp;nbsp; introduction (is the instruction correct?) I switch to the internal clock generator for the MCU and then I put the radio modem in hibernate mode (when MCU operate normally I use Modem clock generator). To wake and transmit data I use&amp;nbsp; RTI ISR to refresh a simple tick counter but after using stop instruction the module simply sleep forever.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where I'm wrong??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank, Walter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ps: sorry for my English!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2009 15:05:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-RTIisr-and-STOP2-wakeup/m-p/195194#M15534</guid>
      <dc:creator>Brodek</dc:creator>
      <dc:date>2009-06-30T15:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: MC13213: RTIisr and STOP2 wakeup</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-RTIisr-and-STOP2-wakeup/m-p/195195#M15535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;News! now the MCU restart from stop2 mode,I control the SPMSC2 register to control if I'm coming from the stop2 mode in the __Startup procedure called by the .prm file but the MCU return in main procedure and the program lost itself in some memory location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's possible that the problem is related to the fact I don't save the system registers?? I'm not doing the reg save procedure because I first want to see if the MCU recover and then go in the right procedure called from __Startup procedure ( vector 0 ) but if when RTI produce a POR reset the MCU go in the main I'm think that the problem is another one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 02:35:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-RTIisr-and-STOP2-wakeup/m-p/195195#M15535</guid>
      <dc:creator>Brodek</dc:creator>
      <dc:date>2009-07-02T02:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: MC13213: RTIisr and STOP2 wakeup</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-RTIisr-and-STOP2-wakeup/m-p/195196#M15536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my startup code. I don't save any registe because I want only to wake up the MCU from stop2!! To see if the MCU exit from stop2 I use an amperometer ( if the code works right I expect fluctuation in the current value but now I only read a fixed 0,5mA current absorbed by the 13213-SRB board).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where I'm wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
__EXTERN_C void _Startup(void){asm{  LDX #initSOPT;  STX SOPT;      LDX #initSPMSC1;  STX SPMSC1;    LDA IRQSC  ORA #$10   //IRQ ON  STA IRQSC       LDX #$17   //RTI CFG   STX SRTISC     LDA SPMSC2;  AND #$08; //check PPDF  BEQ Start_App;               INIT:           //if i'm coming from stop 2   LDA     initSPMSC2; //enable stop2   ORA     #$07;   STA     SPMSC2;   JMP main;     Start_App:   //Init stop mode ( first execution )   LDA     initSPMSC2; //enable stop2   ORA     #$03;   STA     SPMSC2;       end:       JMP main;     }/****************************************************************/#include "MC9S08GB60.h"void main(void){            for(;;){                                    SRTISC = 0x57;            asm{              stop            }                      }};&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:49:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-RTIisr-and-STOP2-wakeup/m-p/195196#M15536</guid>
      <dc:creator>Brodek</dc:creator>
      <dc:date>2020-10-29T09:49:58Z</dc:date>
    </item>
  </channel>
</rss>

