MFC51AC256 in stop mode

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

MFC51AC256 in stop mode

1,244 次查看
Mikerider
Contributor II

¿ What do I have to program to put the MCF51AC256 (core V1) in stop mode ?. I've modify  the register SPMSC2, SPMSC1, SPOT to go to stop mode, but when i execute the stop commmand nothing happens. Please give me a sample code to see how to do so 

标签 (1)
1 回复

744 次查看
TomE
Specialist II

> when i execute the stop commmand nothing happens

 

Isn't "nothing" exactly what is meant to happen when you execute "stop"? :smileyhappy:

 

Are you running it with a debugger attached? That may be affecting what you see.

 

"STOP" has a parameter - the new CPU Status Register contents. The usual way to use STOP is to disable all interrupts (set the SR to 0x2700), then do any setup/wakeup stuff then execute the STOP with the IPL that you have set up to wake the CPU up again. To wake up with all interrupts this is "0x2000", to set to CPU to IPL "n" it is "0x2n00.

 

I assume you have a timer running or have it set up to interrupt on an external pin. Maybe a different interrupt is happening to the one you expect. Maybe a timer is running or a serial port is interrupting?

 

Tom