wake from stop mode2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

wake from stop mode2

1,209 Views
fignon
Contributor I
Hello,
I have some troubles to exit stop mode 2.

Here is my code (it is just to test stop mode):

#define STOPMODE2 0x03
#define STOPMODE3 0x00

/* Init Stop Mode*/
SPMSC1 = 0x10 ; //disable low-voltage detect to enable stop mode 1 and 2
SPMSC2=STOPMODE3 ;

/* Init RTI Mode*/
SRTISC_RTIACK=1 ;
SRTISC=0x57; /*overflow every 1.024s*/

for( ; ; )
{
    asm stop;
}

interrupt void vrti()
{
  SRTISC_RTIACK=1 ;
  LED2=~LED2 ;
}

This code works with stop mode3, should I modify anything for stop mode 2 ?
Labels (1)
0 Kudos
3 Replies

369 Views
allawtterb
Contributor IV
Which exact microcontroller are you using?
0 Kudos

369 Views
fignon
Contributor I
I'm using the MC1321x
0 Kudos

369 Views
allawtterb
Contributor IV
Take a look at AN2493, it describes the Stop modes for the core used in the MC1321X.  This is true except that Stope mode 1 is not allowed for the MC1321X. I think the resolution to your problem can be found on the stop mode 2 section on page 4. The link to the app note is below. 
 
0 Kudos