CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

U80 Works when Programming, Glitchy when Debugging

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
uslimey



Joined: 27 Aug 2011
Posts: 22
Location: Baltimore, MD

View user's profile Send private message

U80 Works when Programming, Glitchy when Debugging
PostPosted: Mon Apr 08, 2019 2:34 pm     Reply with quote

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

View user's profile Send private message

Update:
PostPosted: Mon Apr 08, 2019 4:57 pm     Reply with quote

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: 1907

View user's profile Send private message

PostPosted: Mon Apr 08, 2019 5:16 pm     Reply with quote

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

View user's profile Send private message

U80 UPDATE
PostPosted: Mon Apr 15, 2019 5:17 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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