Shop OBEX P1 Docs P2 Docs Learn Events
Debugging with SX_KEY — Parallax Forums

Debugging with SX_KEY

MatthiasMatthias Posts: 3
edited 2005-01-25 17:39 in General Discussion
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?)

Comments

  • BeanBean Posts: 8,129
    edited 2005-01-25 12:22
    Have you have specified OSC4MHZ in the device line ?
    Have you have specified a frequency below 300KHz ?

    Bean
  • MatthiasMatthias Posts: 3
    edited 2005-01-25 14:20
    Hi, thanks for your answer

    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?
  • BeanBean Posts: 8,129
    edited 2005-01-25 15:11
    No if you specifiy OSC4MHZ then the SX clock runs from the internal oscillator and you cannot debug.
    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.
  • MatthiasMatthias Posts: 3
    edited 2005-01-25 15:20
    I use this device configuration

    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.
  • PJMontyPJMonty Posts: 983
    edited 2005-01-25 17:39
    Matthias,

    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
Sign In or Register to comment.