|
|
View previous topic :: View next topic |
Author |
Message |
j_girl Guest
|
Verifying code protected data with the ICD |
Posted: Wed Aug 16, 2006 3:08 pm |
|
|
Hi,
I am using two micros, the PIC18F6722 and the PIC18F4550. I am trying to code protect them. I used #fuses PROTECT and verified in the .lst file that configuration word 5 shows PROTECT. When I compile it and download it with CCS's ICD it runs through writing the data and verifying. I would expect, if the code is truly code protected, that the ICD would not be able to verify the code. However, it says it successfully verifies the code. Is my code truly not code protected or is there something wrong with the ICD.
Thanks,
j_girl |
|
|
Guest
|
|
Posted: Wed Aug 16, 2006 3:37 pm |
|
|
I think I can take this one,
If I remeber right the code verify uses the hash of the block it reads. So it doesn't have access to the data, just the hash of whats in there. So it ca verify it, without having to read it.
I might be wrong, but I think I remember reading that somewhere |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Aug 16, 2006 5:53 pm |
|
|
I programmed a 16F877 with the PROTECT fuse enabled, with an ICD2
in MPLAB. It gives a progress report of the programming operations.
You can see that it programs the Program Memory first and then verifies
it. Then it does the Config Memory (and sets the PROTECT fuse) and
verifies that. There's no hashing involved. It just does things in the
proper sequence.
Quote: | Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x76)
Verifying...
...Program Memory
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
MPLAB ICD 2 Ready |
The sequence above happens when the PIC is programmed.
If I try to do a separate verify operation after the chip is programmed,
then MPLAB gives me an error message, as expected:
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x3000, Val Read = 0x0) |
|
|
j_girl Guest
|
|
Posted: Thu Aug 17, 2006 1:41 pm |
|
|
Thanks! |
|
|
|
|
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
|