Code runs in debugger but hanging when programmed

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Code runs in debugger but hanging when programmed

887件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

484件の閲覧回数
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 件の賞賛
返信

484件の閲覧回数
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 件の賞賛
返信