Stop1 mode, 9S08QG Codewarrior V6.1 P&E Multilink BDM

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

Stop1 mode, 9S08QG Codewarrior V6.1 P&E Multilink BDM

1,759 Views
DSbob
Contributor III
Anybody notice the debugger just ignores the STOP instruction?.  Just to make sure I modified my programming & calibration fixture for current measurement, to confirm the 0.5uA supply current at "lights out" time of my application operating without the debugger.
 
I missed that in my production code "perfected"  using a Cyclone supplying power (it died under Freescale warranty, so a quick switch to Multilink and my fixture until production programming is needed), with STOP in the main loop:
 
for(;:smileywink:{
 .
 .
 . / lights out
 asm stop}
 
Then in some code for an experiment, I found code after a STOP instruction not in such loop executing, trace through it, ~4.6mA supply in the "lights out" loop, etc.  I can trace thru the instructions in the loop executing in order, with STOP instruction doing nothing.
 
No where can I find this behavior documented.
Labels (1)
0 Kudos
4 Replies

423 Views
DSbob
Contributor III
Thanks JimDon.  It did occur to me having BDM ignore stop might sidestep some problem.  I thought by "manual" you might have meant the Technical Summary that came with the Multilink.  Nothing there.  Whatever came with the Cyclone is long gone for the warranty credit.
 
Thanks allawttreb.  I've been working mostly from the QG data sheet and pretty confusing IDE help.  That Reference Manual section just says BDM replaces STOP1 Behavior with STOP3, and I don't see where including

Table 3-3. BDM Enabled Stop Mode Behavior

the instruction would be ignored, or what in my application would cause code execution to resume.  Too many manuals.

whew!  Think I just barely avoided executing the endless loop with the write to flash routines in it.  Oh well, my current target is just scrap and I have plenty of others.  I think that is enough for me to work toward completing the experiment.

Sorry for the smiley face in the code snippet.  I'll preview the post this time.

0 Kudos

423 Views
bigmac
Specialist III
To avoid the smiley face phenomenon, just include spaces between semi-colons, and between the semi-colon and the closing parenthesis (which I did not do here :smileywink:
0 Kudos

423 Views
allawtterb
Contributor IV
Using the BDM while in stop mode is described in the HCS08 reference manual.  Refer to section 3.6.4 (page 29):
0 Kudos

423 Views
JimDon
Senior Contributor III
Read in the manual:

Wait or Stop Status — When the target CPU is in wait or stop mode, most BDC commands cannot function.

Not sure how P&E deals with this, but don't count on stop mode working the same while debugging.
Could be it gets ignored by design.

It also says:
Oscillator runs in stop mode, if BDC enabled
Again, don't know exactly how this is dealt with.
0 Kudos