cannot debug SX with USB SX-Key
![Larry Martin](https://forums.parallax.com/uploads/userpics/293/n31EPBE6W4EFV.jpg)
I am having trouble debugging an SX48 with the USB SX-Key and SX-Key v3.2 software. My board debugs ok with my one remaining serial SX-Key and SX-Key v2.02 PC software. The board will also take a Program (^P) from the USB SX-Key, but will not Debug with the new key and software. This happens on more than one board.
The USB SX-Key is rev 1, shipped in June 2008. It is on a USB 1.2 host controller. The system is HP Pavilion running XP Home SP2. I am using the latest FTDI drivers.
The USB SX-Key can program the board just fine, but when I try to debug, it fails after the software is loaded. I get a communication error dialog and the debug window says the processor is in "Sleep" mode. If I try to run anyway, I get more commo error dialogs with small decimal numbers (<512).
These are my switches:
Has anyone else encountered this problem and maybe know a workaround? It has not caused a crisis yet because I still have a serial Key. But eventually there will be issues.
Thanks,
Larry
The USB SX-Key is rev 1, shipped in June 2008. It is on a USB 1.2 host controller. The system is HP Pavilion running XP Home SP2. I am using the latest FTDI drivers.
The USB SX-Key can program the board just fine, but when I try to debug, it fails after the software is loaded. I get a communication error dialog and the debug window says the processor is in "Sleep" mode. If I try to run anyway, I get more commo error dialogs with small decimal numbers (<512).
These are my switches:
device SX48,OSCRC irc_cal IRC_SLOW freq 50_000_000 id 'IND RFID' reset reset_entry
Has anyone else encountered this problem and maybe know a workaround? It has not caused a crisis yet because I still have a serial Key. But eventually there will be issues.
Thanks,
Larry
Comments
The USB SX-Key is Rev A, not Rev 1
The first error dialog is "SX-Key not found on COM4"
The subsequent "Communication Failed" error dialogs pop up when I press "Reset". Run is grayed out.
Tested with SX-52.
you will need the latest SX-Key IDE version which is 3.2.92h BETA, available at www.parallax.com/Portals/0/Downloads/sw/sx/Setup-SX-Key-Editor-v3.2.92h-BETA.exe.zip. Former versions, like yours do not support the SX-Key USB.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Post Edited (bassmaster) : 9/11/2008 12:00:53 AM GMT
I will try 92h tomorrow, though I see bassmaster has the same problem I do.
Thanks,
Larry
the error message "SX-Key not found..." indicates that the IDE could not establish communication with the SX-Key USB. To "let the IDE know" which type of SX-Key is connected (serial or USB), the types send different answers to the IDE. Former versions of the IDE "don't know" about the SX-Key USB, so when they see the answer from an SX-Key USB, they simply assume that this did not come from an SX-Key, and report that they could not find one.
The blue LED on the SX-Key USB indicates an active communication with the IDE when it is lit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Now, I no longer get the "SX-Key Not Found" message after the code is loaded for debug. However, the SX48 is not in a good state, either. The Debug window says "Running" and all the debug buttons except "Reset" are grayed out. It looks like a program with a breakpoint is running. Problem is, my program has no breakpoint, and it's not running. The version banner does not come out the programmed serial port, LEDs do not come on (=> output pins are tristated). The Reset button has no effect.
I have verified that both 3.2 from CD and 3.2.92h Beta work well with my serial SX-Key, both with my design board and a 2005-vintage SX 48/52 Proto Board from Parallax (SX52 BD). The USB SX-Key fails as described on the Parallax Proto Board.
A screen shot and Portmon log are at http://gluelogix.com/parallax/
Post Edited (Larry Martin) : 9/9/2008 9:48:31 PM GMT
Larry
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A saint-like quantity of patience is a help, if this is unavailable, a salty vocabulary works nearly as well." - A. S. Weaver
(1) The 4 pin connector on my SX key was dirty or had a poor connection.
(2)·The Power·switch on my PDB will show the power is on, but it will only let the SX-Key or Blitz program an SX about 1 out of·6 tries (figure that one out).
Cleaning the connector worked, but not with the switch.
Sean
Prompted by Bassmaster's link, I 'scoped my OSC pin. When the system is in its bad state, there is a 3.8 MHz square wave on that pin. It should be 50 MHz. And I tried changing the brownout setting from Off to 2.2V. No joy.
The PC does seem to be communicating with the USB SX-Key - when I click Reset, the clock stops for around 50 mS, actually spiking to 12V for 1 mS. But it comes back to 3.8 MHz, and the Run buttons are all grayed out.
I sent an RMA request to sales@parallax.com. We'll see what happens.
It seems the consensus is that if I buy another/newer one everything "should" be ok. For $50, maybe I should do that and keep this one as an expensive SX-Blitz.
Sean
Ok I've read all you guys had to say about the "No Debug" issue, and I'm having the exact same issue with the SX28. The IDE (or whatever) states that the chip is "Running" when it should be "Idle". It will change to "Sleeping" when I unplug power, and the blue light is On the whole time. I've tried all the above debugs, I've tried different chips and boards. I have no external osc's and no Breaks and no Brownouts and all that jazz.
Reading all about it seems the only resolve is RMA.....Say it ain't so! Is there anything else I might be doing wrong? Are there any other fixes? And what IS the issue here? Any help is appreciated....it's time to take a break for now!
I have been able to run the Led28.src as directed by the quickstart in the SX-Key Development System Manual but cannot debug it without the Debug window remaining in "Sleeping" mode (greyed out buttons). When this happens, the blue led is lit on the USB SX-Key. I have also attempted to follow the first tutorial in Programming the SX Microcontroller with similar problems. Some times I get an "Chip connection failed" error others I am able to initiate the Debugger and after the first step the Debug window is placed in the "sleeping" mode. In either case there is no resonator or crystal in the resonator socket.
Any suggestions would be much appreciated.
The SX-Blitz doesn't debug. It just programs and verifies. To debug, you need an SX-Key. In the Parallax store, the webpage for the SX-Blitz...
www.parallax.com/Store/Microcontrollers/SXTools/tabid/139/CategoryID/16/List/0/SortField/0/Level/a/ProductID/368/Default.aspx
...says this about the SX-Blitz:
Unlike the SX-Key however, it does not provide in-circuit source-level debugging capabilities.
Thanks,
PeterM
Thanks for any help - next step suggestions.
Your suggestion of setting the clock to 20_000_000 has worked for me as well.
Let me know if I can help to find the source of the problem - but please understand that I am new to working on microcontrollers!
With the serial version I could plug an SX28 dip into a breadboard and run wires to a 4 pin header to connect the SX-Key. But that doesn't work with the USB version. I think it will program, but it won't debug.
If I bend the OSCx leads out so they don't go into the breadboard and plug the Key directly into them (and add wire for GND into the Key). Then it works fine.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
www.iElectronicDesigns.com
·