How to recover avr when fuse bits are programmed

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi (anyone) !

Unfortunately I have programmed my fuse in a way so I cant get contact with my ATMEGA16 via my ISP programmer using PonyProg.
By now I have locked 3 AVR's and i am out of samples.
I am not quite sure what I did wrong in PonyProg.

Is there a cheap way to unlock the chips (enable ISP) ?
Any cheap assembled parallel programmers.

Thanks in advance.

Morten

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you tried hanging a crystal and caps on the Xtal1/2 pins to see if you can talk to the M16?

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Kelly !

There are caps and xtal on my evaluation board allready (supplied by olimex).
Actually the whole application is written and tested on the target board so the it has been up and running

Morten

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Chances are you enabled "external oscillator". This is expecing a logic-level clock to appear on XTAL1. Find a source of a logic-level clock, and apply it to XTAL1 pin. Be from a frequency generator, or even another AVR chip (working one on a crystal)'s XTAL2 pin.

-Colin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Colin

Would applying external clock enable ISP (if not disabled by fuse).
At what frequency would the ISP operate ?

Read some documentation in the mean time. This seems to be a problem with ponyprog.

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Chances are you set the fuses to "external oscillator", which means it is not expecting a crystal. It is just expecting a logic-level clock, so the crystal doesn't oscillate, so you can't program it.

The ISP should operate from about 32KHz - (max AVR freq) if you have AVRISP or STK500, if you are using a parallel port programmer look for above 500 KHz.

-Colin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes,

This really does work, my atmega128 fell asleep after a late night mis-programming. I borrowed a circa-1960 function generator and jammed the signal at about 2.5V into XTAL1 and hit re-program fuses and it came back to life. The real question here is why does Atmel send the chips out programmed in a useless clock configuration so newbies have to go in and break them??

sam

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"...why does Atmel send the chips out programmed in a useless clock configuration ..."

Just the opposite--the chips are shipped in a configuration where no external clock is needed to program, verify, and run programs. A great aid to the newbie.

Lee

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you tryed the ERASE command in PoneyProg. This Feature erase memory and fuse bits (The SECURITY fuse bit too).
After that, you could rewrite flash memory.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

the problem is that I can not communicate with the AVR.
The ISP is down due to misprogramming of fuse bits.

Morten

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One, or both, of two things might have happened to your mega16.

1) you set the m16 to the wrong external clock source, and cannot communicate with the part anymore.

Solution: Apply a TTL clock source to the XTAL1 pin of the m16, and then reprogram the fuses of the AVR. (use a 32KHz clock for the STK500/AVRISP or 500KHz for a parallel port based programmer) You can obtain this signal from the XTAL1 jumper of the stk500. You will also need to set the speed down to 32KHz on the board tab of the STK500 dialog box. Higher speeds may work, but I found 32KHz to be the most reliable. Note: once the fuses have been corrected, you won't need the low speed clock, and can return to normal programming speed.

2) you managed to disable ISP programming in the fuses.

Solution: You MUST use parallel programming mode here to correct the fuses. If this is a DIP packaged AVR and you have an STK500 you have all the tools needed to do this, just be sure that your STK500 is powered with at least 12V. If it is a SMT chip you will need to make an adapter. Depending on the other circuitry on your board, you may also be able to do this recovery using a small adapter that makes contact to all the necessary pins on the AVR. Search the forum, I believe someone posted notes on this at one point.

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ATTENTION:Blatent Advertising has been removed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DRAPOLIS - go find a real job.

How much are you going to charge this guy to open his olimex board?

I'm guessing he could by a case lot of them or more for what you would charge just to unprogram his fuse bits with a standard erase.

Please note - this post may not present all information available on a subject.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got one-

Why not go crack a real chip?

Go spend some time trying to bust open the Infineon 66P with an active shield. Get through the shield and keep the chip alive and I'll buy you lunch and shake your hand.

Now I am not pushing Infineon cause really, I think the architecture sucks and they should have scraped it instead of building on it.

But this is one tough chip for an attacker.

Regards

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here You can find some cheap High voltage programmer to reprogram fuse bits:
http://elm-chan.org/works/avrx/report_e.html

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've done the same thing several times. I solved it by connecting switches to the data- and controlpins. If your search for something like manual programmer or my name you'll find my instructions for the mega8. Just check the connections and commands to make sure you get it right for your AVR.
But if you are going to lock a lot uC I recommend a real high voltage programmer...

Good luck!
Andreas

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sxpilot450 wrote:
I got one-
Why not go crack a real chip?
Go spend some time trying to bust open the Infineon 66P with an active shield. Get through the shield and keep the chip alive and I'll buy you lunch and shake your hand.
Now I am not pushing Infineon cause really, I think the architecture sucks and they should have scraped it instead of building on it.
But this is one tough chip for an attacker.

Active shields problem is resolved already. We can do probing of data bus under active shields. Tested on ST, Infieon smart cards.