Shop OBEX P1 Docs P2 Docs Learn Events
SX Debug will only RUN — Parallax Forums

SX Debug will only RUN

KenMKenM Posts: 657
edited 2004-11-12 20:56 in General Discussion
I think I ran into this before, but don't remember a solution.

On my sx28, when I choose Debug, the debug window comes up RUNNING and the options for polling, run, stop etc are grey and I cannot single step through my program.

Any ideas?

Ken

Comments

  • BrianWBrianW Posts: 7
    edited 2004-11-08 16:16
    What is providing the clock to your SX, I believe the SX-Key has to do this for debugging.

    Brian
  • BeanBean Posts: 8,129
    edited 2004-11-08 16:25
    The SX-Key only debug from about 300KHz to 100MHz if you have specified a freq lower than 300 KHz that is what happens.

    Bean.
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-11-08 16:33
    Insert a breakpoint early in your code?
  • StephenStephen Posts: 53
    edited 2004-11-08 17:18
    Do you have the external clock circuit on the board isolated/removed from the OSC pins?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-11-08 19:09
    Change your oscillator setting to OSCXT2 so that the SX-Key generates the clock.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • PJMontyPJMonty Posts: 983
    edited 2004-11-11 02:24
    Ken,

    You haven't replied whether any of the suggestions helped, so I thought I'd toss in one more possibility. If you choose "Program", and then choose "Debug (reenter)", you'll find that the debug windows come up, it says, "Running," and all but the "Reset" and "Quit" buttons are greyed out. This is exactly the resulting problem you describe.

    The reason is that there is a difference between "Program" and "Debug." When you choose "Program," the only thing sent to the chip is the code you wrote. When you choose "Debug," not only is your code sent, but a little bit of special code is appended and sent to the chip as well. This special code is what enables the SX-Key to properly control the chip being deubgged. Without this code, the IDE just assumes it is there and the SX-Key never gets to tell the debugger windows anything other than that it is alive, well, and waiting for instructions. The actual debugging communication never gets started.

    You may already be familiar with all of this, but I know that when I first started using the SXKey IDE, I was not aware of the subtle difference between "Program" and "Debug," and had this sort of thing happen to me more than once. I just figured I could "Program" the chip, then manually jump into the debugger by choosing "Debug (reenter)", and it would all work. Unfortunately, it doesn't, and the IDE has no way of knowing that the chip is not properly prepared for debugging.

      Thanks, PeterM
  • Display NameDisplay Name Posts: 7
    edited 2004-11-11 17:33
    I have the self same problem.

    Using SX-Key with just the Mclr pulled high, OSC1, OSC2, Vdd Vss connected, the V2.02 environment goes straight into Running mode. Putting a Break early on in the code does nothing. I did have OSCHS3 and changed that to OSCXT2. Makes no difference. SX-Key is providing the clock. I've tried 4Mhz and 50MHz. Makes no a difference.

    It must be the way the circuit is configured,, because a different breadboard works OK with 'Debug' programming the chip and then halting on the Reset.

    This is just a simple circuit. +5v and ground going to the SX28 and SX-key. OSC1 OSC2 connected to SX-key. MClr pulled high.

    What's going on ?
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2004-11-11 18:01
    Hey, you Debug "run-only" SX-Keyers,

    please double-check what Stephen already mentioned in this thread:

    >> Do you have the external clock circuit on the board isolated/removed from the OSC pins?

    A while ago, I had the same problem, and then found out that an external clock source was still connected to the OSC1 pin. I'm not sure, but maybe that the SX behaves similar when you have an Xtal or resonator connected to the OSC1 and OSC2 pins. Therefore make sure that at least the OSC1 pin is only connected to the header pin that goes into the SX-Key device, and to nothing else.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,


    G
  • Display NameDisplay Name Posts: 7
    edited 2004-11-11 22:51
    I have nothing else connected to the SX28, just the 5 wires to Vdd Vss Mclr OSC1 and OSC2. OSC1 & Osc2 are directly connected to the SX-Key. There is no other oscillator, and indeed no other components

    I can't get my head around this because the SX-Key configuration works in debug mode with my production boards - so the software is installed on the PC OK, but it won't work with this simple SX28 setup on a breadboard.
  • Display NameDisplay Name Posts: 7
    edited 2004-11-12 15:42
    OK. Just a quick comment to say this is now fixed. I've no idea what fixed it. I suspect it may have been a faulty socket on the breadboard. The fault has gone away. I've not changed any code. Let's hope that's all it was.
  • KenMKenM Posts: 657
    edited 2004-11-12 20:56
    I have not resumed debugging my project since the last post....but for what is is worth, there is no external osc connected, the SXkey is providing the clock.

    I will check carefully on PJ's comments regarding the· way debug is entered.

    Ken
Sign In or Register to comment.