Welcome, Guest. Please login or register.

Username: Password:

Author Topic: Problem uploading on Arduino 2560  (Read 2629 times)

simoleso

  • Newbie
  • *
  • Posts: 2
    • View Profile
Problem uploading on Arduino 2560
« on: January 16, 2018, 17:43:16 »

For first, thanks for the admission to this forum.

Yesterday I've started a new AstroEQ using an Arduino Mega 2560 clone, a protoshield and two DRV8825 just tuned for couple of 23HS8610. I've checked every soldering with a multimeter but I got some trouble uploading the firmware: I've installare JRE 8 on a Windows Vista 32bit machine and launched the AstroEQ utility. From the software I can see the COM17 where is attached Arduino 2560 and when I press Upload Firmware seems all working but, when I press Next, the software reply me: Failed connection...

I've tried several times and I've also substituted the Arduino 2560 with another one (previously used on a 3D printer) but without results. I've also tried to upload a Blink skecth from Arduino IDE on the same card and it works fine.

Could be a issue using a 32 bit OS? Should I use a Windows 10 x64 machine?

Thanks in advance for your attention,

Simone
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Problem uploading on Arduino 2560
« Reply #1 on: January 16, 2018, 17:52:28 »

Hi Simone,


I've confirmed that the problem is due to the bootloader for the Arduino Mega2560 being very flaky when it comes to its handling of the watchdog. The Mega 2560 I have is 4 years old so has an old bootloader that exhibits the same problem.

After a bit of reading around, I've flashed the newer (2013) bootloader from the Arduino github:
https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/bootloaders/stk500v2/stk500boot_v2_mega2560.hex

Having flashed that bootloader the problem is resolved - it can now run the test step without having to unplug the USB.

If you have another Arduino to hand or some other AVR programmer, I would highly advise anyone with an Arduino Mega 2560 version (doesn't affect the Mega 1280 or AstroEQ boards) to flash the new bootloader. Even many of the new production boards and clones use the old bootloader, so even if you bought it after 2013 it will likely need updating.

It's an issue with the bootloader on the Arduino Mega.

If you have another Arduino, you can use that to program the latest bootloader. Alternatively simply unplug the Arduino after firmware upload, and after the configuration is uploaded.

Kind Regards,
Tom.
« Last Edit: January 16, 2018, 17:54:18 by TCWORLD »
Logged
Tom Carpenter (AstroEQ)

simoleso

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Problem uploading on Arduino 2560
« Reply #2 on: January 16, 2018, 23:09:00 »

Thanks for your suggestion, by the way I've tryed updating three different 2560 (of two different producer) without success... the bootloader is updated but the AstroEQ-ConfigUtility continue to fail reading eeeprom.
I've tried also to clear eeeprom with an Arduino skecth without results.

I've tried to update firmware, unplug the 2560 and go on but, in some situation, EQMOD permits the connection the the driver, AR and LST keep scrolling and none command will effect. I believe the problem is that the EEPROM is empty, but how could be modified if AstroEQ-ConfigUtility doesn't work?

Now I have ask some friend if someone got a 1280 and I'll try again... but I'm quite sad for this behaviour.
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Problem uploading on Arduino 2560
« Reply #3 on: January 17, 2018, 16:16:58 »

How did you go about updating the bootloader? You'll need to download the .hex file linked in my quote and then use an ISP programmer (e.g. ArduinoISP) to upload the hex file.
Even new genuine boards and most clones come with the pre-2013 bootloader that is broken.

The other question is are you using the latest beta version of the config utility from the R&D section of forum. If not, could you download that one and try again.
Logged
Tom Carpenter (AstroEQ)

GigiG

  • Full Member
  • ***
  • Posts: 28
    • View Profile
Re: Problem uploading on Arduino 2560
« Reply #4 on: January 17, 2018, 21:47:31 »

Hi Simoleso, I also solved the 'Failed connection' 2560 issue by uploading the right Arduino bootloader (stk500boot_v2_mega2560.hex). The Arduino IDE I got is the 1.6.7 and the bootloader hex is available in the Arduino IDE installed folders (for me C:\Program Files (x86)\Arduino\hardware\arduino\avr\bootloaders\stk500v2). I used an Arduino Uno as ISP programmer following the tutorial in https://www.arduino.cc/en/Tutorial/ArduinoISP
Logged