Hi,
I'm having some trouble with my Arduino Mega 2560 Rev. 3 board regarding the bootloader.
It all worked well with the preburnt bootloader installed by default. Then I had to write a sketch without the bootloader, therefore I used an ISP-programmer and programmed it directly (with the Arduino 1.0 IDE -> using programmer) and the prog was also working well, so the ISP-configuration works just fine. By doing this the original bootloader is (of course) erased/overwritten.
Now I wanted to revert back to the original bootloader and I'm experiencing serious problems:
I selected burning bootloader (the original STK500v2 delivered with the 1.0 IDE on Win7 x64 which is the default for the Mega 2560) in the Arduino IDE. This is done in around 1 minute and after finishing avrdude says it has worked.
But I just can't get any new programm onto the board. I always get a timeout when uploading a new programm via USB/bootloader (I enabled verbose output). Furhermore when powered up, the L-led (internal led at PIN 13) won't flicker once as described in the bootloader troubleshooting, but remains active indefinitely. When uploading the RX/TX leds also won't blink - just once when started and then from time to time (I assume when avrdude tries to reset the arduino).
I tried the loopback test and it works just fine, I also reinstalled the driver, stil not working, but the problem shouldn't be located there, because the USB-ATMEGA interface bridge works just fine, should it?
The Arduino itself is (probably) also fine, as programming it directly per ISP works, too (using the blink example to keep it as simple as possible)
There are no other connections (I removed my shield), except the ISP when burning. I tried it by using Arduino on board power (ISP-Power off) and ISP-Power only. The IDE/avrdude always says it worked (as long as the isp cable is pluged in ;)). The ISP pins are also connected correctly, as the direct programming of sketches works.
I suspect that either the bootloader isn't really burned to the Arduino (despite it says it does and the verbose output says it also verified the code and the fuse settings and everything is fine) or there are some errors with the fuse settings (I'm using the default ones, I changed neither bootloader.hex nor the settings regarding it).
The other possibility is that there is some incompatibility with the bootloader hex file delivered with 1.0 and the Mega third revision, but I highly doubt it.
Is there some test I can run to check where the error is located?
What can I do to get it working?
I'm really running out of ideas. I burnt different Mega 2560 bootloaders multpily times (in the end I used the original one) and spend hours on the internet, but all similiar problems were either not resolved at all or the solution isn't working with my board.
Thank you for your help!
Best regards!
For the sake of completeness:
This is the error message when uploading (USB at COM3):
Using Port : \\.\COM3
Using Programmer : stk500v2
Overriding Baud Rate : 115200
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
And this a snippet of the logfile (removed all the send/receive info due to the size limit) when burning the bootloader (ISP at COM4):
Using Port : \\.\COM4
Using Programmer : stk500v2
stk500v2_getsync(): found STK500 programmer
AVR Part : ATMEGA2560
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 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
Block Poll Page Polled
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
Block Poll Page Polled
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel STK500 Version 2.x firmware
Programmer Model: STK500
Hardware Version: 3
Firmware Version Master : 2.10
Topcard : Unknown
Vtarget : 0.0 V
SCK period : 3.3 us
Varef : 0.0 V
Oscillator : Off
AVR device initialized and ready to accept instructions
###
Device signature = 0x1e9801
reading input file "0x3F"
writing lock (1 bytes):
##
1 bytes of lock written
verifying lock memory against 0x3F:
load data lock data from input file 0x3F:
input file 0x3F contains 1 bytes
reading on-chip lock data:
##
verifying ...
1 bytes of lock verified
reading input file "0xFD"
writing efuse (1 bytes):
##
1 bytes of efuse written
verifying efuse memory against 0xFD:
load data efuse data from input file 0xFD:
input file 0xFD contains 1 bytes
reading on-chip efuse data:
##
verifying ...
1 bytes of efuse verified
reading input file "0xD8"
writing hfuse (1 bytes):
##
1 bytes of hfuse written
verifying hfuse memory against 0xD8:
load data hfuse data from input file 0xD8:
input file 0xD8 contains 1 bytes
reading on-chip hfuse data:
##
verifying ...
1 bytes of hfuse verified
reading input file "0xFF"
writing lfuse (1 bytes):
#
1 bytes of lfuse written
verifying lfuse memory against 0xFF:
load data lfuse data from input file 0xFF:
input file 0xFF contains 1 bytes
reading on-chip lfuse data:
#
verifying ...
1 bytes of lfuse verified
avrdude done. Thank you.
Device signature = 0x1e9801
NOTE: FLASH memory has been specified, an erase cycle will be performed
reading input file "...\stk500boot_v2_mega2560.hex"
writing flash (262106 bytes):
#
262106 bytes of flash written
verifying flash memory against ...\stk500boot_v2_mega2560.hex:
load data flash data from input file ...\stk500boot_v2_mega2560.hex:
input file ...\stk500boot_v2_mega2560.hex contains 262106 bytes
reading on-chip flash data:
#
verifying ...
262106 bytes of flash verified
reading input file "0x0F"
writing lock (1 bytes):
#
1 bytes of lock written
verifying lock memory against 0x0F:
load data lock data from input file 0x0F:
input file 0x0F contains 1 bytes
reading on-chip lock data:
#
verifying ...
1 bytes of lock verified
avrdude done. Thank you.