stop3/wait mode resume?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

stop3/wait mode resume?

2,206件の閲覧回数
RChapman
Contributor I
This message contains an entire topic ported from a separate forum. The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value to you as you search for answers to your questions.
 
Posted: Fri Oct 21, 2005 10:20 am  
 
Hi all,
I'm programing MCS08GT60CFBE with CodeWarrior 5.6.1.1506.
I woul like to ask, please, a question about stoip3/wait mode resume.

After entering stop3/wait mode mcu doesn't wake up becouse the code that follows doesn't work.

here is a piece of code I writed.

Code:
SPMSC1_LVDSE = 1;
SPMSC2_PDC = 0;
// enable Pin 5, switch 4,
KBI1PE_KBI1PE5 = 1;
// enable KBI
KBI1SC_KBI1E = 1;
KBI1SC_KBACK = 1;
// enable pullup
PTAPE_PTAPE5 = 1;
 
IRQSC_IRQIE = 1;
       
// pullup and enable IRQ       
IRQSC_IRQPE = 1; // stop
       
_asm stop;
// or  _asm wait;


where I'm getting wrong?
Do I miss something?
Thank you very much in advance for any suggestions.
Posted: Mon Nov 07, 2005 10:37 am    
 
Hi,
I've the same problems with stop2. In my case, the RTI doesn't work.
I've seen your code and it's correct for me.
If you have any suggestion or you have solved the problem please help me!!!
Posted: Wed Nov 09, 2005 3:19 am    
 
Hello,

I notice that you have enabled both IRQ and the keyboard interrupts. You do not mention what happens within their ISRs - have their vectors been initialised?

With exit from Stop3 mode, I understand that the appropriate ISR will first be executed, before continuing with the code following the STOP (or WAIT) instruction. Perhaps you are getting stuck within one of the ISRs.

Regards,
Posted: Wed Nov 09, 2005 12:23 pm
 
I am using the following code on S08RD16 and it is working fine for me:

/* enable stop instruction */
SIMOPT_STOPE=1;
/* enable interrupts */
EnableInterrupts;
/* enable KBI interrupts from PTA1..PTA6 (keyboard columns) */
KBI1PE = 0x7E;
/* enable interrupts from the KBI1 module */
KBI1SC = 0x03;
/* acknowledge LVWF and PPDF, select stop2 mode */
PMCSC2 = 0x47;
/* enter stop mode */
asm(stop);

Make sure the STOP instruction is enabled and interrupts are enabled.

ラベル(1)
0 件の賞賛
返信
0 返答(返信)