Welcome! Log In Create A New Profile

Advanced

Atmega 2560 stk500 error

Posted by Hillebrand 
Atmega 2560 stk500 error
December 30, 2019 05:28AM
Hi all,

I got the stk500 error on my Atmega2560 where I am working with for some time now. A few weeks ago (I spread the time working on it) Marlin 1.1.9 did upload normally and worked. Now I tried to upload 2.0.1 and it did not work due to some errors which i spend a lot of time on, now i wanted to upload an adjusted marlin 1.1.9 version again but now it gives the stk500 error, even with standard Anet A8 config. files it gives the error.

I read that it is related to the pc not getting a connection to the Atmega 2560 which I use for my Anet A8 with 1.4 RAMPS.
The problem could be fixed with a new bootloader, at least that is what I also read. But when I try a simple arduino example it does work on another atmega2560, which also gives the stk500 error when I tried to upload the marlin software.
Also when i connect with pronterface i can send a M119 command and do get the ports of the sensors.

Should i still try a new bootloader? Or is something else wrong?

The error:

Arduino:1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

De schets gebruikt 112120 bytes (88%) programma-opslagruimte. Maximum is 126976 bytes.
Globale variabelen gebruiken 4495 bytes van het dynamisch geheugen.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe0
Er trad een error op gedurende laden van de schets
Re: Atmega 2560 stk500 error
December 30, 2019 06:15AM
With windows 10, it is a good idea to reboot the machine when having issues with serial ports...

Not all mega 2560's have the same serial driver chip... Could be ATmega16U2 or CP2104 or CH340

First plug in the mega to your pc and check the device driver to see the board and is working correctly (look in device manager, check for errors, (yellow explanation marks for eg))

If there are no device issues then start arduino and set the com port to the newly created com port in device manager.

Make sure you have board set to mega2560

and try again
Re: Atmega 2560 stk500 error
December 30, 2019 01:32PM
Thanks for your reply.

On the chip itself it says ATMEGA2560 16AV 1348.

Reboot changes nothing.

device manager does not give any errors.

As board it needs to be set to Anet V1 since it is marlin software for the Anet A8.

The strange thing is that it has worked before so why not now?

I also had the older version of marlin on my laptopand tried that one too, but this resulted in the same error. The only thing left seems to be the burn the bootloader.

Edited 1 time(s). Last edit at 12/30/2019 01:50PM by Hillebrand.
Re: Atmega 2560 stk500 error
December 30, 2019 09:04PM
The Anet V1 is a Sanguino 1284p not a mega2560

They use different baudrates to upload

If your machine has a mega2560, you need to set the MOTHERBOARD to a board with a mega2560 eg BOARD_RAMPS_14_EFB and set your arduino Ide board to mega2560

Edited 1 time(s). Last edit at 12/30/2019 09:29PM by Dust.
Re: Atmega 2560 stk500 error
January 17, 2020 01:41AM
Solved!

It worked by selecting the board Mega2560 in arduino IDE. I did not do this before since it still uploaded quite a few times with Anet V1 selected.
Before I got everything working again I indeed needed to set the board to BOARD_RAMPS_14_EFB and also select the right drivers which had came with the board.
The new drivers were 1/32 steps instead of 1/16 so I also need to set this through pronterface.

Hope this will also help others.
Sorry, only registered users may post in this forum.

Click here to login