Code runs in debugger but hanging when programmed

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Code runs in debugger but hanging when programmed

889 次查看
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 回复数

486 次查看
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 项奖励
回复

486 次查看
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 项奖励
回复