Go Down

Topic: avrdude device signature problem, with brand new atmega2560 (Read 1 time) previous topic - next topic

wanek

hello!

i've built a custom made pcb, with atmega2560. the mcu is brand new, so it has no bootloader etc.
when i try to burn bootloader using usbasp programmer, i always got this output:

Code: [Select]
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

An error occurred while uploading the sketch
Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x535353
avrdude: Expected signature for ATmega2560 is 1E 98 01
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.


for experimenting, i have tried to replace line 10339 in "C:\Users\wanek\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf" , with
Code: [Select]
signature        = 0x53 0x53 0x53; , then i've got this output:

Code: [Select]
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x535353 (probably m2560)
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

Error while burning bootloader.
Writing |  ***failed; 
################################################## | 100% 0.06s

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.00s

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

avrdude done.  Thank you.




regarding the schematic:
- it has 100nf caps on all vcc, avcc, aref pins
- has a quality 16mhz crystal with caps included and 1m resistor
- reset pin has 22pf cap and diode, resistor, etc

actually all the circuit was designed and (double checked) exactly per the original mega2560 v3 schematic pdf:
https://www.arduino.cc/en/uploads/Main/arduino-mega2560_R3-sch.pdf

the pc is a windows 10, with latest updates, ide is 1.8.5

i would like to mention, that i could successfully upload sketch with the same usbasp for other mcu-s, like atmega328 and attiny85.

what could be the problem?
thank you!

avr_fred

Don't overide the signature check, it's pointless. The wring I'd is a diagnostic.

For starters, I'd guess the clock isn't running. Check both sides of the crystal with a scope if you have one. Look for a 16MHz sine-ish wave of 50-100mv.

I see you've copied the mega schematic right down to the goofy 1 meg and 27 ohm resistors in the crystal circuit as mentioned. I've never understood why they are there as there is no mention of use in the datasheet and the 1meg could cause problems with oscillator starting. Personally, I would eliminate them.

More importantly, what I don't see are the two 22pf crystal loading caps. You said 22pf in the reset circuit but that should be a 100nf.

Based on those observations, I would ask:

1) your "quality" crystal. What load capacitance does it need?
2) are the crystal loading caps the required value and physically close to the crystal? I don't see any caps that could be part of the crystal circuit.

In general, you soldering looks a bit dodgy, especially on C7/8/9. There also appears to be a solder bridge on the processor pins on the C6 side, near the three vias closest to the pins.

kprims

Quote
i would like to mention, that i could successfully upload sketch with the same usbasp for other mcu-s, like atmega328 and attiny85.
Don't waste your time doing this if you have already been programming Factory 1MHz chips with your USBasp.

Might be worth trying shorting the JP3 slow SCK pins if you have them. You could also try -B3 in your avrdude  command.

flubsche

Hi to everybody!

I just experienced the exact same problem: signature 0x535353. Consistent over multiple attempts. For me, it turned out to be a short between the MISO and MOSI pins, which are right beside each other in the TQFP-32 SMD package version. After removing the solder bridge it worked flawlessly.

DrAzzy

Never modify avrdude.conf to change the signature it's expecting to match the wrong sig you are reading. That will never make life better for you - most likely it will just create more problems (and screw you over when you fix the actual problem)

Do not put the 1meg resistor across the crystal. You never need it - usually people put it there because their stupid simulation program tells them they need it. This is why simulators suck - simulators that dont match reality are worse than nothing.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

david_2018

The original post was made almost two years ago, hopefully he has it working by now.

nightrook

Hi to everybody!

I just experienced the exact same problem: signature 0x535353. Consistent over multiple attempts. For me, it turned out to be a short between the MISO and MOSI pins, which are right beside each other in the TQFP-32 SMD package version. After removing the solder bridge it worked flawlessly.
Thanks dude!
Had the exact same problem. A dead short in the pins of the package.
Would be scratching my head for hours and perhaps, change the crystal and load capacitors, if not for you.

Go Up