View previous topic :: View next topic |
Author |
Message |
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
Target not protected - Even after protection fuse used. |
Posted: Thu Feb 26, 2015 1:27 am |
|
|
Hi all,
I am hoping someone can help me.
Compiler Version: 5.042
CCSLoad Version: 5.010
I am programming 16F887 with the following fuses:
Code: |
#FUSES NOFCMEN
#FUSES NOIESO
#FUSES NOWDT
#FUSES HS
#FUSES BROWNOUT
#FUSES BORV40
#FUSES NOLVP
#FUSES MCLR
#FUSES PROTECT
#FUSES PUT
|
After programming i still keep getting - Target not protected.
I have used the #FUSE PROTECT.
Thanks and Regards,
Jay
Last edited by jaikumar on Thu Feb 26, 2015 1:33 am; edited 1 time in total |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Thu Feb 26, 2015 1:33 am |
|
|
Also tried adding the fuse below:
Still getting code not protected |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Feb 26, 2015 1:39 am |
|
|
1. Look at the fuses at the end of your .LST file. What do they show ?
Post them.
2. Are you compiling with your IDE set for Debug mode, or Release mode ? |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Thu Feb 26, 2015 1:48 am |
|
|
Here is listing from List File:
Code: |
Configuration Fuses:
Word 1: 2322 HS NOWDT PUT MCLR PROTECT CPD BROWNOUT NOIESO NOFCMEN NOLVP NODEBUG
Word 2: 39FF BORV40 WRT_1000
|
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19529
|
|
Posted: Thu Feb 26, 2015 2:49 am |
|
|
Well, the protect fuse is there in what the compiler is sending to the programmer.
Take us through your exact configuration. You are coding in the IDE or the command line, or through MPLAB?. Then you are writing the code to the chip directly with CCSLoad?. What is the actual programmer?.
One thought. In CCSLoad, top right corner of the screen (on current versions), column labelled 'options'. You have got the 'config bits' tab ticked?. Otherwise the fuses won't be written, so the protection won't be set.... |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Thu Feb 26, 2015 5:04 am |
|
|
I use Mach-X to program the 40 pin 16F887
I use the CCS editor to edit and compile the code
And then the ccs load loads the program after i compile.
In the options the Config bits is ticked. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19529
|
|
Posted: Thu Feb 26, 2015 8:08 am |
|
|
Do the simplest test.
Load the file into CCSLoad.
Select the 'file' option from the top bar.
Select the 'configuration/ID' window from the selectors on the right of the window.
Scroll down this.
What does the tick box 'Code protected from reads' show?.
What does the tick box 'Data EEPROM code protected' show?.
If both of these are selected (they are in the fuses you post), then the problem is in the programmer.
One other programmer setting affects this. If you click on the expand button for the options, make sure the erase mode is set to 'bulk erase chip before programming', and the tick box 'verify ROM protect after write' is set.
If it still doesn't work, you need to talk to CCS. |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Thu Feb 26, 2015 11:29 pm |
|
|
Dear Ttelmah,
I have tried all the suggestions that you have advised.
Still it does not work.
I think i have faced this problem before and at that time
i found that if i use older ccsload program say version 4.010 or something it
worked ok.
unfortunately i cleaned up computer and don't have any older version of
ccsload.
Only thing is i don't know why although this error remains nobody has intimated CCS or wonder why they have not fixed it.
I think not many use MACH-X programmer.
Regards,
Jay
Last edited by jaikumar on Fri Feb 27, 2015 12:10 am; edited 1 time in total |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Thu Feb 26, 2015 11:33 pm |
|
|
Good News. When i try to program the PIC12F675 with the code protect
fuse. It works OK.
So i will email CCS about this problem.
Thanks all. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19529
|
|
Posted: Fri Feb 27, 2015 8:56 am |
|
|
While they should fix it, it is worth asking why you want protection on this?. The Mach-X, is a development programmer, not a production device, and protection should never be enabled during development (just wastes life cycles of the chip). While a lot of my production code is protected, I can't even think of when I last turned protection 'on' during development.... |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Sat Feb 28, 2015 12:55 am |
|
|
Well I have a very small company. Where i program about 30 micros per month for production and the Mach-X suits me just fine. |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Sat Mar 14, 2015 4:47 am |
|
|
From CCS
Quote: |
The problem you reported has been fixed and will be in the
next compiler release.
|
Hopefully other in the same boat can be happy that it will be fixed. |
|
|
|