Code runs in debugger but hanging when programmed

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

Code runs in debugger but hanging when programmed

684 Views
New_to_HC08
Contributor I

Hi

 

Hardware: MS9SO8GT60 with 32.768 kHZ xtal

programmer: Cyclone Pro HC08 - HCS08

IDE: Freescale Codewarrior 5.9.0

I realize there is any one of multiple issues that could be causing my code to lock up. But when running through the debugger, (Cyclone Pro) it works fine, key interrupts, and writing to LCD display, but when I program the board, and run the same code, stand alone, it works for a few minutes, and then appears to get stuck in a loop.

I have a fast loop running, when its awake, to write to the display, and a slower one for asleep, and it'll 'hang' anywhere from accepting key inputs one minute and then not the next, or halfway through writing out to the screen.

 

I realise this is hard to debug, but if someone has encountered this, and a list of checkpoints I could go through.

(bearing  in mind I dont  own an oscilloscope!)

Cheers

Labels (1)
0 Kudos
2 Replies

281 Views
ThaManJD
Contributor III

Failing all other sensible suggestions, I'd be interested to see if the problem persists using the internal reference clock instead of the crystal as your clock source.

 

JD

0 Kudos

281 Views
peg
Senior Contributor IV

Hello,

 

Try turning of memory display windows in the debugger. The reading of registers by the debugger can make faulty code appear to run correctly.

Also try to "hot connect" to the hung device.

0 Kudos