Shop OBEX P1 Docs P2 Docs Learn Events
SX-Key Debugger problem with running (v3.10) — Parallax Forums

SX-Key Debugger problem with running (v3.10)

T&E EngineerT&E Engineer Posts: 1,396
edited 2005-12-28 22:43 in General Discussion
I am trying to follow the "Programming the SX microcontroller" v2 book by Gunther. In section I - Tutorial, it references the SX-Key Debugger. It shows the default screen having the·"debug" window listing Idle, Step, Walk and Run. However, mine says Running and·Step,·Walk, Run and Poll is ghosted out. I don't see a way or preference listing to stop it from running in order to step, walk or run through my program.

See screenshot attachment.
1024 x 768 - 160K
«1

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-03 05:30
    What is your clock source?· Are you using a TTL Oscillator?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • NateNate Posts: 154
    edited 2005-12-03 06:49
    If you have a clock source (other than the SX key) installed, you will get this problem if trying to debug....
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-03 13:38
    It sounds like·from what you are saying is that I need to remove the resonator on the PDB. I·did not know that I had to remove the 4 MHz resonator on the PDB before using the debugger.

    Anyway, I did remove it and applied power to the PDB and ran the debugger and still got the same "Running" effect (same screen shot).

    Please help.

    Thanks,

    Gilmore
  • RsadeikaRsadeika Posts: 3,837
    edited 2005-12-03 13:51
    Back when I first got my SX tech kit, when I was just doing things, I remember having a similar problem. I never pursued it any further because I figured I was doing something wrong. Maybe I was, and then again maybe I wasn't. Maybe you should post your code, I thought, at that time, it had something to do with my code.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-03 14:08
    I don't think it is my code as I can use any code and always get the "Running" mode using the DEBUG icon. I don't see anything documented either showing what the problem is.

    Please help.

    Thanks to all,

    Timothy Gilmore
  • RsadeikaRsadeika Posts: 3,837
    edited 2005-12-03 14:19
    Now it is starting to come back to me. Back then I had an earlier version of the IDE; I remember in one of the posts it mentioned this feature, Running, Step, ..., etc. As I recall most of the time it reacted the way you describe it, but on occasion, if I remember correctly, I was able to get something to Step, ..., etc. At that point I decided that maybe the debugger was to be left alone until I became an expert. Have not used it since.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-03 16:16
    I don't except that by ignoring the problem, it will·get fixed·I think someone from Parallax should answer the issue here.

    Thanks,

    Timothy Gilmore
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-05 03:19
    Tim,

    ·· I'm sorry I didn't get your answer before (not sure you answered me) but if you have a resonator or crystal plugged in you cannot DEBUG.· OTOH, if you have a TTL Oscillator installed you may damage the SX-Key.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • BeanBean Posts: 8,129
    edited 2005-12-05 03:37
    Tim,
    What frequency are you using. The SX-Key can only debug down to about 300 KHz.
    If you specify something lower than what the SX-Key can generate you will get that effect too.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    Those that would give up freedom for security will have neither.
    ·
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-05 12:29
    I'm not doing anything special using all default conditions (hardware / software) from the SX-KEY and PDB using a resonator at 4 MHz. This doesn't make sense and it sounds like others have issues too with this.

    Everything works normally except for this "Running" condition when starting up under the default conditions - changed nothing for SX DEBUG.

    Please help.

    Thanks,

    Timothy Gilmore
  • BeanBean Posts: 8,129
    edited 2005-12-05 12:36
    Tim,
    Post the program.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    Those that would give up freedom for security will have neither.
    ·
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-05 12:42
    Bean,

    ANY SX program causes this "Running" effect -·even ones written by Parallax so it is not code related. It is either a defective SK-KEY (but it works otherwise) or something in the version of the SX Key debugger. It sounds like other people are seeing this too and ignoring it or just not using it because of this issue.

    Tim
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-12-05 14:22
    Please keep in mind that these forums are provided as a service to our customers so that they may exchange ideas with each other. If you feel there is an error in our software, please send a detailed message to support@parallax.com or call 888-512-1024.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-05 14:25
    I will try and give Technical Support a call tonight after work.

    Thanks for the good work Jon.

    Timothy Gilmore
  • PJMontyPJMonty Posts: 983
    edited 2005-12-05 19:25
    Tim,

    I have found that if the chip has a different program in it than the one being debugged, then you get the ghosting effect. Are you using "Debug Again" or "Debug" to start the debugging process? If you're using "Debug Again", then you may simply have the wrong program ing the chip.
      Thanks, PeterM
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-05 19:28
    I am using the standard (spider) debug icon and get the result everytime (same as the Debug Again).

    Thanks,

    Timothy Gilmore
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-18 16:27
    After I have read through all of the Parallax SX manuals being "SX-Key/Blitz Development System Manual v2.0", "Exploring the SX Microcontroller with Assembly and BASIC Programming v3.0" and "Programming the SX Microcontroller - A complete guide by Gunther Daubach" and after speaking with Parallax technical support on the phone, I am still at a loss on why SX Key v3.10 "Debug" is not working correctly for me.

    I have gone through a few examples from these manuals step by step and everytime I either have the DEBUG program indicating the program is "Running" or "Sleeping" but never "Idle" yet so that I can step through or walk through a program.

    I'm not sure where else to turn so I am coming back to the forum for mass help. I am not here to blame anyone other than to find out why "Debug" does not work for me.

    I have attached a couple of screenshots from an example program found in "Exploring the SX Microcontroller with Assembly and BASIC Programming v3.0" on page 52.

    ·One problem besides nevering able to get the program to start in "Idle" is that when I change the "Freq" command from 500 KHZ (which creates a "Running" status not "Idle") to 50 MHz, it changes from "Running" to "Sleeping". I have also attached the program for someone to try. I do not have any resonators plugged into my Professional Development Board either.

    Any help would be greatly appreciated.

    Thanks,

    Timothy Gilmore
    1024 x 768 - 151K
    1024 x 768 - 156K
  • RsadeikaRsadeika Posts: 3,837
    edited 2005-12-18 19:16
    Timothy,

    I just tried your example on my SX28 Tech board, it works for me. I can do a Step, Walk, and Run. The only thing that I can suggest is double check to make sure that the code that you posted is the same code that you are using. I went through that delema in one of my other threads. The other thing is make sure that you do not have an external resonator plugged in, sometimes that causes a problem. I know alot of times I plug the resonator in, and then forget to unplug it, do things to the code to make it better, and it just gets worse.

    Ray
  • pjvpjv Posts: 1,903
    edited 2005-12-18 21:25
    Hi Tim;

    I think you are correct, there appears to be a problem in the IDE, and I am able to cause my set-up to get some results similar (not identical) to what you are experiencing, and I'm already a ways down the path of tracking down the circumstances that cause it.

    To help me, could you please test and confirm BOTH of my following scenarios:

    Your "Run/Sleep" situation on debug occurs when:

    1. You start the debugger by pressing the "debug" spider icon (the left one on the screen) ...... yes/no

    2. You start the debugger by pressing the "debug again" spider icon (the one to the right of the "debug" icon) ...... yes/no

    I'm trying to follow exactly what you are doing, and see how that resembles the circumstance where I can make it fail.

    Cheers,

    Peter (pjv)
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-18 22:16
    To answer your questions:

    1. YES - started it by pressing the Debug spider icon

    2. NO - As stated above. If I press Debug again (right icon) - it quickly displays what was in the memory of the debuging key.

    I don't understand this and almost wondering if the "Key" is bad. It works fine for allowing firmware uploads to the SX28.

    I am also not using an external resonator but I have in the past not knowing not to use it till now.

    Let me know what you find.

    Thanks,

    Timothy Gilmore
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2005-12-18 22:37
    I don't have any SX products, but from the forums I recall reading that on some SX boards, the layout prevents you from using the SX-Key and an external resonator simultaneously. If your board allowed you to use both, is it possible that something was inadvertently damaged?
  • RsadeikaRsadeika Posts: 3,837
    edited 2005-12-18 22:44
    Timothy,

    I tried your program again, the best that I could do is to get it into Running, is when I change the freq from 500_000 to 50_000_000 and hit debug again or debug reenter. It is especially troublesome when you make the freq change from 500_000 to 50_000_000. I tried 700_000 same thing ocurred. So, at least on my SX Tech board when I do a change and then a debug reenter or·debug again thats when it starts up in Running. I remember somebody mentioning, in another thread, about a possible problem with this sequence,·using the debug again or debug reenter after a change is made.

    Ray
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-18 22:52
    One other thing to mention that hasn't been stated in a while. This "Running" condition which means the Debuger never starts in "Idle", happens with any and all programs entered. It doesn't matter what the frequency is or any program parameter.
  • pjvpjv Posts: 1,903
    edited 2005-12-18 23:16
    Hi Tim;

    Perhaps I'm not on quite the right track as I can't exactly reproduce your results; mine works fine as long as I reprogram the SX with the debug code; that is, via "DEBUG".

    Could you please do exactly the following ;

    1. Load your SX source program.

    2. Re-program the SX by means of the "DEBUG" (left) icon.

    3. Confirm that the unit has entered the "RUNNING" or "SLEEPING" states, please note which one.

    4. "QUIT" the debugger.

    5. At the topleft of the IDE screen press the "RUN" button follwed by the "DEVICE" (ctrl-L) button.

    6. On the pop-up "DEVICE" screen, note all active selections as well as any "grayed-out" selections.

    7. Use the meory area slider to zoom down to the bottom end of memory and note if there is code located from $777 onward through $FFF.

    8. Press the "READ" button to read the current contents of the SX memory.

    9. Re-note all active selections and grey-outs as per 6. above.

    10. Reconfirm the presence of code from locations $777 through $FFF as per 7. above.

    11. Please report your findings for 3., 6., 7., 9., and 10.

    You say this problem shows up on a standard Prof. Dev. board?

    Hopefully we can get to the bottom of this.

    Cheers,

    Peter (pjv)

    Post Edited (pjv) : 12/18/2005 11:20:27 PM GMT
  • RsadeikaRsadeika Posts: 3,837
    edited 2005-12-18 23:29
    Timothy,

    I just tried your program on my·SX52 proto board, same thing occurs as to what was described earlier by me. The only other thing that I can throw into the mix is that any change to the program, and the use of debug reenter or debug again works to put it·into a Running state.

    At least now I know, with my stuff, I have to be aware of when to use debug and debug reenter.

    Ray
  • RsadeikaRsadeika Posts: 3,837
    edited 2005-12-18 23:48
    Timothy,

    Just curious, are running SX-key v. 3.1(R2)?

    Ray
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-18 23:55
    Peter,

    1. Load your SX source program.

    OK

    2. Re-program the SX by means of the "DEBUG" (left) icon.

    OK

    3. Confirm that the unit has entered the "RUNNING" or "SLEEPING" states, please note which one.

    SLEEPING when using a Freq of 50_000_000

    4. "QUIT" the debugger.

    OK

    5. At the topleft of the IDE screen press the "RUN" button follwed by the "DEVICE" (ctrl-L) button.

    Pressed the RUN button (shortcut Ctrl-R) and then press the DEVICE (however·DEVICE has no shortcut - ctrl-L is for View List).
    See DEVICE.JPG screenshot

    6. On the pop-up "DEVICE" screen, note all active selections as well as any "grayed-out" selections.

    See DEVICE2.JPG screenshot

    7. Use the meory area slider to zoom down to the bottom end of memory and note if there is code located from $777 onward through $FFF.

    Nothing really there but $FFF except for 1 $A00 at the end.
    See DEVICE3.jpg and DEVICE3b.jpg screenshots

    8. Press the "READ" button to read the current contents of the SX memory.

    9. Re-note all active selections and grey-outs as per 6. above.

    Same as DEVICE3.jpg and DEVICE3b.jpg screenshots I believe.

    10. Reconfirm the presence of code from locations $777 through $FFF as per 7. above.

    I don't see the code??

    11. Please report your findings for 3., 6., 7., 9., and 10.

    You say this problem shows up on a standard Prof. Dev. board?

    Brand new professional development Board - Rev B.

    Hopefully we can get to the bottom of this.
    1024 x 768 - 113K
    1024 x 768 - 112K
    1024 x 768 - 112K
    1024 x 768 - 112K
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-18 23:59
    Ray,

    See the screenshot.

    The about screen says 3.10 but I don't know what you mean by R2.

    Thanks,

    Timothy Gilmore
    1024 x 768 - 86K
  • pjvpjv Posts: 1,903
    edited 2005-12-19 02:21
    Hi Tim;

    Tim, could you repeat those tests, but not how you interpreted step 5. Also add step7.1 and 10.1

    The screen shots are very helpful, thanks

    Could you please do exactly the following ;

    1. Load your SX source program.

    2. Re-program the SX by means of the "DEBUG" (left) icon.

    3. Confirm that the unit has entered the "RUNNING" or "SLEEPING" states, please note which one.

    4. "QUIT" the debugger.

    5. At the topleft of the IDE screen press the "RUN" button which then will open a pop-up.

    5.1 From the bottom section of the pop-up press the "DEVICE" (ctrl-L) button, this launches the DEVICE screen.

    6. On the pop-up "DEVICE" screen, note all active selections as well as any "grayed-out" selections.

    7. Use the meory area slider to zoom down to the bottom end of memory and note if there is code located from $777 onward through $FFF.

    7.1 Note if any areas in the window are now grayed out after moving the memory slider.

    8. Press the "READ" button to read the current contents of the SX memory.

    9. Re-note all active selections and grey-outs as per 6. above.

    10. Reconfirm the presence of code from locations $777 through $FFF as per 7. above.

    10.1 Re-note if any areas in the window are now grayed out after moving the memory slider.

    11. Please report your findings for 3., 6., 7., 7.1, 9., 10. and 10.1

    Hopefully we can get to the bottom of this, but so far I'm just on track of a similar problem....possibly not related.

    Cheers,

    Peter (pjv)
  • Michael ChadwickMichael Chadwick Posts: 80
    edited 2005-12-19 05:09
    I haven't tried the program, don't have my setup at home, but is it possibly related to the DEVICE setting being SX281(one) or SX28l (L), instead of just SX28?
Sign In or Register to comment.