Tiny10 lock bits errata

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

I have just been reading the ATTiny10 datasheet.
In the errata it states:

Quote:
1. Programming Lock Bits
Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be cor-rupted. The location of the corruption is random.
Problem Fix / Workaround
When programming Lock Bits, make sure lock modeis not set to present, or lower levels.

Just so that I totally understand this, if I take the scenario of a virgin chip, and I have a batch file that programs my code, fuses and lock bits, then I'll be OK if I'm setting the lock bits to anything other than Lock Mode 1(which I assume is the unprogrammed, virgin state).
If, however, I need to re-program a chip, because I'm developing or updating firmware, I will be OK as long as I perform an erase cycle first.

Actually, I tend to use the STK500.exe for batch programming, so I will probably need to "learn" to use AVRDude or similar(provided that works for TPI mode).

John

Four legs good, two legs bad, three legs stable.

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

So where do I find the latest AVRDude? Do I have to dowload all the source and compile it myself, because that's not likely to happen without screwups.

If I go to the "download area" I am faced with a bewildering array of options, all of which are in arcane compression formats...

John

Four legs good, two legs bad, three legs stable.

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

Quote:

arcane compression formats.

;-)

In amongst those arcane compression formats are the odd .zip file and in particular this:

http://download.savannah.gnu.org...

That appears to contain a prebuilt 5.11 avrdude.exe as far as I can see. However I have no idea what the significance of the "Patch7610" in the name is and whether that's a good thing or a bad thing?

EDIT: Ah, good news, seems 7610 is support for FTDI bit-bang:

http://savannah.nongnu.org/patch...

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

Thanks, I have downloaded that now.
Next problem, avrdude signally fails to find my AVRISP MK2, I know it works as I use it with AS6.1
I copied this command line, which, as I understand it, should find all connected AVRISP MK2 devices.
avrdude -c avrisp2 -p t10 -P usb:xx -v

But it comes back with
Using Port : usb:xx
Using Programmer : avrisp2
avrdude: usbdev_open(): did not find any (matching) USB device "usb:xx"

What am I doing wrong?

Four legs good, two legs bad, three legs stable.

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

AVRDude can't use the Jungo USB drivers Atmel Studio uses - you need to install the LibUSB ones instead (or install the libUSB filter driver so you can use both at the same time).

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

LibUSB moans that it's only suitable for 32 bit Windows.
Great! Now I can't use AS6.1 either.
My AVRISP MKII is now a useless piece of junk.
I suppose I could see if it's possible to wreck the JTAGICE3...

Oh how I long for the days when I wrote all my own tools!

John

Four legs good, two legs bad, three legs stable.

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

OK, so how do I go about re-installing the Jungo driver from scratch? Any help?

Four legs good, two legs bad, three legs stable.

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

Just did a complete reinstall of AS6.1, still no luck.

Four legs good, two legs bad, three legs stable.

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

Windows restore to the rescue.
Now I can program my Tiny10s in AS6.1 at least
I think I'll forget avrdude for now... It's too stressful.

Four legs good, two legs bad, three legs stable.

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

All I'm after, at the end of the day, is a way to be able to send my client new firmware, that he can flash into a Tiny10 with a simple batch file using an AVRISP MKII. I don't want him to have to download, install and understand how to use AS6.1.
However, if the command line stk500.exe, that has worked so well for this is the pastwith other AVRs, obviously), can't cope with TPI, then I guess I'm screwed.

With such a small chip, why can't I get the firmware right the first time, I hear you ask?
Well, it's little more than a glorified 555 application, but there will still be a bit of tweaking required.

Four legs good, two legs bad, three legs stable.

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

What a freaking pain!

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

Sorry!

Four legs good, two legs bad, three legs stable.

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

No need for sorry! Its real and it could be any of us.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

You can force the Jungo back via the Device Manager - find the AVRISP-MKII node, open the properties, then update the driver to the one found in "C:\Program Files (x86)\Atmel\AVR Jungo USB\usb64". If that doesn't work, remove the AVRISP-MKII node and choose the option to remove all associated drivers, then remove and re-insert it.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

I thought you meant that I was being a freaking pain, which I could sympathize with!

John

Four legs good, two legs bad, three legs stable.

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

Also, you can use this LibUSB driver version for Windows 7 x64 compatibility with AVRDude:

http://www.libusb.org/wiki/libus...

It's the one I use. Actually, I use the filter driver version from there so I can also use Atmel Studio.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

abcminiuser wrote:
You can force the Jungo back via the Device Manager - find the AVRISP-MKII node, open the properties, then update the driver to the one found in "C:\Program Files (x86)\Atmel\AVR Jungo USB\usb64". If that doesn't work, remove the AVRISP-MKII node and choose the option to remove all associated drivers, then remove and re-insert it.

- Dean :twisted:


Thanks, Dean. As I mentioned, Windows restore enabled me to revert to a working AS6.1 situation.
I will need to understand more about LibUSB and filters thereof, and what the problems are with Win 7 64 bit before I try again.

Any comment on the first post in this thread?

Four legs good, two legs bad, three legs stable.

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

abcminiuser wrote:
Also, you can use this LibUSB driver version for Windows 7 x64 compatibility with AVRDude:

http://www.libusb.org/wiki/libus...

It's the one I use. Actually, I use the filter driver version from there so I can also use Atmel Studio.

- Dean :twisted:

OK, overlapping posts.

I might ask for a bit more detail as to the exact procedure, Dean. Not tonight, though. It's beer time.

John

Four legs good, two legs bad, three legs stable.

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

No, you are not the pain. What you have had to go through is the pain. Would not wish it on an enemy. Well, .... have to think about international rules against torture.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

Quote:

with a simple batch file using an AVRISP MKII. I don't want him to have to download, install and understand how to use AS6.1

Send him a $3 USBAsp from ebay and a copy of avrdude. No need for Jungo or anything sourced from Atmel.

(NB only some USBAsp have the firmware with TPI support).