Hello there,

i had a problem with my apm. After firmware upload, the apm stopped work. Only green light(alive led) turn on when powered, and no mo recognized from mission planner.

When i plug/unplug i can hear the dlindlon sound from windows 7, i can see in devices manager the atmega2560 plugged in, but i have error of connection in mission planner, by usb connection and firmware upload fails.

So reading thousends of topics over the net, i understand thet can be a bootloader problem. The main chip(atmega2560) lost his bootloader, so its no more possibile to interact with pc by usb.

Im tryng in this day to flash a new bootloader over the icsp header near the micro usb port, but something is not working....

Im using an arduino nano as isp programmer and winavr to command it.

The connection looks ok and this is the command that i send by cmd:

E:\Droni\APM\AVRdude + bootloader atmega2560>avrdude.exe -P com7 -F -v -b 19200
-c avrisp -p m2560 -U flash:w:stk500boot_v2_mega2560.hex -U efuse:w:0xF4:m -U hfuse:w:0xD9:m -U lfuse:w:0xFF:m -U lock:w:0x0F:m

and this is the result:

avrdude.exe: Version 6.0.1, compiled on Oct 17 2013 at 21:37:20
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2009 Joerg Wunsch

             System wide configuration file is "E:\Droni\APM\AVRdude + bootloade
r atmega2560\avrdude.conf"

             Using Port                    : com7
             Using Programmer              : avrisp
             Overriding Baud Rate          : 19200
             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
               flash         65    10   256    0 yes    262144  256   1024  4500
  4500 0x00 0x00
               lfuse          0     0     0    0 no          1    0      0  9000
  9000 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  9000
  9000 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  9000
  9000 0x00 0x00
               lock           0     0     0    0 no          1    0      0  9000
  9000 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0
     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0
     0 0x00 0x00

             Programmer Type : STK500
             Description     : Atmel AVR ISP
             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.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude.exe: Device signature = 0x1e9801
avrdude.exe: safemode: lfuse reads as FF
avrdude.exe: safemode: hfuse reads as D8
avrdude.exe: safemode: efuse reads as FC
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be per
formed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "stk500boot_v2_mega2560.hex"
avrdude.exe: input file stk500boot_v2_mega2560.hex auto detected as Intel Hex
avrdude.exe: writing flash (256458 bytes):

Writing | ################################################## | 100% 0.06s

avrdude.exe: 256458 bytes of flash written
avrdude.exe: verifying flash memory against stk500boot_v2_mega2560.hex:
avrdude.exe: load data flash data from input file stk500boot_v2_mega2560.hex:
avrdude.exe: input file stk500boot_v2_mega2560.hex auto detected as Intel Hex
avrdude.exe: input file stk500boot_v2_mega2560.hex contains 256458 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 0.06s

avrdude.exe: verifying ...
avrdude.exe: 256458 bytes of flash verified
avrdude.exe: reading input file "0xF4"
avrdude.exe: writing efuse (1 bytes):

Writing |                                                    | 0% 0.00s ***faile
d;
Writing | ################################################## | 100% 0.13s

avrdude.exe: 1 bytes of efuse written
avrdude.exe: verifying efuse memory against 0xF4:
avrdude.exe: load data efuse data from input file 0xF4:
avrdude.exe: input file 0xF4 contains 1 bytes
avrdude.exe: reading on-chip efuse data:

Reading | ################################################## | 100% 0.02s

avrdude.exe: verifying ...
avrdude.exe: verification error, first mismatch at byte 0x0000
             0xfc != 0xf4
avrdude.exe: verification error; content mismatch

avrdude.exe: safemode: lfuse reads as FF
avrdude.exe: safemode: hfuse reads as D8
avrdude.exe: safemode: efuse reads as FC
avrdude.exe: safemode: efuse changed! Was f4, and is now fc
Would you like this fuse to be changed back? [y/n] n
avrdude.exe: safemode: Fuses OK (H:F4, E:D8, L:FF)

avrdude.exe done.  Thank you.

As u can see there is some problem by flashing the fuse bits, in the last raw of my copy/past there is a question "Would you like this fuse to be changed back? [y/n] n" and i can understand why there is this question...

I found the original tutorial here.

And i tryed with the bootloader inside the arduino IDE path, and the bootloader from here

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Use proper power module and remove all the red wires coming from esc
  • i checked the 3.3v and its look good, no fuse/diode blowed up, never powerd with more then 5.3volt by bec

This reply was deleted.

Activity

DIY Drones via Twitter
Review of the new Nivida Jetson NX for robocars https://t.co/bWjd3sH2o4
1 hour ago
DIY Robocars via Twitter
RT @chr1sa: My review of the new @NVIDIAEmbedded Jetson Xavier NX in robotics and @DIYRobocars applications https://t.co/O7TfJZhiF9 https:/…
15 hours ago
DIY Drones via Twitter
RT @chr1sa: Somehow I missed this, but last week @Nvidia released a new version of its Isaac robot development framework. Lots of new Lidar…
yesterday
DIY Robocars via Twitter
RT @Smartphone89: DonkeyCar Racing League Korea #donkeycar @diyrobocars https://t.co/mDlHDR1d98
Friday
Jørn Ramnæs liked VIDEO LINK's profile
Friday
Mark Harrison left a comment on Moderators
"Wow, Ning2 looks really great on mobile. I had sort of drifted away as my browse-time went more on my phone, so this is great."
Friday
Hank Deucker left a comment on PIXHAWK
"I am sure most will say not again, Pixhawk telemetry. I do need help and all can be reassured that I have spent many hours scouring the net for useful information. I am not new at quadcopter flying, I started in 2012 and have progressed through many…"
Thursday
DIY Robocars via Twitter
https://t.co/rLmFr8M2UK
Thursday
Hank Deucker left a comment on PIXHAWK
"Tomorrow, I am thinking about the wording at the moment."
Thursday
DIY Drones via Twitter
Welcome to the new DIY Drones design!. You may have noticed that DIY Drones looks a little different today. That's… https://t.co/cg2EmeDGMQ
Wednesday
DIY Drones via Twitter
New! Online Training on Drones for Disaster Response https://t.co/brqRuujjY2
May 26
DIY Robocars via Twitter
https://t.co/8EMCvYW6oz
May 25
DIY Robocars via Twitter
RT @OttawaAVGroup: We are going to try something new this week. We will be having a drop-in style meeting Wednesday @ 7-9pm EST. Pop in and…
May 25
DIY Robocars via Twitter
RT @tawnkramer: Thanks Everyone for another fun virtual race! Amazing Ai racers competing head-to-head, Virtual Makers Fair event. Catch us…
May 23
DIY Robocars via Twitter
RT @make: Find out the latest from @diyrobocars at 10am PT from @chr1sa of @3DRobotics on Virtually Make Faire! #makerfaire #maketogether #…
May 23
DIY Robocars via Twitter
RT @Heavy02011: Join us Saturday online: Virtual Race League: @DIYRobocars Race #2 - Parking Lot Nerds https://t.co/aJUu4sdutx #Meetup via…
May 22
More…