wake from stop mode2

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

wake from stop mode2

1,236 次查看
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 ?
标签 (1)
0 项奖励
3 回复数

396 次查看
allawtterb
Contributor IV
Which exact microcontroller are you using?
0 项奖励

396 次查看
fignon
Contributor I
I'm using the MC1321x
0 项奖励

396 次查看
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 项奖励