![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
cseusy
Joined: 15 Apr 2006 Posts: 12
|
ICD-S40 problem...software dependent |
Posted: Sat Apr 15, 2006 1:26 pm |
|
|
I was unable to get my firmware to work in debug mode. The error message after loading was either "Invalid clock value from the debugger. Debugging may not have been enabled." or "Could not start target. Target was not halted after reset. Check target oscillator and MCLR." Of course I tried every combination of fuses and icd=true to no avail. I checked the oscillator and MCLR and they were fine. After ordering a new ICD-S40, I later found that it was dependent upon the firmware. Some firmware programs would work in debug mode and some would not. When the new ICD arrived this morning I found I still had the problem, still firmware dependent. The same problem occurs on another target board.
I'm using a PIC16F88.
Has anyone seen this? It seems that it must be in my code. But I'm using the same fuse and uC configuration in this code that I have used in other code that works. I've written a lot of programs and thought I knew what I was doing...apparently not!
Thanks for your help!!
cj |
|
![](templates/subSilver/images/spacer.gif) |
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Sat Apr 15, 2006 2:18 pm |
|
|
Unfortunately I never get these mssges at the same time.
According to my experience I guess you have 2 different problems or something like.
"Could not start target. Target was not halted after reset"
Mostly the cause of this problem using ICD was regarding bad connections,
re-check and be sure that MCLR, CLK, Data, VDD and VSS are short connections
and connected firmly and there is no other circuitry on CLK and Data and a 47K pull up
on MCLR is present (with no capacitor).
Be sure also that B6, B7 are dedicated to ICD only.
"Invalid clock value from the debugger. Debugging may not have been enabled"
This problem seems to be bad target clock (while in Program Mode the ICD doesn't use
the target clock, but when in Debug Mode it does).
Re-check the fuses, bad clock fuse or any other fuse that doesn't match the target
clock will generate this error mssge. Some users got running the ICD after changed
PUT for NOPUT, I never did.
Humberto |
|
![](templates/subSilver/images/spacer.gif) |
cseusy
Joined: 15 Apr 2006 Posts: 12
|
ICD-S40 problem...software dependent |
Posted: Sat Apr 15, 2006 4:58 pm |
|
|
Humberto, you are a GENIUS! You really saved my bacon on this project.
Most of the things you suggested are the same as they have been in this project for several code sets that use the same target PCB (fuses, pullups, etc.). You said, "Be sure also that B6, B7 are dedicated to ICD only." Well, many functions share each port but I have managed them correctly in the past. However, on later prototypes I severed a trace to disconnect B6 from B1, then set the TRIS bit low on B1 so it didn't float. However, now I am working on an older prototype where the trace is not severed. It programs OK because all outputs float during programming, but during debug mode, B1 was holding B6/PGC low. Hence the message, "Invalid clock value from the debugger. Debugging may not have been enabled" Nothing is wrong with the clock as other code runs fine on this board, that is code that sets TRIS B1 high. The only thing that changed to make the code not work on the two boards I am using now is that stinking B1 TRIS bit.
You said, "(while in Program Mode the ICD doesn't use
the target clock, but when in Debug Mode it does)" which was my second clue as to what was happening.
It's always safest to assume the problem is with the programmer, no?
Thanks again!
CJ |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|