Bring your Arduboy back from the dead (burn bootloader)

I just tested my 2 units. Only the one I “debricked” says LOCK.
Is there a way to set the lock bits with a simple program or I should just do an other burn boot loader?

You can use the command:

-U lock:w:0xEF:m

with AVRDUDE.

Also using Arduinos “burn bootloader” will work with arduino leonardo set as the target, the fuses are set as part of the process.

1 Like

Maybe I’m missing something but I’m unable to use “burn bootloader” maybe its something wrong with my environment?
Its no big issue as I’ve ordered a USBasp and currently am not bricked its just perked my curiosity.

Arduino: 1.8.2 (Windows 7), Board: "Arduino Leonardo"
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m 
Error while burning bootloader.
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch
         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
         Using Port                    : usb
         Using Programmer              : stk500v2
avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)
avrdude done.  Thank you.

Look on the bright side, at least the program was very polite :D

3 Likes

You can only burn the bootloader, or set the fuses, using an AVR hardware programmer. You can’t do it using the Arduboy’s USB port. Since you said you’ve ordered a USBasp, I’m assuming you don’t already have a suitable hardware programmer.

Ahh it makes sense I misinterpreted Kevins post [quote=Also using Arduinos “burn bootloader” will work with arduino leonardo set as the target,"][/quote] I assume it also impossible to for the hardware to lock itself with a sketch?

:blush: I should have read the whole post where I found your sketch.

.

Just a word of caution:

The signals that you attach a hardware programmer to are also wired on the circuit board to the display. The display is designed to run at a maximum of 3.3V so if you feed 5V power and/or signals into it you risk damaging the display. Therefore, it is advisable that the hardware programmer you use is capable and set to run at 3.3V

The widely available USBasp V2.0 “clone” programmer, linked to in the original post, has a 5V/3.3V jumper but this only sets the voltage provided on the connector’s VCC pin. Even when jumpered to 3.3V, the output signals (RESET, SCK, MOSI) will still swing to 5V, risking damage to the display. Although, as reported, others have had success using this programmer, with no apparent damage to the Arduboy, be aware that based on the display specifications there is some risk involved.

I have this programmer and have verified what I’ve said above. I’ve modified my programmer to provide both the proper power and signal voltages based on the jumper selection. (I also added some bypass capacitors to improve power supply stability).

4 Likes

You’ll be fine with 5v :slight_smile:

1 Like

And I can confirm.
I left the jumper at 5 volt on the USBASP when I reprogrammed mine.
I was wondering if I should change it to 3.3V.
But since the battery on the Arduboy says 3.7V so I guess this was not related. I figured the jumper was for input and not output.
Anyway it worked fine.

Sure, you could be fine. I’m just cautioning there’s a possible risk based on the data provided by the display manufacturer. Take it as you wish.

1 Like

No, the jumper sets the voltage provided out of the VCC pin on the programmer’s connector, that powers the Arduboy (thus its display’s VDD pin) if you hook it up to the Arduboy’s VCC pad. Without modifications to the programmer, the jumper doesn’t control the high level voltage provided on the signal outputs (RESET, SCK, MOSI) which will always be 5V.

Worked for me :grinning: !!! Thanks @eried

Just want to explain a llittle trouble i had and how to solve it.

After clicking ‘Burn Bootloader’ avrdude throws this error: avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor=‘www.fischl.de’ product='USBasp’

Problem was the USB drivers (i’m using Win 10).
Solved downloading this program:

from: http://zadig.akeo.ie/

And assigning WinUSB to the USBAsp device (didn’t recognized by my PC)

This can be useful for someone having same ‘drivers’ problem.

1 Like

How did you held the pins? Fancy clamps?

No fancy clamps, using my hands to hold the pins and clicked the mouse with the elbow. I think ‘Jugglering’ it’s the correct word.:smile:

A bit of double sided tape to keep the Arduboy in place and after two tries it work!

Got my programmer and killed it trying to lock it :cry:
is it safe to power it from usb or the battery to flash it? as it doesn’t seem to power from the test pads.

Why do you think you killed it?

I connected the programmer with the arduboy off and something light up, I hit burn bootloader and It got as far as Reading########################### and the light went out now all I can get is a red LED when plugging in USB reflashing fails:

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Error while burning bootloader.

I’ve double checked cables continuity with a multimeter and all are fine from the solder pads on the programmer through to the pins I used.


Connections are:
VCC=Red
GND=Black
Reset=Green

CLK/SCK=Green
MOSI=Yellow
MISO=Blue

Hard to tell. At first glance it might be that you are not connecting all pins at the same time. You need pogo pins or something more flexible in my opinion.

Are you sure that you did not reversed VCC and GND while trying to program your Arduboy? (that is the only thing it might be dangerous in my opinion)

It’s virtually impossible to reverse them GND is fixed in the centre by the header pins with each cable facing the same direction so I know top and bottom orientation and I specifically used red and black on those pins for that purpose.

Thanks for this thread! Love it! Glad to see a conversation about this in English. :stuck_out_tongue: