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.

Erasing the Programming of Locked Atmega ...

Status
Not open for further replies.
Re: atmega fuse recovery

Hi dear
It works for me. Thanks for useful guide.

Regards
Arash
 

...snip...If not, then you need a parallel programmer or fuse repair programmer like the ones in the links I posted above.

Worked for me! Atmega8 repaired with floppy and parallel scheme posted above.

So I wanna thank ctownsend for this simple solution. :smile:
 

Hi to Everyone,

I am Charlze and I am new in Microcontroller programming.

My Problem is this, I am using an ATMEGA16A chip and have written a code in it and the application is already working.

I am using a JTAGICE 3, AVR Studio 6, Windows XP SP3.

I tried locking the device so that the code cannot be read.

I disabled the SPIEN and the JTAGEN.

I also set LB2 and LB1 to 0 to protect the code, and now the device is fully protected and I cannot read the code or modify it.

What my supervisor wants is, he wants to protect the code from reading and if updating of the code needs to be done,
he can erase the data in the chip and reset the lock and fuse bits and inject the new code in the microcontroller.

Please give me insights on how to do this. what fuse bits should be set to 1 and 0, and what lock bit mode should be used.

Thanks in advance.
 

Both LB mode 2 and 3 can achieve that.
The modes are listed in the datasheet page 259

- - - Updated - - -

I also set LB2 and LB1 to 0 to protect the code

This is LB mode 3 and does what you want
 

Both LB mode 2 and 3 can achieve that.
The modes are listed in the datasheet page 259

- - - Updated - - -



This is LB mode 3 and does what you want

Thank you very much for the prompt reply. I will read and understand the datasheet and post if what happens. Thanks again.

- - - Updated - - -

Both LB mode 2 and 3 can achieve that.
The modes are listed in the datasheet page 259

- - - Updated - - -

This is LB mode 3 and does what you want

Hello Sir Alexan,

I read the datasheet and I performed some operations as seen in the screen shots the I have attached.

I encounter an error.

What should be wrong that I am doing?





Thanks

- - - Updated - - -

Thank you very much for the prompt reply. I will read and understand the datasheet and post if what happens. Thanks again.

- - - Updated - - -



Hello Sir Alexan,

I read the datasheet and I performed some operations as seen in the screen shots the I have attached.

I encounter an error.

What should be wrong that I am doing?





Thanks

----update---
Fuse bit settings image
 

I'm not sure what error you are getting.
You can't apply the the security setting?
 

I'm not sure what error you are getting.
You can't apply the the security setting?

Dear Sir Alexan,

We had already figured it out. The error appears when we tried to debug the code when the chip is already locked.

However, we now have the problem that even if we lock the chip and connect the project to the JTAGICE 3 and go the Device programming>memories tab> and read the flash , we are able to read it.

Thanks
 

I don't think that you are able to debug while the device is locked , it wouldn't make sense.

When you have the lockbits set then you can still do a read flash operation but what you get is garbage and not the actual flash content .
You can easily check this with a CRC check of the original HEX and the one you read back.

Alex
 

I don't think that you are able to debug while the device is locked , it wouldn't make sense.

When you have the lockbits set then you can still do a read flash operation but what you get is garbage and not the actual flash content .
You can easily check this with a CRC check of the original HEX and the one you read back.

Alex

Thanks for your help. This is what I am telling my boss. I will try to explain to him this information.
 

Hello sir, i am facing a problem in programming atmega 2560. i used extreme burner 1.3 to set the fuse bytes. when i read the fuse byte initially lfuse was 62and hfuse was 99.. after that i wrote lfuse as F4 and hfuse as D9.. aftr writing the fuse bits i am unable to read or write the Microcontroller.. please help me how to change the fuse bits again .. i am using 14 Mhz external clock..
 


Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top