Strange behavior of Atmega2560-16AU

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

Hi,

Though it is very old topic & i am not getting any solution of my problem after tryingl of all the probable procedure discussed earlier in tutorial section.

Few days back i got stuck up with Locked fuse bit of At mega 2560, and i recovered that with external 1Mhz frequency using Another Attiny2313 with clock out at port D2 and selected Internal Clock and clock/8 option as per tutorial of Mr. Clawson.

 

I tested my code & Set the fuses as -

 

 Lock Bit - (x3C)

1. Mode - Further programming and verification disabled

2. Application Protection Mode - No lock on SPM and LPM in Application .

3. BootLoader Protection Mode - No lock on SPM and LPM in Boot Loader.

 

High Fuse (xD0)

Boot Flash section size=4096 words Boot start 

Enabled - SPI Enable

Enabled - Preserve EEprom Memory

Enable - Boot Reset Vector.

 

Low Fuse (FF)

Selected External Xtal Osc 8-16 Mhz

Disabled - CKDIV = 8

Disabled - CKOUT = 0

 

Extended Fuse (xFD)

Brown-out detection level at VCC=2.7 V; 

 

Now i am unable to erase this chip, I can read the fuse but Unable to erase/write any fuse. During chip erase command executed it is showing - 

 

avrdude -C avrdude.conf -c usbasp -p m2560 -e -q

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9801
avrdude: erasing chip

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

 

i am using USBASP with latest firmware.

Please help.

Pkdas

Last Edited: Thu. Mar 29, 2018 - 07:41 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why do you say that the erase is failing, given the output shown?

 

I am not an AVRDUDE person.  For something like this, don't you use more and more -v (verbose) on the command line to get more detailed output?

 

Did you read back flash and EEPROM and fuses (and lock bits?) and examine the memory spaces to see if they are erased?

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

I can read the fuse but Unable to erase/write any fuse.

Show your full command, and the full output of that command.

 

Fuses are unaffected by a chip erase.  Fuses cannot be 'erased'.  They are either programmed (changed to '0') or unprogrammed (changed to '1').

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

Fuses are unaffected by a chip erase.  Fuses cannot be 'erased'.  They are either programmed (changed to '0') or unprogrammed (changed to '1').

Well, this might be a bit of twisted word-smithing...any of the memory areas will read either a one or zero. Fuses cannot be 'erased' (any more than any other area)...  Maybe just avoid the term "erased" for any/all of the memories.

 

When in the dark remember-the future looks brighter than ever.

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

I mean to say that a chip erase command has no effect on fuses, one way or another.  They are not all changed to '1', nor to '0', nor to their factory-fresh state.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

well,i  am once again giving the case what practically happening,  i have a at2560 16 u based board which is having some switches, and 3 nos 7 seg display, i had successfully developped my program and burnt the 2560 using USBASP with latest firmware. my code have been written such a way the the board shall show some number in its 7 seg display and that number will comeout from the code based upon some table written in its code.

now i few days back when i was trying to modify the 2560 board firmaware it is fails. few months back i faced the same problem of not detecting the At2560 using USBASP & recovered using 1Mhz externally.

But this time i can see all fuse, i can read all fuse but uable to modify the fuse / chip erase.

Whenever i was trying to erase the chip it is showing to got erased but after erase it is showing some number in 7 seg display , which is comming from the old program.

if the chip got erased the number in 7 seg display never show.

Pkdas

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

after loading my old program i have change the fuse" Further programming and verification disabled"  option

 

Pkdas

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

my purposer is to erase the whole chip flash area as well as all fuses to factory reset condition - if possible

 

Pkdas

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

But the output in #1 that you showed seems to show the chip being erased OK. The key thing when using avrdude is whether it can read the chip signature. If you see something that reports the fuses as starting 0x1E then the chances are the programmer *is* in contact with the AVR (0x1E is the code for "Atmel")

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

but sir after issuing chip erase command from AVRDUDE i am getting the same performance of the board as it was before chip erase then how can i say that the chip is being erased ?

Pkdas

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

Show your full command, and the full output of that command.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

joeymorin wrote:

Show your full command, and the full output of that command.

What is the format of full command? Please guide 

Pkdas

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

I am asking >>you<< to post here the exact command which you used, and the complete output of that command.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Wed. Apr 4, 2018 - 08:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

C:\Users\PC2>avrdude -c  usbasp -p m2560 -U lfuse:w:0xc2:m -U hfuse:w:0xd9:m -U
efuse:w:0xff:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x1e9801
avrdude: reading input file "0xc2"
avrdude: writing lfuse (1 bytes):

Writing |                                                    | 0% 0.00s ***faile
d;
Writing | ################################################## | 100% 0.10s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xc2:
avrdude: load data lfuse data from input file 0xc2:
avrdude: input file 0xc2 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xc2 != 0xff
avrdude: verification error; content mismatch

Pkdas

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

As I mentioned earlier, look at the avrdude documentation and see what it says about adding several -v ("verbose") to the command line.

 

Your sequence would be proper for a locked chip, I believe.  Try an ERASE first and see if you get the same symptoms.

 

 

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

Your sequence would be proper for a locked chip, I believe.

While LB mode 2 and mode 3 will lock the fuse bits for writing, they should nevertheless be readable.  The avrdude output is showing an lfuse value of 0xFF, which is consistent with fusing for a low power external crystal oscillator.  It is also consistent with the lfuse value noted in the OP.

 

The OP also shows LB mode 3, explaining the output from avrdude.

 

To confirm, the OP should run this:

avrdude -c  usbasp -p m2560 -U lock:r:lock.hex:i

And then show us the contents of the resulting file:

type lock.hex

Should show the lock bits set to 0x3C.

 

Although the OP shows the output of an avrdude command which attempts to erase the target, he used -q so we have nothing to go on.

 

Try again:

avrdude -C avrdude.conf -c usbasp -p m2560 -e

As Lee has said more than once, add -v or -vv or -vvv to get more detail.

 

Then try reading the lock bits back again as above.

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

1.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\PC2>avrdude -p m2560 -c usbasp -t

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9801
avrdude>

 

 

2.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\PC2>avrdude -p m2560 -c usbasp -e

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9801
avrdude: erasing chip

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

 

3.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\PC2>avrdude -p m2560 -c usbasp -vvv

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : lpt1
         Using Programmer              : usbasp
avrdude: seen device from vendor ->www.fischl.de<-
avrdude: seen product ->USBasp<-
         AVR Part                      : ATMEGA2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom        65    10     8    0 no       4096    8      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           flash         65    10   256    0 yes    262144  256   1024  4500  45
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           efuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           lock           0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           calibration    0     0     0    0 no          1    0      0     0
 0 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9801
avrdude: safemode read 1, lfuse value: ff
avrdude: safemode read 2, lfuse value: ff
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: safemode read 1, hfuse value: d0
avrdude: safemode read 2, hfuse value: d0
avrdude: safemode read 3, hfuse value: d0
avrdude: safemode: hfuse reads as D0
avrdude: safemode read 1, efuse value: fd
avrdude: safemode read 2, efuse value: fd
avrdude: safemode read 3, efuse value: fd
avrdude: safemode: efuse reads as FD

avrdude: safemode read 1, lfuse value: ff
avrdude: safemode read 2, lfuse value: ff
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: safemode read 1, hfuse value: d0
avrdude: safemode read 2, hfuse value: d0
avrdude: safemode read 3, hfuse value: d0
avrdude: safemode: hfuse reads as D0
avrdude: safemode read 1, efuse value: fd
avrdude: safemode read 2, efuse value: fd
avrdude: safemode read 3, efuse value: fd
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

4.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\PC2>avrdude -p m2560 -c usbasp -U lock:w:0x3F:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9801
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

Writing |                                                    | 0% 0.00s ***faile
d;
Writing | ################################################## | 100% 0.09s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x3f != 0x3c
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

C:\Users\PC2>

 

Pkdas

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

i am using 1mhz clock externally at xtal-2 pin

Pkdas

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

If your external osc is 1MHz, why are programming fuses for 8MHz or higher?

lf = 0xff -> high freq osc. >8MHz

lf = 0xfb -> low  freq osc <3MHz

 

Jim

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
4.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\PC2>avrdude -p m2560 -c usbasp -U lock:w:0x3F:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9801
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

Writing |                                                    | 0% 0.00s ***faile
d;
Writing | ################################################## | 100% 0.09s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x3f != 0x3c
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

C:\Users\PC2>

I asked you to read the lock bits, no write them.  Further, you cannot write a lock bit to '1'.  Only to '0'.  Lock bits are reset to '1' after a chip erase.  Nothing else can.

 

However, they are read back as part of a write, so I can see that they read back as 0x3C, even after you've issued a chip erase in 1.

 

Can we assume that you've not run any other avrdude sessions between 1. and 4., other than what you've shown?

 

If so, then it would indeed appear that the chip erase is not actually occurring.  Curious.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

You could try "AVRDUDESS" ... and set "Verbosity" to 4. It will tell us byte by byte the command sequences issued by avrdude.

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

You could try "AVRDUDESS

Oh g*d please don't.  The same can be achieved with avrdude on the command line, with full output.  No need to fuss with a half-baked gui who's just is to >>hide<< details, not expose them.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
avrdude -c  usbasp -p m2560 -U lock:r:lock.hex:i

:010000003CC3
:00000001FF

 

found in lock.hex file

Pkdas

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

that is 0x3c for the LOCk bits - exactly what you wrote in #1

 

and ... this should NOT prevent 'chip erase' 

 

so we need to know, whether avrdude is sending the right command: use avrdude with '....... -v -v -v -v -e' (instead of '-e -q') to send the 'chip erase'-command. output will contain somthing like that

 

Quote:

...

avrdude.exe: erasing chip
avrdude.exe: Send: V [56] . [ac] . [80] . [00] . [00]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [10] 

...

 

if this is OK, we need to know, whether the programmer sends the right command sequence to the MCU. that is for serial programming mode: 0xac 0x80 0x00 0x00

 

if you have a logic analyzer scan PB1/PB2/PB3 (TQFP-100 chip) or PB1/PE0/PE1 (TQFP-64 chip) [taken from datasheet]

Last Edited: Tue. Apr 17, 2018 - 06:25 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\System32>avrdude -p m2560 -c usbasp -v -v -v -v -e

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : lpt1
         Using Programmer              : usbasp
avrdude: seen device from vendor ->www.fischl.de<-
avrdude: seen product ->USBasp<-
         AVR Part                      : ATMEGA2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom        65    10     8    0 no       4096    8      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           flash         65    10   256    0 yes    262144  256   1024  4500  45
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           efuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           lock           0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           calibration    0     0     0    0 no          1    0      0     0
 0 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x1e9801
avrdude: safemode read 1, lfuse value: ff
avrdude: safemode read 2, lfuse value: ff
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: safemode read 1, hfuse value: d0
avrdude: safemode read 2, hfuse value: d0
avrdude: safemode read 3, hfuse value: d0
avrdude: safemode: hfuse reads as D0
avrdude: safemode read 1, efuse value: fd
avrdude: safemode read 2, efuse value: fd
avrdude: safemode read 3, efuse value: fd
avrdude: safemode: efuse reads as FD
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)

avrdude: safemode read 1, lfuse value: ff
avrdude: safemode read 2, lfuse value: ff
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: safemode read 1, hfuse value: d0
avrdude: safemode read 2, hfuse value: d0
avrdude: safemode read 3, hfuse value: d0
avrdude: safemode: hfuse reads as D0
avrdude: safemode read 1, efuse value: fd
avrdude: safemode read 2, efuse value: fd
avrdude: safemode read 3, efuse value: fd
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

C:\Windows\System32>

Pkdas

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

OK, that doesn't really change something. I don't know why, but probably it could help to update avrdude to a newer version.

 

That's waht I get with avrdude 6.1 (and avrdudess)

 

>avrdude -c arduino -p m328p -P COM32 -b 1000000 -v -v -v -v -e 

 

avrdude.exe: Version 6.1, compiled on Mar 13 2014 at 00:09:49
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "C:\Program Files\AVRDUDESS\avrdude.conf"

             Using Port                    : COM32
             Using Programmer              : arduino
             Overriding Baud Rate          : 1000000
avrdude.exe: serial_baud_lookup(): Using non-standard baud rate: 1000000avrdude.exe: Send: 0 [30]   [20] 
avrdude.exe: Send: 0 [30]   [20] 
avrdude.exe: Send: 0 [30]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [10] 
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :

                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

             Programmer Type : Arduino
             Description     : Arduino
avrdude.exe: Send: A [41] . [80]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [03] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: A [41] . [81]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [06] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: A [41] . [82]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [cf] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: A [41] . [98]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [00] 
avrdude.exe: Recv: . [10] 
             Hardware Version: 3
             Firmware Version: 6.207
             Topcard         : Unknown
avrdude.exe: Send: A [41] . [84]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: 2 [32] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: A [41] . [85]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [00] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: A [41] . [86]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [00] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: A [41] . [87]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [00] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: A [41] . [89]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [00] 
avrdude.exe: Recv: . [10] 
             Vtarget         : 5.0 V
             Varef           : 0.0 V
             Oscillator      : Off
             SCK period      : 0.1 us

avrdude.exe: Send: A [41] . [81]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [06] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: A [41] . [82]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [cf] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: B [42] . [86] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] . [80] . [04] . [00] . [00] . [00] . [80] . [00]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: E [45] . [05] . [04] . [d7] . [c2] . [00]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [10] 
avrdude.exe: Send: P [50]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [10] 
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | avrdude.exe: Send: u [75]   [20] 
avrdude.exe: Recv: . [14] . [1e] . [95] . [0f] . [10] 
################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x1e950f
avrdude.exe: erasing chip
avrdude.exe: Send: V [56] . [ac] . [80] . [00] . [00]   [20] 
avrdude.exe: Recv: . [14] 
avrdude.exe: Recv: . [10] 
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding

 

(programmer cannot respond, it's the bootloader wink)

 

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

Silly question, but you have loaded the ISP programmer sketch into the Arduino, correct?

 

Jim

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

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

try: ... -u -v -v -v -v -e to disable safemode

 

(reply to #25)

Last Edited: Thu. Apr 19, 2018 - 06:53 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

Silly question, but you have loaded the ISP programmer sketch into the Arduino, correct?

 

Jim

 

??? Why should I ???

 

Quote:

...

(programmer cannot respond, it's the bootloader wink)

 

PS: The bootloader is implementing a subset of STK500 ...

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

bitflipser wrote:
ki0bk wrote: Silly question, but you have loaded the ISP programmer sketch into the Arduino, correct? Jim ???

 

Why should I ???

 

Because this:

bitflipser wrote:
>avrdude -c arduino -p m328p

says your using an Arduino (running the use arduino as programmer sketch) as the programmer to program an externally connected M328p!

 

Jim

 

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

Last Edited: Thu. Apr 19, 2018 - 01:41 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Because this:

 

bitflipser wrote:

>avrdude -c arduino -p m328p

 

says your using an Arduino (running the use arduino as programmer sketch) as the programmer to program an externally connected M328p!

 

Actually, it means it's using an optiboot-like bootloader.  The ArduinoISP sketch requires -c stk500v1.

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

joeymorin wrote:
Actually, it means it's using an optiboot-like bootloader. The ArduinoISP sketch requires -c stk500v1.

Thanks, looks like I got those two mixed up again! smiley

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?