# How to burn bootloader to ATmega 2560 using Atmel Studio and AVRISP mkII?

Although my question might come familiar to many Arduino developer including me, but, I am somehow lost burning bootloader to ATmega 2560. Many comments I found were related to AVRDude (never used before, maybe I should but later).

I usually use Atmel Studio with AVRISP mkII in order to flash my firmware to ATmega 2560 on a custom PCB.

Now, I need to use Watchdog timer. If I use it, MCU keeps restarting every interval I set (which is 8 seconds). After little search, i found there is a bug for some bootloaders. So, I therefore have to change the bootloader. (Correct me if I am wrong).

I can share some screenshots about my attempts;

After all this I click Program. After the process is done, Programming: Flash...OK appears. I believe it burns to the MCU. Because, my existing program is not working anymore.

At this point, in the first place, I thought, this is it. Then I flashed my own firmware (this time with watchdog timer included) using the same tool/settings as above except HIGH fuse I am using D0 instead of D8.

But again, MCU keeps resetting every 8 seconds. Means, bootlader issue persists.

What do you think?

Note that: the HEX file I am using for bootloder from the Arduino path as you can see in the screen-shot 3rd.

Note that: I have noticed after I created that question under electronics instead of Arduino SE, my apologies.

• You should load your application program on its own via ISP without using the bootloader and see if the reset problem persists when it is only your code and your fuse settings. If that works, then you can use ISP to restore the bootloader and see if loading your program that way works. But one step at a time. Dec 11, 2018 at 17:25