Hi everyone Frearduino Mega 2560 v2.8 Looped Bootloader!!!

:slight_smile: I got this great board from a Hephestos Prusa i3, I'm talking about Frearduino Mega 2560, during years it work just fine until I updated with lastest repetier firmware and it stuck on an infinite loop on its bootloader. I got another mega board from Keyestudio, it is MEGA 2560 R3. I need someone tell me how wrire ks0002 to use it as AVR to burn frearduino mega 2560´s bootloader using Arduino IDE.
here there are the two boards to

You see the 6-pin "ICSP" connectors?
Wire them up in parallel, EXCEPT that the lower-left pin on your "target" (the Freaduino) should be connected to digital pin 10 on the "programmer" board.

For the mega don’t you need to connect the source’s 53 to the target reset? Check the source code of your Arduino as ISP sketch...

And when connecting the ICSP headers, pay attention to the marking (usually a dot, seems to be a small arrow on your boards) that identify pin #1, apparently the bottom left one on your black board and the top left pin on your freaduino.

Franck

It looks to me like target reset is always on digital10

westfw:
It looks to me like target reset is always on digital10

You're right, I checked the source (IDE 1.8.2), it's always 10 except if "HOOTLOADER2" is defined which doesn't apply here.

Franck

Hello Westfw I did exactly what you suggested but didn´t work Aurdino IDE says:

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 JoergWunsch

System wide configuration file is "/Volumes/JoseSSDData/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/joemac/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/cu.usbmodem1411
Using Programmer : wiring
Overriding Baud Rate : 115200
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 MinWMaxWReadBack


eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 000 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 000 no 1 0 0 9000 9000 0x00 0x00
efuse 0 000 no 1 0 0 9000 9000 0x00 0x00
lock 0 000 no 1 0 0 9000 9000 0x00 0x00
calibration 0 000 no 1 0 000 0x00 0x00
signature 0 000 no 3 0 000 0x00 0x00

Programmer Type : Wiring
Description : Wiring
Programmer Model: AVRISP
Hardware Version: 15
Firmware Version Master : 2.10
Vtarget : 0.0 V
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: erasing chip
avrdude: stk500v2_command(): command failed

avrdude done. Thank you.

I keep digging and I found this information on System Information about Frearduino:
FT232R USB UART:

Product ID: 0x6001
Vendor ID: 0x0403 (Future Technology Devices International Limited)
Version: 6.00
Serial Number: A103SY11
Speed: Up to 12 Mb/sec
Manufacturer: FTDI
Location ID: 0x14200000 / 6
Current Available (mA): 500
Current Required (mA): 90
Extra Operating Current (mA): 0

I read when your Arduino board is FTDI you must use a different method is that right? Could you guide me in the simplest way to accomplish this task? Take into account I don´t have a FTDI cable I just have to wire them up as usually.

Thanx in advance to all of you.

Hello Westfw I did exactly what you suggested but didn´t work

Which tutorial, exactly, are you following?

Aurdino IDE says:
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35

What's the line before that, which shows the exact avdude command that was executed? It should look like:

C:\Program Files\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m

Never mind. The logs you did include make it clear that you're doing something quite wrong; probably following a tutorial for a setup that is quite different than what you actually have. The parts in red below are ... not what they should be...

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
        Copyright (c) 2007-2014 JoergWunsch

        System wide configuration file is "/Volumes/JoseSSDData/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
        User configuration file is "/Users/joemac/.avrduderc"
        User configuration file does not exist or is not a regular file, skipping

        Using Port                    : /dev/cu.usbmodem1411
[color=red]        Using Programmer              : wiring
        Overriding Baud Rate          : 115200[/color]
        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 MinWMaxWReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
lfuse          0     000 no          1    0      0  9000  9000 0x00 0x00
hfuse          0     000 no          1    0      0  9000  9000 0x00 0x00
efuse          0     000 no          1    0      0  9000  9000 0x00 0x00
lock           0     000 no          1    0      0  9000  9000 0x00 0x00
calibration    0     000 no          1    0      000 0x00 0x00
signature      0     000 no          3    0      000 0x00 0x00

[color=red]        Programmer Type : Wiring
Description     : Wiring
        Programmer Model: AVRISP[/color]
        Hardware Version: 15
        Firmware Version Master : 2.10
Vtarget         : 0.0 V
        SCK period      : 0.1 us

It SHOULD look like:

C:\Program Files\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
       :
         System wide configuration file is "C:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
[color=limegreen]         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200[/color]
         AVR Part                      : ATmega2560
         Chip Erase delay              : 9000 u
            :[color=limegreen]
         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware[/color]
         Hardware Version: 2
         Firmware Version: 1.18
            :
avrdude: AVR device initialized and ready to accept instructions

The best tutorial around, currently is probably Nick Gammon's, but it doesn't talk about using a MEGA as a programmer or target at all. In theory, once the connections are correct, it should work about the same. The outline is:

  • Connect the working Arduino that you'll be using as the programmer to your PC with the USB cable.
  • set the "Board" and "Port" as appropriate for that board.
  • open and upload the "ArduinoISP" example program.
  • disable auto-reset on the programmer board (10uF cap between RESET and GROUND, usually.)
  • (theoretically, you should unplug the USB cable at this point, so that the programmer is not powered)
  • Connect the target board that you're trying to put the bootloader on to the programmer, either via the SPI pins on the IO connectors (13, 12, 11, 10, PWR, GND on Uno; 52, 51. 50, 10, PWR, GND on MEGA) or via the ISP connector (+pin10) on any AVR board.
  • (plug the programmer board back into the USB port. the target board is powered via the programming connections/)
  • Change the "Board" setting to match the target board (also set the "CPU" and other board specific values, if any, so they match the target.) Make sure the "Port" is still set to the port that the "programmer" arduino is on. Set the "Programmer" to "Arduino as ISP" (do NOT use "ArduinoISP", which is different. (sigh.))
  • NOW click "burn bootloader."

I already got my Frearduino mega working again with Marlin installed.

Although it is working I have doubts about how I solved it if it was that way, I explain myself better:

The Frearduino 2560 + RAMPS 1.4 came originally with my Prusa i3 from HEPHESTOS, It has always been connected to my iMac using Mac software such as the Cura, Repetier Host and Arduino IDE; After It got looped I came to you for help and also I search into the Web for every tutorial about burn bootloader and all the information about it coincided in the same. At that point I was ready to buy a programmer on Amazon, but I decided to try the same procedure from Windows 7, so I mount a virtual machine on my iMac and I installed Windows 7 and Arduino IDE, connecting the cables from ICSP as suggested and IT WORKS!!! the first attempt it flashed the Bootloader perfectly; I disconnected it from the ICSP cables and I put the USB directly and I uploaded the Blink and it worked, then I went up to the Marlin sketch and its successfully uploaded too now it's like in its old days (All this from Windows 7 in my virtual machine), now I go out of Windows and I open the Arduino IDE and I goto Terminal and I see Frearduino working property but if I try to upload Marlin or Sketch but if I try to upload something simple like a Blink I get the same avrdude error: stk500v2_command (): command failed. It could be said that I have problems in Sierra (Mac operating system based on Unix) with the installation of the stk500v2 but I do the same operation with the Key Studio Mega 2560 board and it works great.
So far I can only upload sketch to Frearduino borard from Windows 7.

Any ideas?
Thanx in advanced