It makes sense that the one you repaired says OK. Using the Arduino IDE to re-burn the bootloader should also set the lock bits properly after burning.
All Kickstarter units probably will say Bootloader UNLOCKED!
And, although @bateske has stated that production units should have the lock bits set properly, there is some evidence that this is not the case with at least some of them.
Are these Kickstarter or production units? What message do you get on the last line of the sketch output? If it says the lock bits are 0xEF, the sketch should and this with 0x3F and then compare with 0x2F and then report LOCK bits are OK. Are you sure the untouched units report Lock bits: 0xEF ?
Thought I would give the sketch a shot out of curiosity on my Arduboy and its reporting the bootloader is unlocked.
I assume this is fairly new stock as it was purchased from Pimoroni on 30th April 2017.
Think i’ll order a programmer now for just incase.
@eried Wow thanks for doing some testing looks like we get to have a conversation with our factory and try to figure out how this happened!
I’ll have to admit after the first round of production came out we tested those units so it would seem at some point the factory made a change and switched test jigs or something? We don’t serialize our production batches (yet) so it’s actually pretty tough to say how many units would be effected.
It would be maximum of around 2,000 units but if you do end up having an issue bricking a device, and for sure the reset button doesn’t work then use the contact form to get a hold of us and we can help you resolve the situation.
It’s kind of frustrating and enlightening at the same time to see a post like @eried with the display on the screen of how the lock fuses are, this is kind of like the problem we had with the RGB led where it seems very easy to design a test for it but in the rapid pace of production some times it’s simple to forget that it’s pretty easy to put together something like this.
Anyways, its still remarkably difficult to overwrite the bootloader, as it requires some kind of glitch or malfunction to occur, but it does make it technically possible so obviously we will fix this in the future.
Or attempting to burn a sketch that is too large using an uploader other than the Arduino IDE, which doesn’t check the length before uploading, such as @GrisWoldDiablo described earlier in this topic by using Visual Studio:
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.
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?
I should have read the whole post where I found your sketch.
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).
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.
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.