I had the pleasure of dealing with a broken bootloader for my unity. Since I got quite a few requests for this and it was not a pleasant issue to fix with non-responsive support I decided to make a guide for it. Always try to go the route of support with this first! After I tried (and failed) this initially Enertion claimed I broke the warranty. This is a BS claim (at least in the EU where I live), but proving that is another headache. There were a few guides out there, but none of them worked with the Unity.
When do I need this?
First make sure it’s the bootloader which is broken, not the firmware. This is not for a broken firmware, always try to flash the firmware again using the Focbox app first! The main symptom of a broken bootloader is that it does not turn on at all. Often a light goes on, and turns off after a few seconds. The Unity comes with the bootloader pre-flashed, so if the Unity just comes out of the box this is also not required (unless it’s broken out of the box ofc).
What do I need?
An STLINKv2 serial debugger. Get the original (or a really good fake), as fakes are sometimes wired wrong.
A bunch of female to male jumpers. I used these, as I had some laying around. They were slightly too large (they do fit, but it’s for one-time use), so get one size smaller if you ordering for this.
The Bootloader binary. It does state that this is the firmware, not the bootloader. This is in fact the bootloader and firmware bundled together. Just flashing the bootloader binary does not really help you, as you cannot connect to flash the firmware.
How do I do this?
Disconnect the unity from the battery and any other connectors.
Remove the orange cover.
This reveals the unity with a separate PCB on top. The separate PCB is the Bluetooth module.
You don’t need to plug your unity into your battery. It is powered by the ST-LINK. You could leave out the 3.3v (not the ground!), and plug in the battery, but this makes it more complicated. I don’t have a picture of this connection, and my unity is buried somewhere inside of my board. Sorry about that.
Connect the ST-LINK to your computer.
Open the ST-LINK utility.
Click connect on the top row (Looks like a mains plug with a lightning bolt). This should connect to the unity. It should look somewhat similar to this:
I am soooo Happy that I found this Procedure You posted. I was almost resolved to give up on my project and wait for another Focbox Unity.
I have tried to recover messed up ESC’s before with the STM Link V2 previously, but was unsuccessful.
Your Procedure was so Professional in appearance, and it showed the exact same ESC that I was trying to recover, the Focbox Unity, so it gave me the confidence to keep trying. It took at least 20 or 30 minutes trying to connect from the STM Link Utility program, but eventually it actually connected and now my Focbox is actually working!!! WOW!!! WOO HOO!!! YAAAAY!!!
I kept trying to duplicate the image from the STM Link Utility Program that you have in your Tutorial. Every so often, I would pull the STM Link module out of my Computers USB port, close the Program, then plug it back in and restart the program.
Eventually, I went to Target>Settings>Connection Settings>clicked on SWD, Clicked on OK, and waited for like 30 seconds for the window to become active again.
Then I tried to Connect and it actually worked!!
Thanks a lot for sharing the fruit of your Genius, You Rule Man!
I finally went on a Test Ride on my new Board this evening, and it was pretty solid except for 1 issue I still need to resolve…
My new Board has a Halo Carbon Fiber Deck.
It has 2x Raptor 2.1 Trucks with 97mm Outwheels. I have 2 Focbox Unities controlled by split ppm powering the 4 Hub motors.
I bent two pieces of Steel Tube, (Square X-Section, 1/2" on a side)in to a sub-frame. The Steel Tube sub-frame parts, (which have lots of “Lightening holes” drilled through them) run along the bottom of the Deck and bolts to the underside of the front and rear trucks using the same bolts as those that hold the trucks to the Deck.
I have a homemade 12S6P Battery Pack of Sony VTC5A batteries and don’t use a BMS.
I just have 1 issue left at this point. 1 of the 2 Focbox Unities just turns off for no apparent reason after a minute or two.
Tomorrow I am going to Reflash the Unity.bin file now that I know how thanks to DSluijk’s excellent procedure. Then I’m going to try reuploading FW 23.44 again and if that doesn’t work, maybe 23.43 or 23.42.
The hub motors run fine when they’re running, but after a minute or two, the Unity for the front wheels just turns off. It can be turned on again just be pressing the button. I’m not sure what to think of it, but any suggestions would be welcome, and if I figure it out, I’ll post some info about it.
I’m going to look in to the Error message that comes up which is: “Serial Port Error: The I/O operation has been aborted because of either a thread exit or an application request.”