Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to check the bootloader installed correctly or not?

Not open for further replies.


Member level 3
Jul 29, 2011
Reaction score
Trophy points
Activity points

I am working on ATmega2560 and I need to load bootloader into it. So I have tried it by many methods. But I did not be succeed. So I gone through Arduino as ISP method.
I will explain what I have done. First of all I took the Arduino Duemilanouve board and the Arduino ISP sketch uploaded to the Duemilanouve. So I have made the Arduino as a programmer. Then I connected my ATmega2560 to the Arduino programmer board. Then I select the board ATmega2560 and controller as ATmega2560. Then I selected correct COM port and programmer as Arduino as ISP.
Then I select Burn Bootloader. And after few seconds, I got the message Done Bootload uploading.

So I want to know that Do I have uploaded bootloader correctly?

Then I took the simple blink sketch from Example and uploaded it.

But it gives error now. The error is Tiemout error.

Here is the error :

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

What is the problem?

Please help me to solve the issue.

first, which methods did you already tried? I remember some methods that modify the mega board so you can program with it's usb-serial converter but basically you need to undo those modifications before trying to use the bootloader directly... (this involved breaking a path to the RESET pin)

well, In your case, what I would do:

1. learn how to use the Arduino ISP outside the arduino environment, basically, learn how to use the command line tool called 'avrdude'
2. locate the bootloader.hex that is the correct one for the MegaBoard (a little google show which file you need: arduino-0021/hardware/arduino/bootloader/stk500v2/stk500boot_v2_mega2560.hex)
3. first use avrdude and your 2009 ISP to unlock and erase the 2560
avrdude -p m2560 -c avrisp -P COMxx -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m -e -v

4. program the stk500boot_v2_mega2560.hex into the MegaBoard, it should be success, don't write any fuse
 avrdude -p m2560 -c avrisp -P COMxx -Uflash:w:stk500boot_v2_mega2560.hex:i -v

5. disconnect everything and reconnect and use avrdude to read the MegaBoard and compare the contents of the readed.hex and the original stk500boot_v2_mega2560.hex (which includes some leaning of the Intel-Hex File format)
 avrdude -p m2560 -c avrisp -P COMxx -Uflash:r:readed.hex:i -v
(don't compare file sizes, but actual address-byte content, read about the intel hex and open both files)

6. if it's ok, program the lock fuse.
avrdude -p m2560 -c avrisp -P COMxx -Ulock:w:0x0f:m -v

7. now test the MegaBoard with it's own COM port with a sample sketch in Arduino IDE

if step 5. was success (you could read the the 2560 contents and it was the 'same' as the original file) and after step 7 it didn't work, the problem should be in another part of the circuit. (remember what I asked first? also, I'm not sure how the new Megaboards are coming, years ago, they came with a Ft232 as usb to serial converter, i thiiink the new Megaboards come with a small atmega16Ux as USB converter? and I'm not sure if you also need to program it with a USB CDC or something similar...


Also be sure to set all fuse bits correctly.
Especially I all clock source bits.
To activate it you need to release the reset line.

Before setting protection fuses, verify the program data.

Ensure that VCC is correct and stable.


Not open for further replies.

Part and Inventory Search

Welcome to