|
|
View previous topic :: View next topic |
Author |
Message |
blak3r
Joined: 11 Jan 2004 Posts: 45
|
cause of error: "... target was not halted after reset |
Posted: Sun Jan 11, 2004 7:55 pm |
|
|
Hello,
PIC: PIC16F877
ICD: ICD-S20
Compiler Version: 3.170 educational limited version
I've been running into some problems when i using the debugger integrated into the CCS IDE to program my PIC. If i don't remove power from my board before trying to reprogram the pic i get the following error.
"Could not start target: The target was not halted after reset. Check the target oscillator and MCLR."
I can get my code to load if i turn off the power to my circuit then turn it back on and then recompile. Pressing the reset button for the PIC doesn't fix the problem. I believe that closing the IDE and restarting fixes the problem as well.
Causes i've ruled out:
I get the same error on the circuit i designed as well as the protoboard that came with my compiler. So i don't think it's a hardware issue.
When i load the example files and other basic files i don't have the problem at all. So, it's a problem with my source code.
My code uses an ADC, LCD, mixes assembly, prints to the DEBUG window using printf.
I've run into some weird problems with the compiler where my lcd only works if i have the include file for the lcd before an include for any other device. And i think this might be another one of those weird compiler problems.
I tried commenting out sections of my code for a while with no luck so i thought i'd ask before i completely disected the code.
Thanks
~blake
[/u] |
|
|
chava
Joined: 07 Sep 2003 Posts: 56
|
some sugestions |
Posted: Mon Jan 12, 2004 1:37 am |
|
|
Hi,
I belive that you did, but, any way: check if all configuration bits are correct, check portb pool-up, oscilator frequency, and ICD itself: mybe the connection between the icd to you target board is somehow problematic...
check you assmbly code - maybe the pic enters an endles loop
be sure to halt and reset the target before any action you take
le me know how you did
jukingh@zahav.net.il |
|
|
Guest
|
hmm... |
Posted: Mon Jan 12, 2004 2:23 am |
|
|
config bits = HS, NOLVP, NOWDT, NOPROTECT
and i'm using a 20Mhz ceramic resonator
It's not a hardware problem since i can run the example problems properly on the board i made and if i put the code i wrote on a protoboard that came with the compiler i get the same compiler error.
I do have portb_pullups(false)... and i just tried setting it to true and it didn't make a difference. How could pullups affect it from programming?
Assembly code has no problems and the rest of my code behaves as it's supposed to... it's just annoying having to turn off the board each time.
What do you mean by halt and reset the target before any action?
Thanks,
~blake |
|
|
|
|
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
|