MC9S12DG128 with cosmic compiler and Hitop JProbeS12 debugger

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

MC9S12DG128 with cosmic compiler and Hitop JProbeS12 debugger

1,001 Views
ianlovatt
Contributor III
Sorry for such a vague description but I can't see where to begin
with this, Any help or clues will be greatly appreciated!

I am having problems running code from flash. I have a project which
compiles fine and runs in the hitop debugger but does not seem to run
when the header is disconnected and the board is powercycled.

I can get a minimal program which turns on LEDs and sits in a while
(1) until the watchdog kicks in to work fine. I've just stuck this
test code at the start of main (after configuring watchdog and INITEE
etc.). The LEDs flicker periodically which i assume is the program
resetting. This works fine when powercycled and run away from the
debugger.

If I try place the test code after a call to a function from the
project(@near or @far) then when the watchdog expires the program
doesn't seem to restart, the LEDs power off and don't come back on
again. Powercycling it away from the debugger doesn't work either,
the LEDs remain off.

Any ideas?

Cheers
ian
Labels (1)
0 Kudos
1 Reply

251 Views
kef
Specialist I
Code works in emulator (special mode) and doesn't work standalone (normal mode), I think that's write-once issue.


ianlovatt wrote:
If I try place the test code after a call to a function from the
project(@near or @far) then when the watchdog expires the program
doesn't seem to restart, the LEDs power off and don't come back on
again. Powercycling it away from the debugger doesn't work either,
the LEDs remain off.

I don't know what you mean ^^ here, but COPCTL register is write once. So for example you can't disable COP temporarily in normal mode. Once disabled, or enabled, you can't change that to opposite, or change COP rate.
0 Kudos