|
|
View previous topic :: View next topic |
Author |
Message |
uslimey
Joined: 27 Aug 2011 Posts: 22 Location: Baltimore, MD
|
U80 Works when Programming, Glitchy when Debugging |
Posted: Mon Apr 08, 2019 2:34 pm |
|
|
I am having a problem with the U80 when debugging... When you press GO the first time, the IDE says the app is running, but nothing happens... You hit PAUSE and the STACK reports an address outside the code area of 0XFFFFFF. You hit GO again and the app starts to run... Then, randomly, the app stops, despite the debugger reporting that it is still running... You hit PAUSE, and it shows the same erroneous STACK address, then GO again and it continues where it left off.
To see what's happening, I have my app outputting an incrementing number to the serial port at one second intervals. When it stops and I hit PAUSE and GO again, the number continues to increment as if nothing had happened. In other words acts as if it were paused by the debugger, as opposed to being reset by the watchdog or whatever...
Interestingly, if I run without the debugger (i.e. via the ICD program) it doesn't miss a beat, despite the U80 being connected to the target. As such, it would appear that the U80 running in debugger mode is pausing my App erroneously, which makes debugging difficult.
I have HW version 1 for U80 with the latest firmware, the ICD Software version is 5.055. The PCWH compiler and IDE are version 5.084. My target is a PIC16F723A. The cable between the programmer and the target is about 12" long. All ICSD pins are buffered with 120 Ohm series resistors. The MCLR VPP pin is pulled to VCC via a 10K resistor.
I have not had problems like this in the past. The one thing that is different in this instance (compared to past projects) is that the RB6/ICSPCLK pin is being used as an output on my target. This makes me wonder whether my app toggling RB6 is affecting the U80 in some way... Perhaps the U80 is failing to tristate the pin before running the app?.. Maybe the U80 is rebooting?
Any thoughts? |
|
|
uslimey
Joined: 27 Aug 2011 Posts: 22 Location: Baltimore, MD
|
Update: |
Posted: Mon Apr 08, 2019 4:57 pm |
|
|
I tried changing the MCLR resistor to 5K - it made no difference. I also tried disabling the code that uses RB6, and again, no difference...
Thinking back, the last project I debugged I used a U64... Since then I have only been programming boards with bootloaders, and making minor app code changes...
It seems like the U80 is somewhat buggy... Or maybe I have a bad one...
Another thing I noticed, which may or may not be relevant, is that after programming the clock reports back at 8Mhz even though its a 16Mhz clock... Once you pause however, it reports back as 16Mhz as expected...
------------
Ok, so I also noticed that when it runs in debugger RB6 is always held low regardless of how the IO pin is set. I recall see the same thing last year when I debugged an early version of this board with the older programmer... The older programmer worked though...
Last edited by uslimey on Mon Apr 08, 2019 5:47 pm; edited 1 time in total |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1909
|
|
Posted: Mon Apr 08, 2019 5:16 pm |
|
|
I've never had anything but heartache when I've tried to use a U80. |
|
|
uslimey
Joined: 27 Aug 2011 Posts: 22 Location: Baltimore, MD
|
U80 UPDATE |
Posted: Mon Apr 15, 2019 5:17 pm |
|
|
So tech support said that I need a programmer cable shorter than 12", no resistance in series with the ICD pins, and a 47K pull up resistor on MCLR. They said that the debugger is continuously communicating with the PIC during debugging --- I am not sure if that is 100% correct, but I will give them the benefit of the doubt...
Anyway, I did everything they requested - my programming cable is 10" I have zero ohm jumpers on the ICD lines and a 47K pullup on the MCLR pin... The target still won't start the first time you press GO... The have to PAUSE and go again... Then the target stops randomly, and hitting PAUSE and GO causes it to continue where it left off...
What's with the U80... I wish I still had my old programmer... This one seems so glitchy in comparison. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|