Leonardo Gabrielli

STOP modes cause Reset. Is there any way to see exception raised?

Discussion created by Leonardo Gabrielli on Mar 30, 2010
Latest reply on May 7, 2013 by Carlos Fernando Palma Roldán

Hi, I'm trying to use all the STOP modes. I've written some simple projects to test, then I tested on a Flexis DEMOJM with a MCF51JM128. I measured the current on the jumper J24. Results are different with debugger connected or not, because XCSR[ENBDM] changes the behaviour. I don't know how to set this bit if can be set at all:

 

STOP2 App:

- with Debugger: 18.8mA, i.e. it's the STOP4 current (Ref man says when debg is connected instead of STOP2 & STOP3 will go STOP4)

- without dbuger: 580uA, I guess it's the STOP2 current + USB quiescent current

 

STOP3 App:

- w/ DBG: 18.8 mA, it's the STOP4 current again 

- w/o DBG: RESET!

 

STOP4 App:

- w/ DBG: 18.8 mA, it's the STOP4 current 

- w/o DBG: RESET!

 

My question: why I get a Reset? Exception? I'm not expert on exceptions, illegal opcodes and such. How can I now the exception number thrown? Is there any way to debug this?

 

The SOPT1, SPMSC1, SPMSC2 registers are set correctly as provided by the Reference Manual, rev.2 What could be wrong?

 

Also: why I get high STOP2 current? Anyone knows how much is the STOP3 current? I'd rather go STOP3 if it gets nearly the same amount of current (as told by the data sheet).

 

Thanks, bye

Outcomes