esk8.news esk8 calc donate now

Unity not booting? You are not alone! (How to fix the bootloader)

Hello!

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.
  • A Windows computer.
  • The ST-LINKv2 utility.
  • 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?

  1. Disconnect the unity from the battery and any other connectors.
  2. Remove the orange cover.
  3. This reveals the unity with a separate PCB on top. The separate PCB is the Bluetooth module.
  4. Remove the Bluetooth module. Take note of the connector the module is plugged into. This is the connector we will be using to flash the bootloader.
  5. Take the jumpers, and connect them as follows to the ST-LINK (phase wires are oriented at the top). Take a look at your ST-LINK for the corresponding connections.
+-+-+-+-+-+-+-+
|1|2|3|4|5|x|x|
+-+-+-+-+-+-+-+
|x|x|x|x|x|x|x|
+-+-+-+-+-+-+-+
1: 3.3v
2: SWCLK
3: GND
4: SWDIO
5: RST

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.

  1. Connect the ST-LINK to your computer.
  2. Open the ST-LINK utility.
  3. 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:
  4. Click on Open file and select the bootloader binary.
  5. Click on Program & Verify on the top row. This should show something like this:
    d1b821a8f6df48adbb615b62b0b741ba3a14c24f
  6. Check the start address. (Unlike the photo) it should show 0x08000000.
  7. Click start!
  8. After this is done, disconnect the ST-LINK inside of the Utility. This is the Mains plug with the red cross on it.
  9. Disconnect the ST-LINK from the computer.
  10. Unplug the Jumpers from the Unity.
  11. Put the Bluetooth module back in its position.
  12. Put the orange cover back.
  13. Connect the phase wires, remote and battery back into the Unity as normal.
  14. Try it out!

Now you should be able to use the Unity like normal. I hope this helped! If not, feel free to ask any questions.

29 Likes

Nice tutorial!

I’m sure this will come in handy for many people!

4 Likes

I feel this should be pinned for a week or 2 to help out all new unity users with problems coming from the dark side :slight_smile:
@BillGordon wouldnt you agree?

4 Likes

this would make a great front page article.

6 Likes

@longhairedboy
“Unity not booting? You are not alone!”

3 Likes

Kinda want to change the title to that now…

2 Likes

Excellent guide, I applaud you sir.

5 Likes

Bookmarked for when I DOH! Thanks and nice work, great content.

2 Likes

Thank you for documenting this!

4 Likes

Thanks a lot!!!

Could you please clarify the jumper connections between the connector on unity and the one on the St link. I am not sure I understand which is which in your small connection graphics :roll_eyes:

A good title makes for more readers :ok_hand::wink:

1 Like

I intentionally left that out, as it could differ per version you have. This is mine, and the pin assignment is written on the stick.

1 Like

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!

7 Likes

@Airwolf Welcome and great to hear it worked for you :slight_smile:

1 Like

Hope you stick around, Airwolf!

I’m glad my guide helped you :smile:

1 Like

Hey, Thanks a lot Guys!

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.”

Have a Great day, I will return sometime soon : )

I tried again and again to connect to the device, no success

the stm32 module is connected to the PC, the unity leds are on but the connection to unity doesnt work

i try again …

You might be able to try this. I didn’t have to do that, but you might.