Error when burning bootloader to Atmega328P-AU chip

Dear Forum
I've made a custom pcb and I was trying to burn Bootloader to an ATmega328P-AU SMD chip, but got several variants of error. I've tried to do some research but had no luck, can anyone help me with the issue please?

there are several types of error stating that the device signature to be:

  • 0x000000 (might be due to the reason that the crystal was not working according to the research, but also get the same Error when MOSI & MISO was pluged in reverse when I tried it :thinking: )
  • 0xffffff (this is the most Error I've got, which has occured multiple times and I couldn't figure what it ment)
  • 0x[random] (sometimes it spits out random signature code, still no clue why)

I've tried and slodered together two identical boards, each with crystal & capacitors, but still got the same issue. maybe it's something to do with the board designe cuz I really don't have experience doing so, can somebody please help?
and also, here's my board Schematic and stuff as screenshots :pray:

and here's the output of buring bootloader with Arduino as ISP:

"C:\Users\Administrator\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\7.1-arduino.1/bin/avrdude" "-CC:\Users\Administrator\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.2.2/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM15 -b19200 -e -Ulock:w:0xff:m -Uefuse:w:0b11111101:m -Uhfuse:w:0b11010110:m -Ulfuse:w:0b11110111:m

avrdude: Version 7.1-arduino.1
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is C:\Users\Administrator\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.2.2\avrdude.conf

         Using Port                    : COM15
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

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

         Programmer Type : STK500
         Description     : Atmel STK500 version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0xffffff (probably .xmega) (retrying)
avrdude: device signature = 0xffffff (probably .xmega) (retrying)
avrdude: device signature = 0xffffff (probably .xmega)
avrdude main() error: Yikes!  Invalid device signature.
avrdude main() error: expected signature for ATmega328P is 1E 95 0F
        Double check connections and try again, or use -F to override
        this check.


avrdude done.  Thank you.

pls help :pray:

Seems like all received data are 0xFF. It points to a shortage on some ISP wire.

since the two boards I've slodered have the same issue, it must be a flaw in the PCB design then? :cry:

Did you check the connections worked on breadboard before designing the PCB ?

If you need to use the ISP\SPI connections to program the Atmega, you need to be careful with other devices that are on the ISP\SPI bus.

You have an NRF24 on the SPI, are you sure its deselected when the ISP connection puts RESET low ?

the schematic I used was from a youtube video so I didn't thought about testing it out on a bread board :cry: , a valuable lesson tho, I certainly will test things out before designing pcb next time

I didn't have the NRF24 module slodered to the board yet tho, there's only the ATmege chip, some capacitors and resisters, plus an LED on SCLK pin, so maby that won't be an interference? :thinking:

here's pictures of the pcb:


If you have another pcb of your design, assembly it without resonator and try to burning bootloader providing the external 1 mhz clock signal to the XTAL1 pin of the atmega

1 Like

Good if there is only ATmega but get rid of LED on SCK. it can be a problem.

1 Like

I don't see Gnd at the SPI connection ...

1 Like

thanks for the info guys, I figure that it's best for me to get a PU chip and test out the connections on a bread board
still no clue what caused the problem tho, I might try and sloder another chip that already had bootloader burnt and see if it works :cry:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.