t2313 lock bits / HV programming

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

I tried searching, but the search page is busted.

Yesterday I tried setting the lock bits of my t2313 to 0xFC, zeroing LB1 and LB2. Avrdude wouldn't set the bits and just kept complaining that the verification didn't match. Then I just got desperate and tried changing them to anything, and they wouldn't change.

I changed lfuse earlier to the 8Mhz clock with no problems, but I just can't change the lock bits. I'm using a SPI programmer hooked up to my parallel port.

I see in the datasheet that lock bits may be set by serial programming mode, but that the last byte in the programming command is: 11iiiiii, where i are input bits. Does this partial byte throw off avrdude somehow? Have you guys set lock bits on the t2313 using avrdude?

Also, I've read online about a high voltage serial mode that can recover chips if the reset pin is disabled. I can't find anything in the datasheet about a high voltage serial mode, only a parallel one. Is there any truth to this?

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

You need to ERASE the chip in order to change the lock bits...otherwise they would NOT be lockbits. ie if you are trying to steal someone else's code.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Does it read the correct device signature?

You MAY have messed up the clock fuses when you changed to 8MHz clock. The chip will NOT respond without an operating clock. The SPI programmer often reports this as "failure to verify".

Jim

 

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

 

 

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

Quote:
Also, I've read online about a high voltage serial mode that can recover chips if the reset pin is disabled.
I can't find anything in the datasheet about a high voltage serial mode, only a parallel one. Is there any truth to this?

True - High voltage serial mode programming is not available on the ATtiny2313.

Be aware of this data sheet errata item:

ATtiny2313 Errata

2. Parallel Programming does not work
   Parallel Programming is not functioning correctly. Because of this, reprogramming
   of the device is impossible if one of the following modes are selected:
   –   In-System Programming disabled (SPIEN unprogrammed)
   –   Reset Disabled (RSTDISBL programmed)

   Problem Fix/Workaround
   Serial Programming is still working correctly. By avoiding the two modes above, the
   device can be reprogrammed serially.

If either of these modes are set the AVR is no longer programmable - except for the existing loaded program it's toast.

Stan

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

sbennett wrote:
Quote:

Be aware of this data sheet errata item:

ATtiny2313 Errata

2. Parallel Programming does not work
   Parallel Programming is not functioning correctly. Because of this, reprogramming
   of the device is impossible if one of the following modes are selected:
   –   In-System Programming disabled (SPIEN unprogrammed)
   –   Reset Disabled (RSTDISBL programmed)

   Problem Fix/Workaround
   Serial Programming is still working correctly. By avoiding the two modes above, the
   device can be reprogrammed serially.

If either of these modes are set the AVR is no longer programmable - except for the existing loaded program it's toast.

Stan


These have been fixed in the tiny2313 revision C. Now you can program with the revision C tiny2313 by parallel mode.

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

ck79 wrote:
These have been fixed in the tiny2313 revision C. Now you can program with the revision C tiny2313 by parallel mode.

The latest ATtiny2313 data sheet, doc2543 rev I dated 04/06, does not include "tiny2313 revision C" in errata.

Can you point to where this information has been published by Atmel?

Stan

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

sbennett wrote:
ck79 wrote:
These have been fixed in the tiny2313 revision C. Now you can program with the revision C tiny2313 by parallel mode.

The latest ATtiny2313 data sheet, doc2543 rev I dated 04/06, does not include "tiny2313 revision C" in errata.

Can you point to where this information has been published by Atmel?

Stan


I heard from my friend. He ask the Atmel in Technical Support website. The revision C tiny2313 is the one which have the C leter at last of the second line in the bottom of the chip. With the revision C one, you can program by parallel mode, check/uncheck the SPIEN fuse. But if you check the RESET Disabled fuse, you can't program it again by serial or parallel mode. I checked these problems by a STK500 clone. You can check it by youself.