RANT mode ON --- Fuse bits suck!

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

Just wanted to vent for a second. Why is it that we have to deal with these god-forsaken fuse bits. One wrong click and poof! Can't program it anymore. Yeah yeah yeah, I can hook up a function generator to the crystal and get things recovered but what a pain in the a$$.

This is the only processor I've worked with that had such non-sense.

ok... RANT mode OFF.

flame away if you wish.

Go electric!
Happy electric car owner / builder

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

"Doctor, doctor, it hurts when I do this!"

"Then don't do that anymore."

With other processors you do not get as many options with one part. [At least not that I'm aware of--anyone have info on any other product lines as configurable as AVRs?] One can get a single Mega8 or Mega88 part (for example), and apply it in many, many different combinations of clock source, brown-out, programming method, watchdog, and locking.

It is your choice how >>you<< choose to program the fuses. Yes, especially on a new model (to us) we take some care in getting a correct set of fuse bits. AVRStudio, for all its warts, has an excellent "menu" system that not only lets you select the combinations by function, but gives the fuse names and values on the same line. A few pieces of paper (like the screen dump of your programmer of choice) and a pencil, set up the project for your programmer, and typically a 5-minute one-time job for each application.

Not only do you have all these choices, but they are all erasable not OTP--so the same chip can be metamorphosized into one quite different. Not only that, but each chip is delivered in a configuration where it is workable in nearly all apps for ISP, regardless of final clock, brown-out, ISP, watchdog, lock, etc. selections.

There are like a dozen or so meaningful fuse choices for current-generation AVRs, depending on the model. There are just as many significant choices in wiring up a new AVR like a Mega64. There must be proper choices made for each, or the chip won't work or can't be programmed or will release the magic smoke. Couldn't I rant about hooking up all Vcc & Gnd for best operation? Hooking up AVcc to drive the ADC port? Having a proper reset circuit for ISP? Etc. If one examines each signal hookup, a good reason can be thought of for why it was done that way. The exact same thing can be done for each set of allowable fuse combinations--they are offered to us to allow us to apply the chip in a particular way.

Your distributor will be happy to pre-program your production buys in any manner you desire, including fuse configurations.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Personally, I wish they'd add a diode bridge and sense circuitry so that you could temporarily override the reset-disable fuse (and maybe a few others, like JTAG-enable) and restore RESET's functionality by simply connecting the power backwards. In other words, if you have a Tiny2313 whose RESET has been disabled for the sake of port E2, you could connect the power backwards, and pin 1 would go back to acting like reset until you either restored the normal polarity or reprogrammed the fuse bit.

There's no place like ~/

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

Or, on the example Tiny2313, consider SPM programming.

Or maybe ATMEL could override the RST with a 12v signal and you could design the circuit attached to RST so that it can withstand 12v. (Seems to me that's how it works.) 8) In most cases, this involves adding one diode to your circuit.

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

Is it possible to reprogram the RESTDISBL fuse via SPM?!?

I thought that was half the problem... once a fuse like RESTDISBL is set, there's no easy way to clear it without buying an STK500 to do high-voltage programming. If RESTDISBL could be cleared via SPM, it would be trivially easy to leave an "escape hatch" in the RESET vector that checks for some combo of i/o pins connected together or shorted to ground that normally wouldn't occur at powerup and clear the fuse via software. Then, to re-enable ISP/SPI programming, you'd just have to remove power, short out the desired pins, and power up so the backdoor could detect the condition and re-enable RESET for you.

I still think the diode bridge + detection to temporarily re-enable RESET and JTAG is the most user-friendly and transparent. Though something equally low-tech, cheap, and accessible (from the user perspective), like simply requiring the connection of a 9v battery across VCC and RESET for 1 second, or allowing the fueses to be changed via SPM, would both be improvements over the current situation as well.

There's no place like ~/

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

I have cursed the fuse bits as well. Running afoul of the CKOPT bit and its confusing (no pun intended) documentation had me tearing hair out. As for killing the clock, I got so pissed that I built the Wand of Ressurection. It is a case from a continuity tester with its guts removed and an oscillator installed in it. I threw in a TINY13 blinking 6 leds randomly just to be silly.

Tim Ressel
Portland, OR
timr@earthling.net

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

I share your pain.
Though it may lack practical merit, some sort of simple but foolpoof recovery scheme, short of pulling the chip and putting it into a programmer would be welcomed.

Now, would possible market and profit advantage likely outweigh the cost of implimention and the potential hazards from unforseen consequences of having this circuit? Probably not.

--
"Why am I so soft in the middle when the rest of my life is so hard?"
-Paul Simon

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

Quote:

Now, would possible market and profit advantage likely outweigh the cost of implimention and the potential hazards from unforseen consequences of having this circuit? Probably not.

That's exactly it, and I agree with Atmel here.

Fuse bit problems are only going to be on prototypes... anything that went in the field won't have that problem since you perfected it. However - if there was a way to "undo" fuse bits, it COULD be tripped in the field (power surge, etc) which would result in potentially considerably more expense to fix.

Sometimes you've just gotta accept that you will break things when learning. Or at least when I say that I don't feel so bad every time I do ;-)

Regards,

-Colin