avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Cannot program efuse


From: richard horia andrei antone
Subject: Re: [avrdude-dev] Cannot program efuse
Date: Mon, 15 Mar 2010 22:22:59 +0200

I'm working with 90pwm3b chip, and I can't change the efuse correctly.
For this particular chip, the efuse forces an output value on the PSC
outputs during reset, so it's quite an important setting if you care
about the magic smoke in your FETs.

Whatever i keep writing to efuse, it reads back as &= 0x01, triggering
safe mode. If i ask the programmer to fix it, it halts. -v -v shows an
infinite loop.
I am using windows xp sp 2, with avrdude: Version 5.10, compiled on
Jan 19 2010 at 10:45:23

My other box is a small form atom-based gentoo:
Linux heidrun 2.6.31-gentoo-r6izukernel/atompc/5 #8 SMP Thu Jan 28
05:00:47 EET 2010 i686 Intel(R) Atom(TM) CPU 330 @ 1.60GHz
GenuineIntel GNU/Linux
with avrdude: Version 5.8, compiled on Feb  8 2010 at 19:55:10 (custom compiled)

Programmers are a stk200 (plons style) and a tinyusb (ladyada style,
but hacked hex to pinswap for my needs). All combinations of
programmers and boxes exhibit the same problem.

After some more tinkering, I decided to check avrdude.conf. Here's
what i found: (line 9631 for 5.1, line 9546 for 5.8):

     memory "efuse"
         size            = 1;
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
                           "x x x x  x x x x  x x x x  x x x i";

         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
                           "x x x x  x x x x  o o o o  o o o o";

So what we're dealing with here is an enforced read mask &= 0x01.
Here's what i did:

     memory "efuse"
         size            = 1;
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
                           "x x x x  x x x x  i i i i  i i i i";

         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
                           "x x x x  x x x x  o o o o  o o o o";

And now programming the efuse works.
To be completely in spec, the fourth lsb bit (1 << 4) should be "x",
because the datasheets states it is not used (pg 278,
AT90PWM2/2b/3/3b, atmel document 4317H–AVR–12/06).

Antone Richard A.H.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]