AM32 single ESC install - Voodoobrew101/AM32-MultiRotor-ESC-firmware GitHub Wiki

Updated: June/04/2021

These instruction are designed with a single esc for RC crawlers in mind, but the steps are basically the same for quadcopter use. For a 4in1 ESC you will need to connect and program each of the 4 ESC's individually.

Step 1: Gather your supplies

  • You’re going to need a compatible ESC (I am using am Airbot Wraith32)
  • ST-link v2 programmer with jumper wires
  • soldering Iron with a small tip
  • wires
  • non acid flux
  • computer (I use Windows 10, but it can be done on Linux as well, possibly on a Mac to but I am not sure)

Optional supplies

  • a magnifying glass, or a good zoom app for your phone camera, I use open camera (for android) because it doesn’t fall asleep.
  • Dupont Crimpers and Plugs

Step 2: Soldering

wraith32

We need some tiny wire, I use stranded silicone 26awg wire.

Solder wires 26g to:

#ffff00SWD (SWDIO),

#66cc66SWC (SWCLK),

#ffffffPWM,

#ff0000+ (POS, main positive power in for ESC) and

#000000- (GND, main negative power in for ESC).

Also Solder larger Battery wires (14g to 18g) to:

#ff0000+ (POS, main positive power in for ESC) and

#000000- (GND, main negative power in for ESC).

and attach a battery plug.

Attach a motor wire to each of the 3 motor terminals on the opposite side and add plugs as well.

Your esc should look something like this (I have also installed an optional 2 pin JST RCY plug for a direct power servo)

Note how the ST-link in this picture has the terminals in a different order, Make sure you use the proper order for your device.

Step 3: Download and install Software

STM32CubeProgrammer We need this to disable write protection on the Option bytes, and to load the firmware.

You may see images of the older version of this software STM32 ST-LINK utility Either software will work about the same, mustly the difference is the user interface.

I think you need to register or something to download the software, but it's free, no credit card, just an annoyance.

Step 4: Download the Firmware

There are 3 pieces of firmware to upload to the ESC

Alternatively if you are using a wraith32 esc for a RC crawler you can download a full firmware file from Voodoobrew's google drive, these file end with _FULL ( i.e. WRAITH32_CRAWLER_FULL.bin ) and they include all 3 of the previous files.

Step 5: Connect ST-programmer

Relatively straight forward, make sure you have your wires in the right locations.

3 wires connect the ESC to the ST-Link

#ffff00SWD (SWDIO),

#66cc66SWC (SWCLK) and

#000000- (GND).

2 wires connect the battery to the ESC

#ff0000+ (POS, 5.0v) and

#000000- (GND).

Plug the USB on the ST-Link into the Computer

Step 6: STM32CubeProgrammer

With your ESC and ST-Link connected, open STM32CubeProgrammer and click the green connect button in the upper right corner.

Erasing the BLHeli32 firmware from the ESC

(this is a point of no return, there will be no way to upload BLHeli32 firmware to the esc)

  1. Click on OB (Option bytes)

  2. Select “Read Out Protection” and Set to AA ( AKA level 0 )

  3. Select “Write Protection” and check all the empty boxes, scroll through, get them all and clickapply.

  4. Now do a full chip memory erase

  1. Select Erasing & Programming from the left

  2. Browse for the firmware you just downloaded

  3. Set the start address to 0x08000000 if it isn’t already

  • Bootloaders and _FULL.bins are uploaded to 0x08000000
  • Target firmware and _PART.bins are uploaded to 0x08001000
  • EEPROM binary for f051 or f031 chips are uploaded to 0x08007C00
  1. Check the Skip flash erase before programming box if it isn’t already

  2. Check the verify programming box if it isn’t already

  3. Click Start Programming to upload the file.

Repeat the above steps for each file, uploading it the the appropriate destination address in part 7.

Step 7: Testing

At this point you should have a functional ESC. The settings can be adjusted later using this Tutorial for an Arduino PC Link. You should be able to connect a motor and power it on to hear startup beeps and arming tones if you also connected a receiver.

Step 8: Unsoldering

We will no longer need the #ffff00SWD (SWDIO) and

#66cc66SWC (SWCLK) Wires

So you can now remove them.

This esc was not designed to power a servo, so only run the ground and PWM to your receiver. You can use a tiny BEC like This one to power the receiver ( or a larger one like this Castle BEC if you also want to power a servo ).

Connect all this to your RC car

That’s about it…

If everything went according to plan, you should end up with something that looks like this.