0
\$\begingroup\$

I'm trying to install the MightyCore bootloader into an ATmega32A-PU chip but I'm getting the following error when I press the "Burn bootloader" button on Arduino IDE:

Arduino: 1.8.16 (Linux), Board: "ATmega32, Yes (UART0), EEPROM retained, Standard pinout, BOD 2.7V, LTO disabled, External 16 MHz"

/home/ian/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18/bin/avrdude -C/home/ian/.arduino15/packages/MightyCore/hardware/avr/2.1.3/avrdude.conf -v -patmega32 -cstk500v1 -P/dev/ttyUSB0 -b19200 -e -Ulock:w:0x3f:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:0b11000110:m -Ulfuse:w:0b10111111:m 

avrdude: Version 6.3-20201216
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/ian/.arduino15/packages/MightyCore/hardware/avr/2.1.3/avrdude.conf"
         User configuration file is "/home/ian/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega32
         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  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    10    64    0 no       1024    4      0  9000  9000 0xff 0xff
           flash         33     6    64    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           efuse          0     0     0    0 no          0    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           calibration    0     0     0    0 no          4    0      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

Error while burning bootloader.
Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x00ff00
avrdude: Expected signature for ATmega32 is 1E 95 02
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

The chip was bought from AliExpress. The front label on the chip says:

ATMEGA32A PU 1323

and the back:

3W0647-35460K  1-P1323 e3

I've setup an Arduino Nano as an ISP by loading the example sketch from Arduino 1.8.16 and uncommented the #define USE_OLD_STYLE_WIRING, compiled and uploaded to the Arduino Nano. Everything seems to be working correctly, the blue LED blinks slowly.

I then proceeded to wire everything according to the comments on the Arduino sketch. Here is a picture of my setup:

picture of the setup to burn the bootloader

To burn the bootloader, I've chosen the following settings on Arduino IDE:

enter image description here

Checks I've made before burning the bootloader:

  • checked that all the pins on the atmega were connected to the protoboard with a multimeter and a spare jumper wire;
  • voltage between 5V and GND on Nano was 4.7V; the same voltage was read between 10-11 and 30-31 on the atmega;
  • I don't have an oscilloscope, but the crystal was working on another application with a similar chip (atmega32-16pu).

Additional info: most of my attempts the device signature was 0x00ff00, but sometimes it also read 0xff00ff.

Is there anything else I can do to make this work?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Check wiring & connection. It's nearly impossible to "read" it from photo, but getting such signature most likely means you've connected something wrong.

Another thing - those China sellers are unreliable. If nothing works get a chip from reliable, authorized supplier. Those sources from AliExpress are know to be used sometimes & might have their fuses already programmed to some non-default (and unknown) values. MCU could be set for external clock for example, etc. There are homebrew devices, like "AVR fuse bit doctor" which are known to reset AVR MCUs to default fuses via HVPP/HVSP (high voltage) mode but you have to build one first.

\$\endgroup\$
1
  • \$\begingroup\$ I've found that HVPP project and I will try building one for me! In the future, I will definitely buy from another source, the only problem is I live in Brazil and freights usually cost a lot, which is why I've bought from AliExpress. \$\endgroup\$ Oct 25, 2021 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.