ATMEGA1284P Bootloading Problems - device signature error

Hello everyone,
I have been trying to flash the bootloader onto my atmega1284p board in circuit and I have run into an issue that I cant seem to solve. Using Arduino ISP as programmer, I have mapped my pins correctly onto the target board (SCK to SCK, MISO to MISO, MOSI to MOSI, RESET to pin 10 of Arduino Uno).
I am using the target at 3.3V and a crystal of 7.37MHz.
The following is my error message:


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\kamau\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.2.1\avrdude.conf

         Using Port                    : COM6
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega1284P
         Chip Erase delay              : 55000 us
         PAGEL                         : PD7
         BS2                           : PA0
         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    10   128    0 no       4096    8      0  9000  9000 0xff 0xff
           flash                  65    10   256    0 yes    131072  256    512  4500  4500 0xff 0xff
           lfuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           hfuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           efuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           lock                    0     0     0    0 no          1    1      0  9000  9000 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 = 0x000000 (retrying)
avrdude: device signature = 0x000000 (retrying)
avrdude: device signature = 0x000000
avrdude main() error: Yikes!  Invalid device signature.
avrdude main() error: expected signature for ATmega1284P is FF FF FF
        Double check connections and try again, or use -F to override
        this check.


avrdude done.  Thank you.

Failed chip erase: uploading error: exit status 1

If someone has ran into a similar issue when bootloading their target, can they kindly share insight into how they solved this issue.

Does this circuit use the SPI bus as well?

I've not used a 1284, but that expected signature looks suspicious to me. Is the 1284 supported?

1 Like

Hello,
Thanks for the reply.

The original device signature as per the config file is
0x1E 0x97 0x05

What you're seeing there was me attempting to edit the config file to have the signature match what the compiler is reading from the device.
The efforts were futile.

The circuit doesn't use the spi bus. It is only set up for bootloading and only connected to the bus on the controller.

I would change that back to the original values.

Do you have the capacitor on the reset line?

This discussion might help:

1 Like

How it so? Uno operates under 5V. Did you use a level shifter?
You can damage the chip connecting 5V logic to 3V3.
See the datasheet for allowed voltage on IO pins.

Also, this "expected signature for ATmega1284P is FF FF FF" looks suspicious. There should be valid value for ATmega1284P as it is 0x1E9705. Anyhow, you have to solve the problem with the different voltages first.
Datasheet:
Voltage on any pin except RESET
with respect to ground ............................... -0.5V to VCC + 0.5V
Voltage on RESET with respect to ground ......-0.5V to +13.0V

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