Bootloader install fails with: 'program enable: target doesn't answer. 1'

Hello,

I have developed a little solution based on the 328P and I am using the Arduino bootloader for it. I have installed the bootloader many other times and I am familiar with the procedure.

This time around, however, I am having a little problem on my latest PCB revision as the install keeps failing. I attached the whole output for you to review, but the interesting part comes at the very end: after a series of successful fuse settings, I get:

[omitting all successful messages, see attached files for full details]

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

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

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.

avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

I am using an USBasp programmer which works just fine on other boards and with chips of the same batch so I would exclude a systemic problem with the programming hardware itself or with the chips I am using. Also, I checked every single ICSP connection and they seem to be OK.

Has anyone had a similar issue? Thanks for your suggestions

Alain

error.txt (8.29 KB)

Check your Crystal. If you are using factory chip set at 1Mhz internal and you burn bootloader for 8 Mhz external crystal, when the IDE starts to burn the second command (ATmegaBOOT_168_atmega328_pro_8MHz.hex) the external clock should be running at that time.

It was the crystal indeed. Thanks a lot!