MFC51AC256 in stop mode

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

MFC51AC256 in stop mode

1,039 Views
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 

Labels (1)
1 Reply

539 Views
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