Go Down

Topic: usbasp + timeut error + lots of lost hours (Read 684 times) previous topic - next topic

camilozk

Hi!

I have been trying to use usbasp to programm some mega 2560 boards without good results. I have been following information from different places. After this failed attempt to try to use usbasp, the boards with which I have been playing, are not uploading sketch, with the sadly famous timeout error. Several boards seem to be useless now...

Perhaps somebody has an advice to help me bring these boards back to life?

The massive post about timeout error has a lot of different information from which I tried a lot of things with no results... (https://forum.arduino.cc/index.php?topic=83079.0)

Or perhaps should I throw the boards away and continue with my life? this is consuming a lot of time so far for nothing...

have a nice day!

pert

You haven't provided enough information.

I have been trying to use usbasp to programm some mega 2560 boards without good results.
What exactly do you mean by "use usbasp to programm"?

What exactly do you mean by "without good results"?

After you do a Sketch > Upload Using Programmer on a board it erases the bootloader and if you try to upload over USB after that you will get the:
Code: [Select]
avrdude: stk500v2_ReceiveMessage(): timeout
error. You need to do a Tools > Burn Bootloader on the board in order to go back to being able to upload to the board over USB again.

camilozk

thanks pert for writing

by "use usbasp to programm" I mean exactly what you understood: Sketch > Upload Using Programmer

by "without good results" I mean that I do not see the program working. For example, I tried to upload the blink example, and never saw the blinking working

I also remember trying to do Tools > Burn Bootloader, but I didnt manage to make it work.


I am away from home right now, but I will try it out one more time when I am back.

thanks again.

pert

OK, the program not running after you do a Sketch > Upload Using Programmer using USBasp with Mega 2560 is a known issue:
https://github.com/arduino/Arduino/issues/388
There are two solutions to chose from:

Update the firmware:
https://github.com/PeterVH/usbasp
Note that this is an advanced operation and may result in "bricking" your USBasp. You can get more information here:
https://forum.arduino.cc/index.php?topic=363772.0

Change the fuse setting:
  • Tools > Board > Arduino/Genuino Mega or Mega 2560
  • File > Examples > SPI >BarometricPressureSensor (or any other SPI library example)
  • Sketch > Show Sketch Folder
  • Navigate up folder levels to the folder that contains the file boards.txt
  • Open boards.txt in a text editor
  • Change the line:

Code: [Select]
mega.menu.cpu.atmega2560.bootloader.high_fuses=0xD8
to:
Code: [Select]
mega.menu.cpu.atmega2560.bootloader.high_fuses=0xD9
  • Save the file
  • Restart the Arduino IDE if it's running
  • Tools > Burn Bootloader
  • Sketch > Upload Using Programmer
  • The sketch should now run.

You will need to change the fuse value back to the original value following the above steps before doing Tools > Burn Bootloader again to be able to go back to normal uploading over USB again.

Go Up