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

ICD-S40 problem...software dependent

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cseusy



Joined: 15 Apr 2006
Posts: 12

View user's profile Send private message

ICD-S40 problem...software dependent
PostPosted: Sat Apr 15, 2006 1:26 pm     Reply with quote

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. Confused

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! Rolling Eyes

Thanks for your help!!

cj
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Sat Apr 15, 2006 2:18 pm     Reply with quote

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
cseusy



Joined: 15 Apr 2006
Posts: 12

View user's profile Send private message

ICD-S40 problem...software dependent
PostPosted: Sat Apr 15, 2006 4:58 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion 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