Debugging with SX_KEY
Hi Guys
I am trying to debug my code on a sx48 using an sx key rev F.
But after programming my device for debugging, the debug
window gets blocked. The RESET line is highlighted but the program
does not jump to the reset entry and I cannot use any of the step,
walk,...buttons to move inside the program (message "running").
What am I making wrong?
(I have set a BREAK just after the reset entry -> shouldn't this
work to let the program run step by step?)
I am trying to debug my code on a sx48 using an sx key rev F.
But after programming my device for debugging, the debug
window gets blocked. The RESET line is highlighted but the program
does not jump to the reset entry and I cannot use any of the step,
walk,...buttons to move inside the program (message "running").
What am I making wrong?
(I have set a BREAK just after the reset entry -> shouldn't this
work to let the program run step by step?)
Comments
Have you have specified a frequency below 300KHz ?
Bean
Have you have specified OSC4MHZ in the device line ?
I have specified DEVICE SX48,OSCHS2,BOR42 and IRC_CAL IRC_4MHZ for using an
external crystal. Do I have to set OSC4MHz for debugging? (Nothing changes when I do this)
Have you have specified a frequency below 300KHz ?
What frequency? And has it to be below or abouve 300KHz?
Matthias
Ps I tried also my code in the SX simulator and there it works. But if I use the SX-key there is always the SLEEPING message and I cannot do anything. Is it possible that something is wrong with my SX Kex?
Your DEVICE line should be okay for debugging.
The frequency is the SX clock frequency on the FREQ line. The SX-Key cannot run below 300KHz.
Can you post your code ?
Bean.
DEVICE SX48,OSCHS2,BOR42
IRC_CAL IRC_FAST
FREQ 50_000_000
I can post my code, the debug window appears and it gets blocked showing a RUNNING message.
If I send my programm using the program button, unplug the sx key and plug the external oscillator,
the program runs correctly.
Remove the break instruction in your code. You don't need the break instruction since the SXKey will always wait at the start of a debugging session for you to either run, walk, or step. Remove it and I believe your problem will go away.
Thanks, PeterM