Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Regarding code protection in AVR

Status
Not open for further replies.

bhaskar.blaze

Newbie level 3
Joined
Mar 31, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,314
My tools are,

MCU:ATMEGA8
Programmer:AVRISP2
Compilers:AVR studio-4 to read and program the flash and WinAVR Programmers Notepad for writing the code and compiling.

I would like to protect my code against reading hex file from the chip and there should be provision for reprogramming the chip.I have programmed the lock bits (I have selected Application protection mode3 :LPM and SPM is prohibited in application section)after dumping the code,but still my code is readable from the IC(I have tested the functionality of this hex file after reading from the chip by reprogramming ).

I have tried in all possible four cases ,but still my code is readable.

Please Let me know how I can???
Waiting for your valuable information
 

If you check what you read back you'll see that it is junk, do a CRC check.
The lock doesn't prevent the read operation, it just returns invalid data.

The locks fuses can be cleared at any time but the chip has to be eraser first so the code will be erased
 

I have not done the CRC check but I have tested the functionality of the hex file after reading from the chip by reprogramming again,I found that this hex file is working well for the functionality (code running in the chip is locked before reading ).

- - - Updated - - -

Thank you for your reply,

I have not done the CRC check but I have checked the functionality of the hex file after reading from the locked chip and by reprogramming the chip,I found that this hex file is running well for the functionality.

How can I do CRC check??is there any possibility for protecting my code by CRC.
Regards,
Bhaskar

- - - Updated - - -

Thank you for your reply,

I have not done the CRC check but I have checked the functionality of the hex file after reading from the locked chip and by reprogramming the chip,I found that this hex file is running well for the functionality.

How can I do CRC check??is there any possibility for protecting my code by CRC.
Regards,
Bhaskar
 

You mean you have locked the chip ,read back the hex and then reprogrammed that to a chip and worked fine.
If so maybe the chip wasn't really locked, did you double check the fuses?
Are you sure that you have erased the chip and reprogrammed it?
Are you sure that you wrote the hex you read from the chip and not the original one?

I never heard for a similar issue so I strongly doubt it can happen.

CRC can't be used to protect your code, that is not it's purpose, CRC can just verify that the content of two files is identical or verify the integrity of a file.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top